Skip to content

Commit

Permalink
fix(api): only remove converted VAE if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Feb 17, 2023
1 parent 7a1f831 commit 56a8262
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/onnx_web/convert/diffusion_original.py
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,8 @@ def convert_diffusion_original(
logger.info("converted original Diffusers checkpoint to Torch model")

# VAE has already been converted and will confuse HF repo lookup
del model["vae"]
if "vae" in model:
del model["vae"]

convert_diffusion_stable(ctx, model, working_name)
logger.info("ONNX pipeline saved to %s", name)

0 comments on commit 56a8262

Please sign in to comment.