fix non-contiguous tensor saving (from channels-last) (#3932)

This commit is contained in:
Alex "mcmonkey" Goodwin 2024-07-02 17:16:33 -07:00 committed by GitHub
parent 01991f72ce
commit 3f46362d22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -627,5 +627,7 @@ def save_checkpoint(output_path, model, clip=None, vae=None, clip_vision=None, m
sd = model.model.state_dict_for_saving(clip_sd, vae.get_sd(), clip_vision_sd)
for k in extra_keys:
sd[k] = extra_keys[k]
for k in sd:
sd[k] = sd[k].contiguous()
comfy.utils.save_torch_file(sd, output_path, metadata=metadata)