diff --git a/comfy/model_management.py b/comfy/model_management.py index ef36a2c4849..32ddf6da14a 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -265,7 +265,10 @@ def get_torch_device_name(device): def module_size(module): module_mem = 0 - sd = module.state_dict() + try: + sd = module.state_dict() + except: + sd = dict(module.__dict__.items()) for k in sd: t = sd[k] module_mem += t.nelement() * t.element_size() diff --git a/latent_preview.py b/latent_preview.py index b258fcf2065..00804f2da85 100644 --- a/latent_preview.py +++ b/latent_preview.py @@ -64,6 +64,8 @@ def get_previewer(device, latent_format): if method == LatentPreviewMethod.Auto: method = LatentPreviewMethod.Latent2RGB + if taesd_decoder_path: + method = LatentPreviewMethod.TAESD if method == LatentPreviewMethod.TAESD: if taesd_decoder_path: diff --git a/requirements.txt b/requirements.txt index 906b96eda2d..0af5db27927 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,3 +14,4 @@ psutil #non essential dependencies: kornia>=0.7.1 spandrel +xformers