Nodes/h4 ToolKit/h4 : The Varianator (v1.0.0)
ComfyUI Node

h4 : The Varianator (v1.0.0)

The Varianator

By m3rr·Created 11 months ago·Updated 2 months ago· 0
h4 : The Varianator (v1.0.0)
  • model
  • clip
  • vae
  • latent_in
  • positive_in
  • negative_in
  • style_positive_in
  • style_negative_in
  • variations
  • latent_batch
  • summary
variation_count4
variation_profilemoderate
seed_modeincrement
base_seed123456789
sampler_nameeuler
scheduler_namenormal
steps18
cfg7.0
go_ultrafalse
prompt_jitter_enabledfalse
prompt_jitter_strength0.15
prompt_jitter_tokens
style_mix_enabledfalse
style_mix_ratio0.35
base_positive_prompt
base_negative_prompt
style_mix_prompt
style_mix_negative_prompt
ultra_json_logtrue
ultra_cache_artifactstrue

You've got an image you mostly like. What you want is twenty takes on it - same composition, different vibe - not twenty rolls of the dice. The Varianator is built for exactly that: feed it a latent plus the model/VAE handles, and it re-samples that latent through controlled denoise windows to produce a stack of tight variations. "One latent in, multiple polished riffs out, with the audit trail attached" is the author's pitch, and it's accurate.

It's part of the h4 ToolKit, the small, openly-shelved pack from m3rr (zero search impressions - you're ahead of the crowd). The Varianator is one of the pack's more thoughtful pieces, and unlike a naive "just lower the denoise" approach it keeps seeds deterministic and logs everything, so a riff you like can be reproduced exactly.

How it works

The heart of it is the variation_profile, which maps to a curated denoise window:

  • minimal - 0.30–0.40: gentle pose tweaks, lighting nudges, fine color work.
  • moderate - 0.40–0.50: costume swaps, expression changes, medium restyles. The safest first pass.
  • major - 0.50–0.55: bold remixes. Even the hottest profile caps at 0.55, so you keep recognizable structure instead of starting from noise.

Then seed_mode decides how seeds move across the batch: fixed reuses base_seed every time (denoise alone defines the drift - great for "keep the pose, adjust the vibe" img2img refinement), increment walks seeds upward (storyboard takes), and random draws a deterministic PRNG sequence anchored to base_seed (spray-and-pray you can still reproduce). Every seed emitted is logged.

variation_count (1–16) sets the batch size; steps, cfg, sampler_name, scheduler_name are shared across all variations.

The optional firepower

Two features sit behind optional inputs, and both need a CLIP handle or conditioning wired in to do anything:

  • Prompt jitter (prompt_jitter_enabled, prompt_jitter_strength, prompt_jitter_tokens) - appends weighted prompt fragments per variation. You can hand it a token list in token|min|max format (weights are additive, e.g. dramatic lighting|0.15|0.30), or leave it empty and it applies ±prompt_jitter_strength around the base prompt.
  • Style mixing (style_mix_enabled, style_mix_ratio) - blends a secondary conditioning stream (or style_mix_prompt string) into the main prompt. A ratio of 0.35 gets you a 65/35 base-to-style blend.

base_positive_prompt/base_negative_prompt are fallbacks used when no conditioning input is connected. The node refuses to do text-dependent tricks without a CLIP handle, which is a sane guard against half-baked conditioning.

Outputs: variations (the decoded images, one per variation), latent_batch (the matching latent stack, if you want to keep editing), and summary (a text log of seeds, denoise values, jitter tokens, and artifact paths).

Wiring and install

The README's quick start: wire the Engine's latent, model, and vae outputs in (all three are mandatory), bring clip if you want jitter or style mixing, set variation_count to 3 and variation_profile to moderate for a first pass.

Install is pack-wide - ComfyUI Manager, search "h4 ToolKit", or:

cd ComfyUI/custom_nodes
git clone https://github.com/m3rr/h4_ToolKit

Restart. Deps are colorama and numpy, auto-installed at startup; no models to download.

Common issues

  • Jitter/style features do nothing - you need a CLIP handle (or positive conditioning) wired in; without it the node safely no-ops rather than guess.
  • Variations look too similar - that's minimal doing its job; step up to moderate/major, or pair style mixing with jitter for controlled chaos.
  • GO PLUS ULTRA artifacts - flip go_ultra and it writes JSON dossiers and optional preview PNGs to ComfyUI/temp/h4_varianator_ultra/. ultra_json_log and ultra_cache_artifacts control the persistence.
Categoryh4 Toolkit/Generation

Inputs (28)

NameTypeDefaultDescription
variation_countINT41–16How many alternates to produce from the supplied latent. Each run clones the latent so upstream branches remain untouched.
variation_profileCOMBOmoderateControls the denoise band. Minimal keeps things tight, major allows bolder remixing.
seed_modeCOMBOincrementFixed reuses the anchor seed, increment marches upward, random draws a deterministic sequence from the anchor.
base_seedINT1234567890–9223372036854776000Anchor seed. Acts as the starting point for increment mode or the RNG seed for random mode.
sampler_nameCOMBOeulerWhich sampler to use for every variation.
scheduler_nameCOMBOnormalNoise schedule for sampler execution.
stepsINT181–150Sampler steps per variation. Keep modest; we are refining, not regenerating from scratch.
cfgFLOAT7.01–30Classifier-free guidance shared across the batch.
go_ultraBOOLEANfalseFlip to capture JSON logs and optional preview artefacts for every variation.
modeloptMODEL
clipoptCLIP
vaeoptVAE
latent_inoptLATENT
positive_inoptCONDITIONING
negative_inoptCONDITIONING
style_positive_inoptCONDITIONING
style_negative_inoptCONDITIONING
prompt_jitter_enabledoptBOOLEANfalseAppend weighted prompt fragments per variation. Requires a positive prompt and CLIP handle.
prompt_jitter_strengthoptFLOAT0.150–1Maximum deviation when no explicit token range is provided (1.0 ± strength).
prompt_jitter_tokensoptSTRINGOptional token list for jittering. One per line. Format: token|min|max (weights).
style_mix_enabledoptBOOLEANfalseBlend a secondary conditioning or prompt into the main prompt using the mix ratio.
style_mix_ratiooptFLOAT0.350–10 keeps the base prompt. 1.0 swaps fully to the style-mix source.
base_positive_promptoptSTRINGFallback positive prompt when no conditioning input is connected (also used for prompt jitter).
base_negative_promptoptSTRINGFallback negative prompt when no conditioning input is connected.
style_mix_promptoptSTRINGOptional prompt string to blend when style mixing is enabled and no conditioning input is provided.
style_mix_negative_promptoptSTRINGOptional negative prompt counterpart for style mixing.
ultra_json_logoptBOOLEANtruePersist a JSON dossier of the run when GO PLUS ULTRA?! is on.
ultra_cache_artifactsoptBOOLEANtrueWhen GO PLUS ULTRA?! is on, save preview PNGs alongside the JSON log.

Outputs (3)

NameTypeDescription
variationsIMAGE
latent_batchLATENT
summarySTRING