ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Add sampler_pre_cfg_function

Open Extraltodeus opened this issue 1 year ago • 1 comments

Hello!

I am submitting this pull request to add an iterable pre-CFG function entry in the model options.

This modification will enable reworking the predictions before the CFG function, allowing for a wide range of possibilities.

For example, in this node, I subtract something from the previous step to make everything sharper. It would be convenient to be able to do it beforehand as it is not required to do this particular modification within the CFG function.

Additionally, this will allow adding "on the fly" options like perp-neg without requiring a guider. The theoretical function could modify the predictions as needed and then return them seamlessly, enabling this capability without exclusively using the CFG function.

Extraltodeus avatar Jul 09 '24 02:07 Extraltodeus

example nodes using this feature:

https://github.com/Extraltodeus/temp/tree/main/perp_neg_pre_cfg

example workflow:

01143UI_00001_

Extraltodeus avatar Jul 09 '24 07:07 Extraltodeus