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 multiple scripts modifying latent #36

Merged
merged 15 commits into from
May 14, 2024
Merged

Support multiple scripts modifying latent #36

merged 15 commits into from
May 14, 2024

Conversation

v0xie
Copy link
Owner

@v0xie v0xie commented May 14, 2024

PAG and the upcoming S-CFG (#35) both modify the latent. Each implementation hijacks the original combine_denoised function which is cumbersome.

This PR defines a new class CFGCombiner which handles patching the combine_denoised function, and adds the guidance from each script in a deterministic way.

Also handles an error in cases where get_xyz_axis_options for scripts referenced in incantation_base are not implemented.

Scripts that wish to modify the latent have their parameters added to the StableDiffusionProcessing incant_cfg_params dict.

@v0xie
Copy link
Owner Author

v0xie commented May 14, 2024

It looks like PAG and SCFG are playing nicely together.
xyz_grid-3611-1-A brown stuffed animal laying in the aisle of a retail store

@v0xie v0xie merged commit e163e5d into dev May 14, 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.

1 participant