⌘ CLIP Text Encode (Illustrious):
IllustriousCLIPTextEncoder prepares a prompt for an Illustrious-oriented image-generation workflow and encodes it with a CLIP text encoder. It can standardize common tag spellings, arrange recognized tags into a consistent order, apply tag weights, convert a small set of phrases, and attempt to reduce excessive token padding before encoding. These changes can make a tag-based prompt easier to organize and inspect, but they do not guarantee a better image: their effect depends on the connected model and the words in your prompt. The node also produces a readable report so you can see what it changed.
⌘ CLIP Text Encode (Illustrious) Input Parameters:
clip
Required CLIP input. Connect the CLIP text encoder supplied with your base model. The node uses it to tokenize and encode the finished prompt, and to obtain the pooled information included in its conditioning result. It also attempts to apply clip_skip when the connected CLIP object exposes a layer_idx setting. There is no numeric range or default; you must provide a compatible CLIP connection.
text
Required STRING input containing the prompt you want to encode. The field supports multiple lines and defaults to masterpiece, best quality, 1girl. Comma-separated tags work particularly well because the ordering and weighting steps split the prompt at commas. Your wording may be changed by enabled processing options before encoding. There is no specified minimum or maximum length.
illustrious_version
Optional version hint with the options auto, v0.1, v1.0, v1.1, and v2.0; the default is auto. This does not switch or load a model. When tag optimization is enabled, v0.1 can add masterpiece, v1.0 and v1.1 can add very_aesthetic or anime_style, and v2.0 can add high_resolution under the conditions in the code. Hybrid phrase conversion runs only when this setting is explicitly v1.1 or v2.0; auto does not trigger those version-specific additions or conversions.
enable_tag_optimization
Optional BOOLEAN, default True; its available settings are True and False. When enabled, the node changes listed space-separated tag variants into underscore forms, such as best quality to best_quality, and may add tags according to illustrious_version. Turn it off when you want to preserve those words or avoid automatic version-specific additions. Its replacements operate on matching text, so review the final prompt when wording matters.
enable_padding_fix
Optional BOOLEAN, default True; its available settings are True and False. When enabled, the node tokenizes the processed prompt and checks token batches that expose input_ids. If it finds more than 70% zero-valued tokens in such a batch, it trims the token IDs and, when present, the attention mask before encoding. Other token structures may pass through unchanged. Turn it off to use the normal tokenize-and-encode path without this attempted adjustment.
auto_tag_ordering
Optional BOOLEAN, default True; its available settings are True and False. When enabled, the node splits text at commas and moves recognized tags into its predefined category order: quality and specialty tags first, followed by rating, character, composition, background, lighting, and style-related tags; unrecognized tags follow. This can make a tag list more consistent, but it also changes the sequence you wrote. Turn it off when prompt order is intentional.
danbooru_weighting
Optional BOOLEAN, default True; its available settings are True and False. When enabled, the node examines comma-separated tags and writes weighted prompt text for tags matching its built-in category lists or weight table. The three boost settings affect their corresponding recognized categories; a separate built-in weight table applies to some other recognized tags. This is a fixed mapping in the supplied source, not a database lookup during encoding. Turn it off if you want the node to leave weighting unchanged, particularly when your prompt already contains carefully chosen weights.
clip_skip
Optional INT from 1 to 12, default 2. The node attempts to encode using the CLIP layer counted this many positions back from the end. A different value can change how the prompt is represented, but no value is guaranteed to suit every model. The setting takes effect through layer_idx only when the connected CLIP object exposes that attribute; otherwise, the node encodes without applying its layer-setting step.
quality_boost
Optional FLOAT from 0.5 to 2.0, default 1.0, adjustable in steps of 0.1. When danbooru_weighting is enabled, this multiplies the weight of tags recognized in the node’s quality or Illustrious-specialty categories. For example, masterpiece is a recognized quality tag. Values above 1.0 increase the written weight and values below 1.0 reduce it. This setting does not affect tags outside those categories through the category-boost branch.
character_boost
Optional FLOAT from 0.5 to 2.0, default 1.0, adjustable in steps of 0.1. When danbooru_weighting is enabled, this multiplies weights for tags in the node’s character-count and character-feature lists, such as 1girl or long_hair after optimization. Use it to adjust the emphasis assigned to recognized character tags; it does not generally apply to every word describing a person.
composition_boost
Optional FLOAT from 0.5 to 2.0, default 1.0, adjustable in steps of 0.1. When danbooru_weighting is enabled, this multiplies weights for exact tags in the node’s composition list, including portrait, full body, and close-up. It lets you adjust the emphasis assigned to recognized framing or viewpoint tags, but it does not affect arbitrary descriptions of composition.
enable_hybrid_mode
Optional BOOLEAN, default False; its available settings are True and False. When enabled with illustrious_version explicitly set to v1.1 or v2.0, the node attempts a small set of phrase conversions, such as beautiful girl to 1girl, beautiful. It runs after optimization, ordering, and weighting, so newly created tags are not processed again by those earlier steps. With auto, v0.1, or v1.0, it leaves the prompt unchanged and records that hybrid mode is supported only for v1.1+ versions.
⌘ CLIP Text Encode (Illustrious) Output Parameters:
conditioning
The CONDITIONING output is the encoded form of the processed prompt for a downstream node that accepts conditioning. It contains the CLIP conditioning data and a pooled_output value from the connected encoder. This is the output to connect to the next stage of your image-generation workflow; it is not readable prompt text or an image. Its content depends on the final prompt, the connected CLIP encoder, and any effective CLIP-skip or padding adjustment.
processed_prompt
The STRING output is a processing report, not just the final prompt by itself. It includes the selected version hint, original and processed comma-separated tag counts, a numbered log when changes were recorded, and a Final Prompt section showing the text sent for tokenization and encoding. Use that section to check whether tags were added, reordered, or weighted as you intended. Padding and CLIP-skip operations may also affect encoding, but they do not rewrite the displayed final prompt.
⌘ CLIP Text Encode (Illustrious) Usage Tips:
- Start with comma-separated tags and inspect
processed_promptafter your first run. The node’s ordering, weighting, and reported tag counts all treat commas as separators. - Keep
illustrious_versionatautowhen you do not want an explicit version hint. Selectv1.1orv2.0if you specifically want to testenable_hybrid_mode, sinceautodoes not activate its phrase conversions. - If you have deliberately arranged your tags, turn off
auto_tag_ordering. If you have deliberately written weights, compare the report withdanbooru_weightingon and off before using the result. - Adjust one boost at a time while testing:
quality_boostaffects recognized quality and specialty tags,character_boostaffects recognized character tags, andcomposition_boostaffects recognized composition tags. - Check the
Final Promptfor repeated tags whendanbooru_weightingis on. In the supplied code, a recognized category tag can be appended twice when its applicable boost is1.0. - Leave
enable_padding_fixon only if it works with your connected CLIP encoder’s token structure. If encoding fails on the token path, turn it off and test the standard path. - Treat
clip_skipas a setting to test with your particular encoder. If changing it produces no difference, the connected CLIP object may not expose thelayer_idxattribute this node uses.
⌘ CLIP Text Encode (Illustrious) Common Errors and Solutions:
Hybrid mode only supported for v1.1+ versions
- Explanation: This is a processing-report entry, not a crash. Hybrid mode was enabled while
illustrious_versionwasauto,v0.1, orv1.0, so no hybrid conversion was made. - Solution: Set
illustrious_versionexplicitly tov1.1orv2.0, or turn offenable_hybrid_mode.
Missing or incompatible clip connection
- Explanation: The node needs a CLIP connection that can tokenize text and encode tokens. Without one, the workflow cannot produce conditioning.
- Solution: Connect the CLIP output from a compatible base-model loader to
clip, then run the workflow again.
AttributeError involving tokenize
- Explanation: The connected object does not provide the
tokenizemethod the node calls before encoding. - Solution: Check that
clipreceives a compatible CLIP encoder rather than a model, VAE, or other connection.
AttributeError involving encode_from_tokens
- Explanation: The connected CLIP object cannot perform the token-encoding call used by this node.
- Solution: Reconnect a compatible CLIP encoder. Turning off
enable_padding_fixalone will not bypass this call; both encoding paths use it.
ValueError: not enough values to unpack during encoding
- Explanation: The node expects
encode_from_tokens(..., return_pooled=True)to return two values: conditioning and pooled output. A connected encoder returning a different shape can cause this error. - Solution: Use a CLIP encoder compatible with that call and its pooled-output response.
Token or padding-related error with enable_padding_fix on
- Explanation: The padding step assumes that token batches exposing
input_idssupport the operations used to count and trim zero-valued tokens. A different token structure may not support those operations. - Solution: Turn off
enable_padding_fixand retry. If that resolves the error, keep it off for that encoder.
Prompt weights or tags look duplicated in Final Prompt
- Explanation: This is a result issue rather than necessarily an error message. The supplied weighting logic can append a recognized category tag twice when its applicable boost is
1.0. - Solution: Inspect
processed_prompt; turn offdanbooru_weightingif the resulting prompt is not what you want.
Phrase remains unchanged with enable_hybrid_mode on
- Explanation: Hybrid conversion covers only a short, fixed list of phrases. It also runs after other text changes, which may remove the exact phrase it looks for.
- Solution: Confirm that
illustrious_versionisv1.1orv2.0, then check theFinal Prompt. For a dependable result, write the desired tags directly intext.
