ComfyUI_Cutoff  by BlenderNeko

ComfyUI nodes for localized prompt control

created 2 years ago
387 stars

Top 75.2% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a ComfyUI implementation of "Cutoff," a technique for precisely controlling prompt attribute influence in Stable Diffusion. It allows users to isolate specific word meanings within a prompt, preventing unintended attribute bleeding (e.g., ensuring "blue" modifies "hair" and not "shoes"). This is beneficial for users seeking finer-grained control over image generation and prompt interpretation.

How It Works

Cutoff operates by manipulating CLIP embeddings. It identifies tokens within a prompt and generates alternative embeddings where specific tokens are masked. By calculating the difference between the original and masked embeddings, it creates a directional vector that isolates the intended meaning of a token. This directional vector is then used to guide the diffusion process, enhancing control over attribute assignment within the generated image. The implementation uses three ComfyUI nodes: Cutoff BasePrompt, Cutoff Set Region, and Cutoff Regions To Conditioning (with an ADV variant for advanced weighting).

Quick Start & Requirements

  • Install via ComfyUI custom nodes manager or by cloning the repository into the custom_nodes directory.
  • Requires ComfyUI and its dependencies.
  • No specific hardware requirements beyond those for ComfyUI itself.
  • Example workflows and images are provided in the repository.

Highlighted Details

  • Enables precise control over attribute assignment in prompts (e.g., color to specific objects).
  • Offers fine-grained masking and directional embedding manipulation.
  • Includes an advanced node variant for nuanced prompt weighting interpretation.
  • Nodes are available under the conditioning > cutoff category in ComfyUI.

Maintenance & Community

  • Developed by BlenderNeko.
  • No specific community links (Discord/Slack) or roadmap are mentioned in the README.

Licensing & Compatibility

  • The repository does not explicitly state a license.
  • Compatibility with SDXL is noted as functional but potentially less effective in earlier versions (e.g., 0.9).

Limitations & Caveats

The README notes that while functional with SDXL, effectiveness may vary, particularly with older versions. The absence of an explicit license could pose compatibility concerns for commercial or closed-source projects.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
1
Star History
5 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.