diff --git a/CHANGELOG.md b/CHANGELOG.md index 19c778116..19dec1762 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,7 +52,7 @@ But there's more than SD3: - css tweaks for modernui - additional torch gc checks, thanks @Disty0! -**NNCF**, thanks @Disty0! +**Improvements: NNCF**, thanks @Disty0! - SD3 and PixArt support - moved the first compression step to CPU - sequential cpu offload (lowvram) support diff --git a/modules/sd_models.py b/modules/sd_models.py index 8f04b4d22..c4a896de6 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -764,7 +764,7 @@ def move_model(model, device=None, force=False): if model is None or device is None: return if getattr(model, 'vae', None) is not None and get_diffusers_task(model) != DiffusersTaskType.TEXT_2_IMAGE: - if device == devices.device and not model.vae.device.type == "meta": # force vae back to gpu if not in txt2img mode + if device == devices.device and model.vae.device.type != "meta": # force vae back to gpu if not in txt2img mode model.vae.to(device) if hasattr(model.vae, '_hf_hook'): debug_move(f'Model move: to={device} class={model.vae.__class__} fn={sys._getframe(1).f_code.co_name}') # pylint: disable=protected-access