Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a way to select a different VAE when converting diffusion models #145

Closed
ssube opened this issue Feb 14, 2023 · 1 comment · Fixed by #163
Closed

add a way to select a different VAE when converting diffusion models #145

ssube opened this issue Feb 14, 2023 · 1 comment · Fixed by #163
Labels
status/fixed issues that have been fixed and released type/feature new features
Milestone

Comments

@ssube
Copy link
Owner

ssube commented Feb 14, 2023

Many SD checkpoints need a different VAE, either from the original SD or a custom one. Provide an option in the extras file to load and include that.

@ssube ssube added status/new issues that have not been confirmed yet type/feature new features labels Feb 14, 2023
@ssube ssube added this to the v0.8 milestone Feb 14, 2023
@ssube
Copy link
Owner Author

ssube commented Feb 17, 2023

This required a small change to the VAE conversion code:

[2023-02-17 01:05:11,258] INFO: onnx_web.convert.diffusion_original: converting VAE
[2023-02-17 01:05:11,264] ERROR: onnx_web.convert.diffusion_original: exception setting up output: ['Traceback (most recent call last):\n', '  File "/home/ssube/onnx-web/api/onnx_web/convert/diffusion_original.py", line 1316, in extract_checkpoint\n    converted_vae_checkpoint = convert_ldm_vae_checkpoint(vae_checkpoint, vae_config)\n', '  File "/home/ssube/onnx-web/api/onnx_web/convert/diffusion_original.py", line 646, in convert_ldm_vae_checkpoint\n    new_checkpoint = {"encoder.conv_in.weight": vae_state_dict["encoder.conv_in.weight"],\n', "KeyError: 'encoder.conv_in.weight'\n"]
[2023-02-17 01:05:11,264] ERROR: onnx_web.convert.diffusion_original: pipeline or config is not set, unable to continue.
[2023-02-17 01:05:11,410] INFO: onnx_web.convert.diffusion_original: converted original Diffusers checkpoint to Torch model

@ssube ssube added status/fixed issues that have been fixed and released and removed status/new issues that have not been confirmed yet labels Feb 17, 2023
@ssube ssube mentioned this issue Mar 5, 2023
99 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/fixed issues that have been fixed and released type/feature new features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant