Skip to content

Commit

Permalink
Print leftover keys when using the UNETLoader.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Nov 8, 2023
1 parent fe40109 commit 0a6fd49
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions comfy/sd.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,9 @@ def load_unet(unet_path): #load unet in diffusers format
model = model_config.get_model(new_sd, "")
model = model.to(offload_device)
model.load_model_weights(new_sd, "")
left_over = sd.keys()
if len(left_over) > 0:
print("left over keys in unet:", left_over)
return comfy.model_patcher.ModelPatcher(model, load_device=model_management.get_torch_device(), offload_device=offload_device)

def save_checkpoint(output_path, model, clip, vae, metadata=None):
Expand Down

0 comments on commit 0a6fd49

Please sign in to comment.