Extensions/OdinSam CLIPTextEdit
ComfyUI Extension

OdinSam CLIPTextEdit

CLIP text editor with positive and negative conditioning. Zero-out clears and hides the negative prompt.

By odinGitGmail·Created a day ago·Updated a day ago· 0
odinGitGmail/ComfyUI-Odinsam-CLIPTextEdit
Nodes—
On cloudLocal install
Stars0
Updateda day ago
Readme
<div align="center"> <h1>OdinSam CLIPTextEdit</h1> <p> <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg"></a> <a href="pyproject.toml"><img alt="Version" src="https://img.shields.io/badge/version-0.1.0-blue.svg"></a> <a href="https://github.com/comfyanonymous/ComfyUI"><img alt="ComfyUI" src="https://img.shields.io/badge/ComfyUI-Custom%20Node-00b894.svg"></a> <a href="https://www.python.org/"><img alt="Python" src="https://img.shields.io/badge/Python-%3E%3D3.9-3776AB.svg"></a> <a href="https://registry.comfy.org"><img alt="Registry" src="https://img.shields.io/badge/Registry-odinsam--clip--text--edit-6c5ce7.svg"></a> </p> <p> <a href="README.md">English</a> · <a href="README.zh-CN.md">中文</a> </p> <p> ComfyUI <b>CLIP text editor</b>: one CLIP, positive and negative multiline prompts, two <code>CONDITIONING</code> outputs. Turning on zero-out clears and hides the negative prompt and sends a zero conditioning on the negative socket. </p> <p> <b>Node:</b> <code>CLIPTextEdit</code> / CLIP 文本编辑 (OdinSam)<br> <b>Category:</b> <code>OdinSam/CLIPTextEdit</code> · <b>Registry:</b> <code>odinsam-clip-text-edit</code> </p> <p> <img src="docs/images/node.png" alt="CLIP text editor node" width="420"> </p> </div>

Features

| Feature | Notes | |---------|--------| | CLIP | One CLIP input on the left, shared by both prompts | | Zero-out | First widget row. Default off | | Prompts | Two multiline boxes: positive and negative. Weights and {} dynamic prompts match CLIP Text Encode | | Outputs | Both sockets stay: positive conditioning, negative conditioning | | Zero-out off | Each side is encoded from its own text. An empty negative prompt encodes an empty string | | Zero-out on | The negative prompt is cleared and hidden. Its socket stays connected and outputs a zero conditioning with the same shape as the positive one, matching Conditioning Zero Out | | Turn zero-out off again | The negative box comes back empty. The previous text is not restored | | OdinSamKit | Optional: skinned labels and the same visibility rule |

OdinSamKit

Business logic does not require KIT. Without it the node still runs (web/clip_text_edit.js hides and clears the negative prompt).

| Item | Requirement | |------|-------------| | Minimum KIT version | OdinSamKit ≥ 0.2.0 | | Check | Browser console: window.OdinSamKit.version | | Relationship | Weak / optional enhancement |

Embedded config includes labels and visibility (show the negative prompt when 零化 is off; no section headers, same style as FormatPaths).

Install

cd ComfyUI/custom_nodes
git clone https://github.com/odinGitGmail/ComfyUI-Odinsam-CLIPTextEdit.git CLIPTextEdit
# optional UI kit
git clone <OdinSamKit-repo> OdinSamKit

Restart ComfyUI. Node: CLIP 文本编辑 (OdinSam) under OdinSam/CLIPTextEdit.

Or install via Comfy Registry / Manager: odinsam-clip-text-edit.

Minimal wiring

[Load CLIP] → clip
Fill the positive and negative prompts on the node
正向条件 → [KSampler] positive
负向条件 → [KSampler] negative

Turn on 零化 when the negative prompt is unused. The negative link can stay on the sampler; it receives a zero conditioning.

Example:

零化 = off
positive = a cat
negative = blurry
positive conditioning = encode "a cat"
negative conditioning = encode "blurry"

零化 = on
negative prompt is cleared and hidden
positive conditioning = encode "a cat"
negative conditioning = a zero conditioning with the same shape

License

MIT