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

bugfix: updated scaling factor for SDXL #300

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lopez-hector
Copy link
Contributor

@lopez-hector lopez-hector commented Nov 13, 2023

Updating the scale factor for SDXL. Using the prior scale factor results in hazy images. Updated scale factor is from https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/vae/config.json

with updated scale factor (0.13025):

_randomSeed_5893757_13-10:09:45_numInferenceSteps25

with prior scale factor (0.18215):

_randomSeed_5893757_13-10:05:27_numInferenceSteps25

Thank you for your interest in contributing to Core ML Stable Diffusion! Please review CONTRIBUTING.md first. If you would like to proceed with making a pull request, please indicate your agreement to the terms outlined in CONTRIBUTING.md by checking the box below. If not, please go ahead and fork this repo and make your updates.

We appreciate your interest in the project!

Do not erase the below when submitting your pull request:
#########

  • I agree to the terms outlined in CONTRIBUTING.md

Copy link
Contributor

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

latents = 1 / 0.18215 * latents

if self.xl:
scaling_factor =0.13025
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
scaling_factor =0.13025
scaling_factor = 0.13025

@cchance27
Copy link

any chance this is getting merged soon?

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.

4 participants