mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-05 03:32:37 +00:00
Be more clear about Spandrel model nomenclature
This commit is contained in:
@@ -71,7 +71,7 @@ class UpscalerSwinIR(Upscaler):
|
||||
else:
|
||||
filename = path
|
||||
|
||||
model = modelloader.load_spandrel_model(
|
||||
model_descriptor = modelloader.load_spandrel_model(
|
||||
filename,
|
||||
device=self._get_device(),
|
||||
dtype=devices.dtype,
|
||||
@@ -79,10 +79,10 @@ class UpscalerSwinIR(Upscaler):
|
||||
)
|
||||
if getattr(opts, 'SWIN_torch_compile', False):
|
||||
try:
|
||||
model = torch.compile(model)
|
||||
model_descriptor.model.compile()
|
||||
except Exception:
|
||||
logger.warning("Failed to compile SwinIR model, fallback to JIT", exc_info=True)
|
||||
return model
|
||||
return model_descriptor
|
||||
|
||||
def _get_device(self):
|
||||
return devices.get_device_for('swinir')
|
||||
|
Reference in New Issue
Block a user