Skip to content

Commit

Permalink
fix(api): handle HF repos in new SD converter
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Dec 24, 2023
1 parent 27bd307 commit 29ccd16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/onnx_web/convert/diffusion/diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ def convert_diffusion_diffusers_optimum(
cache_path, conversion.map_location, size=image_size, version=version
)

if path.isdir(cache_path):
if source.startswith(HuggingfaceClient.protocol) or path.isdir(cache_path):
pipeline = pipe_class.from_pretrained(cache_path, **pipe_args)
else:
pipeline = pipe_class.from_single_file(cache_path, **pipe_args)
Expand Down

0 comments on commit 29ccd16

Please sign in to comment.