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.
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.