Skip to content

Commit

Permalink
fix(api): only convert VAE once when coming from checkpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Feb 17, 2023
1 parent 37b173d commit 7a1f831
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/onnx_web/convert/diffusion_original.py
Original file line number Diff line number Diff line change
Expand Up @@ -1427,5 +1427,8 @@ def convert_diffusion_original(
extract_checkpoint(ctx, torch_name, source, config_file=model.get("config"), vae_file=model.get("vae"))
logger.info("converted original Diffusers checkpoint to Torch model")

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

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

0 comments on commit 7a1f831

Please sign in to comment.