1
0
Fork 0

fix(api): only remove converted VAE if it exists

This commit is contained in:
Sean Sube 2023-02-17 08:34:28 -06:00
parent 7a1f8318ef
commit 56a826228d
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 2 additions and 1 deletions

View File

@ -1428,6 +1428,7 @@ def convert_diffusion_original(
logger.info("converted original Diffusers checkpoint to Torch model") logger.info("converted original Diffusers checkpoint to Torch model")
# VAE has already been converted and will confuse HF repo lookup # VAE has already been converted and will confuse HF repo lookup
if "vae" in model:
del model["vae"] del model["vae"]
convert_diffusion_stable(ctx, model, working_name) convert_diffusion_stable(ctx, model, working_name)