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 option to disable normalize embeddings after calculating emphasis #151

Closed
wants to merge 1 commit into from

Conversation

hako-mikan
Copy link
Contributor

@hako-mikan hako-mikan commented Feb 9, 2024

Description

In SDXL, there have been reports of artifacts occurring when combining prompts or using long prompts. I have discovered the cause of this phenomenon. It is the normalization that occurs after the calculation of emphasis. During this normalization, artifacts arise due to division by values close to zero and the inversion of signs. This normalization process dates back to the SD1.X era, where it seems to work well. However, in certain models of XL, it appears to have the opposite effect. Therefore, I will add an option to toggle this normalization on and off.
The detailed explanation can be found here or here(Japanese)

Checklist:

@catboxanon
Copy link
Collaborator

catboxanon commented Feb 9, 2024

Since this PR was also made upstream, it should (ideally) get merged there, and then it'll be synced to this repo, assuming I understood what was described in #80. PR #60 was closed for a similar reason.

This seems like something important to address in general for future PRs that modify modules that came from upstream, but that decision probably falls on @lllyasviel.

@lllyasviel
Copy link
Owner

yes prs related to webui should go upstream

@lllyasviel lllyasviel closed this Feb 9, 2024
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.

3 participants