Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented spandrel #1

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
5 changes: 4 additions & 1 deletion comfy/model_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions latent_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ psutil
#non essential dependencies:
kornia>=0.7.1
spandrel
xformers