Should resolve #12 and kinda resolves #28 (incorporates functionality from negpip node but still makes it incompatible)
Based on https://github.com/laksjdjf/cd-tuner_negpip-ComfyUI
Makes it possible to use negative weights in prompts.
Since patching attn2 is required for negpip to work, it's necessary to hook into default sd1_clip.ClipTokenWeightEncoder.encode_token_weights function.
Without negative weights everything should work exactly the same.
Not sure if the part under opts.prompt_mean_norm is correct (it works for negative weights, but the means for zk and zv are different, could lead to some strange effects)
Should resolve #12 and kinda resolves #28 (incorporates functionality from negpip node but still makes it incompatible)
Based on https://github.com/laksjdjf/cd-tuner_negpip-ComfyUI Makes it possible to use negative weights in prompts. Since patching attn2 is required for negpip to work, it's necessary to hook into default
sd1_clip.ClipTokenWeightEncoder.encode_token_weights
function.Without negative weights everything should work exactly the same.
Not sure if the part under
opts.prompt_mean_norm
is correct (it works for negative weights, but the means for zk and zv are different, could lead to some strange effects)