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

Affect of 'scale' and negative prompt #11

Open
ArielReplicate opened this issue Feb 14, 2023 · 1 comment
Open

Affect of 'scale' and negative prompt #11

ArielReplicate opened this issue Feb 14, 2023 · 1 comment

Comments

@ArielReplicate
Copy link
Contributor

Hi,

I'm trying to understand the way the scale parameter affects the translation output.
The only information I found at the here was in the config file: "unconditional guidance scale. Note that a higher value encourages deviation from the source image"

Would you mind explaining how this parameter affect the translation and how it should be combined with other structure preserving control parameters like 'feature_injection_threshold' and the negative prompt parameters?

@tnarek
Copy link
Collaborator

tnarek commented Feb 18, 2023

hi @ArielReplicate, the scale parameter essentially controls the fidelity of the generated image to the target prompt, i.e. a higher value of scale makes the translated image more resembling of the target prompt. Higher values of scale are mostly necessary for translating real guidance images where the DDIM-inverted noise is restrictive and challenging to deviate from. Such cases mostly occur for primitive and textureless guidance images (e.g. segmentation masks, silhouettes, etc.). Note that too high values of scale might cause undesirable artifacts, such as over-saturated colors, so it should be balanced accordingly (we generally found scale ∈ [10, 15] to give a good tradeoff).

For deviating from the guidance image content, you can also use the negative prompt parameters, which in a sense have the opposite effect from scale as they indicate what the translated image should deviate from rather than to be faithful to. Note that the negative prompt can describe only a part of the guidance content that you wish to deviate from and doesn't have to describe the guidance image as a whole.

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

No branches or pull requests

2 participants