Skip to content

Conversation

@kabachuha
Copy link
Collaborator

@kabachuha kabachuha commented Sep 25, 2022

Overview

This pull-request adds prompt-weighting to Deforum. Gently borrowed from webui.

At this time, only numeric weight values are supported. You can set them by adding colons after the prompt's parts.

Example: painting of bacon:0.75 eggs:0.25 by greg rutkowski.

Then they are normalized by the total sum.

You can also use weights as math functions from the frame number t if you frame them with `-characters

painting of bacon:`cos(2*3.14*t/20)` eggs:`sin(2*3.14*t/20)` by greg rutkowski

Showcase

Positive prompt weighting

a beautiful portrait of a woman:0.75 in forest:0.25, green dress, by Artgerm, Asher Brown Durand, trending on Artstation

unknownw1

a beautiful portrait of a woman:0.25 in forest:0.75, green dress, by Artgerm, Asher Brown Durand, trending on Artstation

unknownw2

Negative prompt weighting

Negative weights are used to reduce the presence of features

a beautiful portrait of a woman:0.75 in forest:0.25, hair:-1, green dress, by Artgerm, Asher Brown Durand, trending on Artstation

hair_minus_one

a beautiful portrait of a woman:0.25 in forest:0.75, hair:2, green dress, by Artgerm, Asher Brown Durand, trending on Artstation

hair_two


TODO

As more quality of life enhancements have been proposed for this feature, it is still considered WIP with the plan as follows:

  • numeric weighting
  • negative weighting
  • dynamic weighting (weights as math functions from frame numbers)

bracket weighting later

finally_w

@kabachuha kabachuha changed the base branch from main to dev September 25, 2022 22:18
@kabachuha kabachuha changed the title Finally! Weighted prompts [WIP and broken] Weighted prompts Sep 27, 2022
@kabachuha
Copy link
Collaborator Author

Prompt weight worsen the quality of images for some unknown reason, even breaking the pictures apart in some cases. We need to find a way to fix this bug.

@kabachuha
Copy link
Collaborator Author

@kabachuha
Copy link
Collaborator Author

Also, made it toggleable in the setting, so the newer users wouldn't mess up their creations immediately

@kabachuha kabachuha marked this pull request as ready for review September 28, 2022 19:06
@kabachuha kabachuha changed the title [WIP and broken] Weighted prompts [hopefully fixed] Weighted prompts Sep 28, 2022
@kabachuha kabachuha changed the title [hopefully fixed] Weighted prompts [fixed] Weighted prompts Sep 28, 2022
@enzymezoo-code enzymezoo-code merged commit af95938 into deforum-art:dev Sep 30, 2022
@kabachuha
Copy link
Collaborator Author

kabachuha commented Oct 3, 2022

Add a demo for MATH

baconeggs

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.

2 participants