shiimizu/ComfyUI_smZNodes

Custom nodes for ComfyUI such as CLIP Text Encode++

📦 Project: ComfyUI_smZNodes

What it is

  • A small collection of custom nodes that extend ComfyUI, a node‑based graphical front‑end for running Stable Diffusion (and similar text‑to‑image diffusion models).
  • The main contribution is the CLIP Text Encode++ node, which reproduces the exact text‑embeddings that the popular AUTOMATIC1111 stable-diffusion-webui generates. This lets you get pixel‑identical results when you switch between the two UIs.
  • A companion Settings node lets you tweak tokenisation and sampling parameters on‑the‑fly, mirroring options found in stable-diffusion-webui.

🎯 Core Features (as described in the README)

Feature What it does
CLIP Text Encode++ Parses prompts exactly like AUTOMATIC1111, supporting prompt‑editing syntax (alternating words, AND, BREAK, weight normalization, optional embedding: prefix). Produces the same CLIP embeddings as the web UI, so generated images match when the rest of the pipeline is identical.
Multiple parsers Choose between comfy (default), comfy++, A1111, full, compel, and fixed attention. All except comfy use the stable‑diffusion‑webui encoding pipeline.
Weight handling Normalizes prompt weights the same way the web UI does; you can also enable the old emphasis implementation for legacy seeds.
Settings node A dynamic, reroute‑style node that can be linked to CLIP Text Encode++ to locally override tokenisation or sampling settings without rebuilding the whole workflow.
Reproducibility tips Guidance on seed handling, sampler choice, RNG, and other knobs that affect deterministic output across the two UIs.

📥 Installation Options (straight from the README)

  1. ComfyUI‑Manager – Open the manager, search for smZNodes, and click install.
  2. Manual clone
    cd path/to/ComfyUI/custom_nodes
    git clone https://github.com/shiimizu/ComfyUI_smZNodes.git
    
  3. Download ZIP – Grab the archive from the GitHub page, unzip into your custom_nodes folder, then restart ComfyUI.

Updating – Either use the manager’s “update” button or run git pull inside the extension folder.


🛠️ How to use the nodes (README‑based workflow)

  1. Add a CLIP Text Encode++ node to your graph.
  2. Choose a parser (e.g., A1111) that matches the web UI you want to emulate.
  3. Write your prompt using the web UI’s syntax (e.g., a cat :1.2 AND a dog BREAK a bird).
  4. (Optional) Connect a Settings node to the CLIP input of the encoder to tweak mean_normalization, multi_conditioning, or the old emphasis flag.
  5. Feed the resulting CLIP embedding into the rest of your diffusion pipeline (model loader, sampler, etc.).
  6. Use the same seed, sampler settings, and CLIP‑skip as you would in stable-diffusion-webui to obtain matching images.

📚 Documentation & Resources

  • Prompt‑editing reference – AUTOMATIC1111 wiki links are included in the README.
  • Composable diffusion – The AND keyword follows the paper Compositional Visual Generation with Composable Diffusion Models.
  • Further reading – Links to ComfyUI FAQs, BlenderNeko’s docs, and the community guide site are provided for deeper understanding of weight handling.

🙏 Credits

The extension builds on work from:

  • AUTOMATIC1111stable-diffusion-webui
  • comfyanonymousComfyUI
  • vladmandicSD.Next
  • lllyasvielstable-diffusion-webui-forge

📌 TL;DR

ComfyUI_smZNodes adds a CLIP encoder node that mimics the exact tokenisation and embedding logic of the popular AUTOMATIC1111 web UI, plus a flexible Settings node. Install via ComfyUI‑Manager or a simple git clone, drop the nodes into your workflow, and you can reproduce the same images across both UIs with minimal hassle.

Related

  • Project
  • Project
  • Project
  • Project
  • Project