Skip to content

Commit

Permalink
fix non-contiguous tensor saving (from channels-last) (comfyanonymous…
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva authored Jul 3, 2024
1 parent 01991f7 commit 3f46362
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions comfy/sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 3f46362

Please sign in to comment.