floyo logobeta logo
Powered by
ThinkDiffusion
floyo logobeta logo
Powered by
ThinkDiffusion

Negative Rejection Steering

7

Last updated
2025-04-14

NRS (Negative Rejection Steering) is an innovative extension designed for Forge-based user interfaces and ComfyUI, aimed at enhancing the generation process by replacing the traditional Classifier Free Guidance (CFG) with a more sophisticated steering mechanism. This tool allows users to achieve more refined and visually appealing outputs by providing greater control over the generation parameters.

  • NRS introduces three adjustable parameters—Skew, Stretch, and Squash—that collectively enhance the output quality and alignment with user-defined prompts.
  • The tool employs advanced mathematical techniques to manipulate the output tensor, allowing for a more nuanced approach to steering image generation away from undesirable elements.
  • Users can experiment with negative values for each parameter, offering a deeper understanding of how the model interprets prompts.

Context

NRS is an extension that enhances the functionality of ComfyUI by offering a replacement for the conventional CFG mechanism. Its primary goal is to provide users with a more effective and mathematically grounded method for steering the image generation process, allowing for more creative and visually compelling outputs.

Key Features & Benefits

NRS features three main parameters: Skew, Stretch, and Squash, each serving a distinct purpose in the image generation pipeline. Skew alters the direction of the generated output to minimize the influence of negative prompts, while Stretch amplifies the aspects of the positive prompts. Squash controls the intensity of these adjustments, enabling users to fine-tune the final output's quality and detail.

Advanced Functionalities

NRS operates through a three-step mathematical process: skewing, stretching, and squashing. Skewing modifies the conditioned output tensor to move away from negative influences, stretching enhances the alignment with positive prompts, and squashing adjusts the overall intensity of these effects. This advanced manipulation enables users to achieve more complex and tailored outputs compared to traditional CFG methods.

Practical Benefits

By integrating NRS into their workflows, users can significantly improve the quality and control of their image generation in ComfyUI. The ability to finely adjust Skew, Stretch, and Squash allows for greater artistic expression and precision, making it easier to create images that align closely with user intentions while minimizing unwanted elements.

Credits/Acknowledgments

This tool was developed by Reithan and is available under an open-source license. Contributions from the community have also played a role in its enhancement and functionality.