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

Support v-prediction objective, fix some SDXL models outputting clouds #26

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ZDisket
Copy link

@ZDisket ZDisket commented Mar 11, 2024

If you try to use models trained with the v-prediction objective with the current repo, you'll get nonsense output. I detailed in this issue
This PR adds v-prediction to both schedulers, and aligns the Euler Ancestral one closer to the HF implementation (the original doesn't use predictedOriginalSample).

Also, with some SDXL models, it will output nonsense/clouds. This is Pony Diffusion V6 XL
042-sc256

This is because some of them demand that we sample from the penultimate layer on both text encoders, which the Huggingface implementation does by default. This change fixes that model and (feels like) it makes other SDXL models follow prompts better.

@axodox
Copy link
Owner

axodox commented Apr 2, 2024

Thanks, I will look into it.

@axodox
Copy link
Owner

axodox commented Apr 2, 2024

I am preparing a larger reorganization of the code on a branch to make it more flexible for future development, I will migrate your change once I finish it.

Currently I am also working on a change for DirectML ONNX executor which should reduce VRAM usage a lot, particularly for VAE decode, where it could be reduced by 75% or more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants