Skip to content

Commit

Permalink
fix(attn_procs): apply workaround only for storage not hf repos
Browse files Browse the repository at this point in the history
  • Loading branch information
gadicc committed Mar 4, 2023
1 parent f3ff6ba commit b98710f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def inference(all_inputs: dict) -> dict:
storage.download_and_extract(path)
print("Load attn_procs " + attn_procs)
# Workaround https://github.com/huggingface/diffusers/pull/2448#issuecomment-1453938119
if not re.match(r".safetensors", attn_procs):
if storage and not re.match(r".safetensors", attn_procs):
attn_procs = torch.load(attn_procs, map_location="cpu")
pipeline.unet.load_attn_procs(attn_procs)
else:
Expand Down

0 comments on commit b98710f

Please sign in to comment.