ComfyUI Node

Mojo Maker

One prompt box that feeds every encoder your model actually has

By Hellrunner2k·Created 2 years ago·Updated about a year ago· 2
Mojo Maker
  • Main_clip
  • Alternative_clip
  • Special_clip
  • Mojo_Intake
  • mask
  • Mojo
  • Conditioning
Phrases
Tags
Sentences
Mask_set_cond_areadefault
Mask_strength1.00
guidance3.5
width1024
height1024
crop_w0
crop_h0
target_width1024
target_height1024
step_start-1.000
step_end-1.000
Squeeze_Mojo_IntakeDisabled
Intake_Strength1.00
Conditioning_OutputMojo

Mojo Maker is the text encoder you actually wanted. Modern models don't have one text encoder - Flux has a CLIP and a T5, SDXL has two CLIPs, and newer models keep adding more. Mojo Maker is built around that reality: you feed it up to three clips, write your prompt in up to three styles, and it distributes each style to the encoder that speaks its language, then packages the whole thing into a "Mojo flow" you can save with Save Mojo and rebuild later with Mojo Loader. The author's demo file runs with SDXL, AuraFlow and Flux from the same .mojo, which is the whole game: model-agnostic conditioning.

The inputs that matter

  • Main_clip - required. The primary clip source.
  • Alternative_clip / Special_clip - optional extra clips to enrich token coverage. More clips = more encoders in the flow = more models the saved mojo can be re-encoded on.
  • Phrases - the "normal" prompt: comma-separated short phrases, object and detail focused. This targets the l, hydit_clip and h encoder spaces - the CLIP-style encoders.
  • Tags - simplified tag-based prompting (g space), strong conceptual influence. Think Danbooru-style tags.
  • Sentences - the epic novel input for t5xxl, pile_t5xl, mt5xl - the T5-style LLM encoders. The tooltip's advice is real: those want long descriptive prose, not tags.
  • guidance - default 3.5, the Flux-style simulated guidance written into the flow. Leave it unless you know your model's number.
  • width / height / crop_w / crop_h / target_width / target_height - the resolution package for SDXL/Pony-style encoders (current image and post-upscale target). These get stored in the mojo.
  • step_start / step_end - step-influence clamps, 0–1, <0 disabled. Set them to make a region's conditioning kick in or drop out across the denoise range.
  • mask + Mask_strength - weave a mask (your Mask-Map outputs) into the flow. Mask_set_cond_area chooses "default" (black pixel = tag at weight 0, blends well) vs "mask bounds" (black pixel = tag removed entirely, hard separation).
  • Squeeze_Mojo_Intake / Intake_Strength - if you join an existing mojo in via Mojo_Intake, these merge it into the fewest possible slots (maskless flows only) and set the blend strength.
  • Conditioning_Output - Disabled, Mojo, or Mojo + Intake (Combine), controlling whether and how a CONDITIONING output is built.

How it works

The makeTik helper is the clever part. It tokenizes your Phrases with the clip, checks which tokenizer keys came back, and maps the three prompt styles onto whichever of l/g/t5xxl-family encoders exist. Same prompt text, three very different token spaces, all filled. The flow is a list of slots - one per clip - each carrying its tokens, its mask settings, and its guidance/resolution settings. If you leave a prompt field empty, it falls back to another one rather than failing.

Two gotchas worth knowing. First, the node validates that at least one of Phrases/Tags/Sentences is non-empty - an all-empty prompt is refused with "Nothing to convert." Second, the encoder-key matching is exact: if your model's T5 isn't one of the names in the tooltip's list, that part of the prompt simply won't land anywhere.

Installing it

Part of Hellrunner's Magical Nodes. Install via ComfyUI Manager (search "Hellrunner's Magical Nodes") or:

cd ComfyUI/custom_nodes
git clone https://github.com/Hellrunner2k/ComfyUI-HellrunnersMagicalNodes.git

Restart after. No extra dependencies - this node leans on ComfyUI's own CLIP tokenizing.

Troubleshooting

  • Prompt silently ignored? Check which encoder keys your model exposes (the flow is built from what tokenize returns). A model without a T5-style encoder ignores Sentences entirely.
  • "Nothing to convert" error on queue? All three prompt fields are empty. The node validates this at queue time, which trips people who wire prompt strings in late and forget they're still empty.
  • Mask doing nothing? Confirm Mask_strength is 1.0 (or your intended value) and Mask_set_cond_area matches how you want the region to blend. And a mask only matters if the downstream sampler honors mask conditioning.
CategoryHellrunner's/Mojo

Inputs (22)

NameTypeDefaultDescription
Main_clipCLIPMain Clip source
Alternative_clipoptCLIPAlternative Clip source. Enrich the possibilities of your Mojo
Special_clipoptCLIPYES... MORE.. more clip... or t5, who knows?!
Mojo_IntakeoptMOJOJoin the incoming Mojo Flow into the output
PhrasesoptSTRINGl,hydit_clip,h - Normal Prompt. Comma separated, short phrases. Object and detail focused. (Local, Character)
TagsoptSTRINGg - Simplified, tag-based prompting. Strong conceptional influence. (General, Action)
SentencesoptSTRINGt5xxl,pile_t5xl,mt5xl - Go nuts. Write an epic novel. But set the mood... the t5s want dinner first. ^^ Might be generalized and reliant on lower clip concepts.
Mask_set_cond_areaoptCOMBOdefaultMask area behavior. "default": black pixel = (tag:0) - merges well with other areas "mask bounds": black pixel = tag removed... off gone from vocabulary - hard separation
Mask_strengthoptFLOAT1.000–10Mask strength. leave at 1.0 if you are using Mask-Maps
guidanceoptFLOAT3.5-100–100Flux specific. Parameter for simulated guidance based on conditioning
widthoptINT10240–16384SDXL and Pony specific. Set the current image resolution to match the Mojo perfectly.
heightoptINT10240–16384SDXL and Pony specific. Set the current image resolution to match the Mojo perfectly.
crop_woptINT00–16384SDXL and Pony specific. Crop Factor Width
crop_hoptINT00–16384SDXL and Pony specific. Crop Factor Height
target_widthoptINT10240–16384SDXL and Pony specific. Set the target image resolution after upscale.
target_heightoptINT10240–16384SDXL and Pony specific. Set the target image resolution after upscale.
step_startoptFLOAT-1.000-1–1Step influence clamp start. Starts at 0-1. <0 Disabled
step_endoptFLOAT-1.000-1–1Step influence clamp end. Ends at 0-1. <0 Disabled
Squeeze_Mojo_IntakeoptCOMBODisabledMerge all Intake Mojo to the smallest possible count. Only maskless Mojo can be squeezed.
Intake_StrengthoptFLOAT1.000–1Mixing strength of the squeezed Intake.
Conditioning_OutputoptCOMBOMojoHow to construct the Conditioning Output. "Mojo + Intake (Combine)" is equivalent to the "Mojo (Combine)" Loader method
maskoptMASKWeave a Mask into the Mojo Flow

Outputs (2)

NameTypeDescription
MojoMOJOMojo Flow
ConditioningCONDITIONINGMain_clip Conditioning, if not "Disabled"