Skip to content

Commit

Permalink
fix "local variable 'unet_path' referenced before assignment" in patc…
Browse files Browse the repository at this point in the history
…h_pipe
  • Loading branch information
jiashunran committed Feb 9, 2023
1 parent 848db91 commit d7385a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lora_diffusion/lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,8 @@ def patch_pipe(
unet_path = maybe_unet_path[:-6] + ".pt"
elif maybe_unet_path.endswith(".text_encoder.pt"):
unet_path = maybe_unet_path[:-16] + ".pt"
else:
unet_path = maybe_unet_path

ti_path = _ti_lora_path(unet_path)
text_path = _text_lora_path(unet_path)
Expand Down

0 comments on commit d7385a6

Please sign in to comment.