mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
Fix ESRGAN with CPU
This commit is contained in:
@@ -55,6 +55,7 @@ NYE refresh release with quite a few optimizatios and bug fixes...
|
||||
- hires with refiner prompt and batch processing
|
||||
- processing with nested calls
|
||||
- ui networks initial sort
|
||||
- esrgan on cpu devices
|
||||
|
||||
## Update for 2024-12-24
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ class UpscalerESRGAN(Upscaler):
|
||||
if self.models.get(info.local_data_path, None) is not None:
|
||||
shared.log.debug(f"Upscaler cached: type={self.name} model={info.local_data_path}")
|
||||
return self.models[info.local_data_path]
|
||||
state_dict = torch.load(info.local_data_path, map_location='cpu' if devices.device.type == 'mps' else None)
|
||||
state_dict = torch.load(info.local_data_path, map_location='cpu' if devices.device.type in {'mps', 'cpu'} else None)
|
||||
shared.log.info(f"Upscaler loaded: type={self.name} model={info.local_data_path}")
|
||||
|
||||
if "params_ema" in state_dict:
|
||||
|
||||
Reference in New Issue
Block a user