Nodes/ComfyUI-MoonNodes/πŸŒ— Moon Anima Regional Patcher (Advanced)
ComfyUI Node

πŸŒ— Moon Anima Regional Patcher (Advanced)

The one Anima regional node that knows when to stop masking

By m0rtus59Β·Created 4 months agoΒ·Updated 17 days agoΒ· 7
πŸŒ— Moon Anima Regional Patcher (Advanced)
  • model
  • clip
  • mask_list
  • patched_model
  • POSITIVE
  • NEGATIVE
β—„positive_textduo, outdoors, oil painting BREAK anthro lynx BREAK anthro tigerβ–Ί
β—„negative_textlow quality, blurry, deformedβ–Ί
β—„prompt_modebase_onlyβ–Ί
β—„conditioning_start_percent0.00β–Ί
β—„conditioning_dropoff1.00β–Ί
β—„base_strength0.80β–Ί
β—„start_percent0.00β–Ί
β—„end_percent1.00β–Ί
β—„cross_mask_strength1.00β–Ί
β—„self_mask_strength0.00β–Ί
β—„base_ratio0.00β–Ί

The plain Moon Anima Regional Patcher does the attention masking and expects you to hand it pre-encoded conditioning lists. This Advanced version is the one you'll actually reach for on a two-character scene, because it does the encoding for you and - the genuinely clever part - knows when to stop masking and let the whole canvas blend back together. That scheduling is what separates "two clean characters" from "two characters with a visible seam down the middle."

What changed

Instead of wiring in a Moon Indexed Encoder, you get a single multi-line positive_text box. Type the base prompt, then BREAK on its own line, then one prompt per region:

duo, outdoors, oil painting
BREAK
anthro lynx
BREAK
anthro tiger

The node splits on BREAK, encodes each part with your clip (the Qwen3-0.6B encoder that ships with Anima), and attaches each prompt to the matching mask in mask_list. Region N's prompt pairs with mask N, same indexing as the standard patcher.

The inputs that matter

  • prompt_mode - decides what the POSITIVE output actually carries. base_only passes just the base prompt (the safe default). concat_text and concat_conditioning glue everything into one pass for stronger multi-character interaction. merge_average blends all conditionings into a single average embedding. comfy_area_conditioning emits a standard ComfyUI area-conditioning list with the masks attached - useful if you want to hand regions to nodes that expect that format.
  • conditioning_dropoff - the headline feature. At whatever point you set (0.40–0.60 works well), the node switches from your selected mode to clean base-only conditioning for the rest of the run. Early steps need the full regional text to lock in poses and composition; late steps just want to refine detail without the regional noise. Default 1.0 keeps the mode all the way through - which, per the community consensus on this technique, is exactly how you get seams.
  • cross_mask_strength (1.0), self_mask_strength (0.0), base_strength (0.8) and base_ratio (0.0) - identical to the standard patcher. Raise self-masking only if bounds leak, and remember base_ratio above 0 doubles per-step cost.

Wiring it up

model (Anima) and clip (from a Qwen CLIPLoader) in, patched_model out to your KSampler. POSITIVE and NEGATIVE come out fully built - you don't need a separate CLIP Text Encode anywhere in the regional chain. negative_text is applied globally as you'd expect.

Install and gotchas

cd ComfyUI/custom_nodes
git clone https://github.com/m0rtus59/ComfyUI-MoonNodes.git
cd ComfyUI-MoonNodes
pip install -r requirements.txt

Restart after, or install via ComfyUI Manager (search "ComfyUI-MoonNodes"). The only pinned dependency is google-genai, and it's imported at pack load time by the Gemini nodes - so yes, you need it even if you never touch Gemini, or the whole pack vanishes from your node list.

The usual traps: the inputs are list-typed and positive_list[0] - your base prompt - must exist or you get a runtime error; extra masks beyond your encoded prompts are silently ignored. The pack ships example workflows in its workflows/ folder, which is the fastest way to see the whole chain in one go.

When to use it

Any time you're regional prompting on Anima and you'd rather type than wire encoders. The conditioning dropoff is the reason to prefer this over the standard node - it's the "end masking early" best practice from the regional-prompting playbook, baked into a single slider instead of left to your discipline.

CategoryMoonNodes

Inputs (14)

NameTypeDefaultDescription
modelMODELThe Anima diffusion model to patch with regional conditioning.
clipCLIPThe CLIP / Qwen text encoder used to tokenize and encode prompts.
mask_listMASKList of spatial masks corresponding to regional prompt zones (Zone 0, Zone 1, ...).
positive_textSTRINGduo, outdoors, oil painting BREAK anthro lynx BREAK anthro tigerMulti-line prompt. Use 'BREAK' on its own line or between phrases to separate the base prompt from regional prompts.
negative_textSTRINGlow quality, blurry, deformedNegative prompt applied across the generation.
prompt_modeCOMBObase_only- base_only: passes only prompt 0 (base) to POSITIVE output. - concat_text: replaces BREAK with a newline for a single natural language encoding pass. - concat_conditioning: concatenates individual conditioning tensors. - merge_average: blends/averages all conditionings into a single embedding. - comfy_area_conditioning: outputs standard ComfyUI area-conditioning list with spatial masks attached.
conditioning_start_percentFLOAT0.000–1Sampling percentage (0.0 to 1.0) when the selected prompt mode begins. Before this point, only the clean base prompt is applied.
conditioning_dropoffFLOAT1.000–1At what point in generation (0.0 to 1.0) the prompt switches back to 'base_only'. Default 1.0 uses the selected mode all the way through. Setting to e.g. 0.40–0.60 uses concatenated/merged conditioning for early poses/composition, then drops off to clean base conditioning to eliminate noise and refine sharp details.
base_strengthFLOAT0.800–1How much the global base prompt affects regional zones. Higher values blend more shared style/lighting into regions; lower values isolate the regional prompt.
start_percentFLOAT0.000–1Sampling percentage (0.0–1.0) when regional conditioning starts being applied.
end_percentFLOAT1.000–1Sampling percentage (0.0–1.0) when regional conditioning stops being applied.
cross_mask_strengthFLOAT1.000–1Cross-attention isolation between distinct regions (Zone A vs Zone B). 1.0 blocks bleed-through; lower values allow soft cross-regional influence.
self_mask_strengthFLOAT0.000–1Spatial self-attention isolation between regions. 0.0 maintains global scene coherence (shared lighting, perspective); higher values isolate spatial patches.
base_ratioFLOAT0.000–1Direct blend ratio with the un-partitioned base generation. 0.0 is pure regional output. Values > 0 blend in the global base image (runs the model twice per step).

Outputs (3)

NameTypeDescription
patched_modelMODELβ€”
POSITIVECONDITIONINGβ€”
NEGATIVECONDITIONINGβ€”