Nucleus-Image Text Encode (Dual):
NucleusImageTextEncodeDual converts two text prompts into conditioning for a Nucleus-Image workflow: one for the desired image and one for what you want to avoid. It processes both prompts during a single text-encoder model load, rather than loading the model separately for each prompt. The implementation describes this as avoiding a second load of an approximately 8.2 GB model and roughly halving encoding time; your actual time savings will depend on your system. The node encodes the prompts separately, preserving their distinct roles for later steps in the workflow.
Nucleus-Image Text Encode (Dual) Input Parameters:
text_encoder
A required NUCLEUS_TE input that provides the text-encoder resource. The node uses its model path to load the encoder that turns your prompts into conditioning. Connect a compatible Nucleus text-encoder output here; ordinary text or a different model type will not serve the same purpose. No default, minimum, maximum, or selectable options are specified.
positive_text
A required, multiline STRING field for the text you want encoded as positive conditioning. Write the description you want the image workflow to follow here; changing this text changes the positive conditioning produced by the node. The default is an empty string. No minimum or maximum text length is specified in the interface, although the implementation processes text with a maximum tokenized length of 1,024 and enables truncation, so content beyond that limit may not be represented.
negative_text
A required, multiline STRING field for the text you want encoded as negative conditioning. Use it to describe qualities you want the subsequent image workflow to avoid; changing it changes the negative conditioning produced by this node. The default is an empty string. No minimum or maximum text length is specified in the interface, but the same 1,024-token processing limit and truncation apply.
Nucleus-Image Text Encode (Dual) Output Parameters:
positive
A NUCLEUS_CONDITIONING value created from positive_text. It contains prompt_embeds, the encoded representation of the prompt, and prompt_mask, which identifies relevant positions when a mask is needed. If every position is attended, the node sets the mask to None. Connect this output to a downstream input expecting positive Nucleus conditioning; it is not a readable text prompt or a finished image.
negative
A NUCLEUS_CONDITIONING value created from negative_text. It has the same prompt_embeds and prompt_mask structure as the positive output, but represents the separately encoded negative prompt. Connect it to a downstream input expecting negative Nucleus conditioning. The meaning and effect of that conditioning depend on the downstream image-generation workflow.
Nucleus-Image Text Encode (Dual) Usage Tips:
- Connect a compatible
NUCLEUS_TEresource before running the node; the implementation requires a model path from that resource. - Put what you want to see in
positive_textand what you want to avoid innegative_text, then connect the two outputs to their corresponding downstream inputs. - Keep the most important prompt details early and concise. Tokenization is capped at 1,024 tokens with truncation enabled, so later content in a very long prompt may be discarded.
- Use this dual node when your workflow needs both positive and negative conditioning: it loads the text-encoder model once for both encodings. The model still needs sufficient memory to load and run.
Nucleus-Image Text Encode (Dual) Common Errors and Solutions:
Missing required input: text_encoder
- Explanation: The node cannot load a text encoder without its required
NUCLEUS_TEconnection. The exact wording of a missing-input message depends on the host application. - Solution: Connect a compatible Nucleus text-encoder resource to
text_encoderand run the workflow again.
KeyError: 'model_path'
- Explanation: The supplied
text_encodervalue does not contain themodel_pathentry that this implementation reads. This can indicate an incompatible or incomplete upstream resource. - Solution: Check the upstream node and reconnect an output that supplies a valid
NUCLEUS_TEresource with its model path.
FileNotFoundError or OSError while loading the text encoder or processor
- Explanation: The implementation loads model weights, a text-encoder configuration, and processor files. A missing or inaccessible required file can stop encoding. The precise error message depends on which file failed to load.
- Solution: Check that the Nucleus-Image installation and its required model, configuration, and processor files are present in their expected locations and readable by the application.
ModuleNotFoundError: No module named 'transformers'
- Explanation: The implementation imports components from
transformerswhen the node runs; this error means that package is unavailable in the application's Python environment. - Solution: Install the dependencies required by your Nucleus-Image installation into the same Python environment used by the application, then restart it.
CUDA out of memory
- Explanation: Loading and running the text encoder on the selected device can exceed available GPU memory. Loading it once for both prompts reduces repeated loading, but does not remove its memory requirement.
- Solution: Free GPU memory used by other tasks, close other model-heavy applications or workflows, and retry on hardware with enough available memory.
Model-loading or device compatibility error
- Explanation: The node constructs the encoder in
bfloat16and loads its weights onto the selected device. An incompatible device, weights, or software environment can cause a failure during model loading or inference; the exact message depends on the underlying library. - Solution: Confirm that the selected device and installed software support the required model operations, and that the model weights match your Nucleus-Image installation.
