h4 : The Varianator (v1.0.0)
The Varianator
- model
- clip
- vae
- latent_in
- positive_in
- negative_in
- style_positive_in
- style_negative_in
- variations
- latent_batch
- summary
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 intoken|min|maxformat (weights are additive, e.g.dramatic lighting|0.15|0.30), or leave it empty and it applies ±prompt_jitter_strengtharound the base prompt. - Style mixing (
style_mix_enabled,style_mix_ratio) - blends a secondary conditioning stream (orstyle_mix_promptstring) 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
minimaldoing its job; step up tomoderate/major, or pair style mixing with jitter for controlled chaos. - GO PLUS ULTRA artifacts - flip
go_ultraand it writes JSON dossiers and optional preview PNGs toComfyUI/temp/h4_varianator_ultra/.ultra_json_logandultra_cache_artifactscontrol the persistence.
Inputs (28)
| Name | Type | Default | Description |
|---|---|---|---|
| variation_count | INT | 41–16 | How many alternates to produce from the supplied latent. Each run clones the latent so upstream branches remain untouched. |
| variation_profile | COMBO | moderate | Controls the denoise band. Minimal keeps things tight, major allows bolder remixing. |
| seed_mode | COMBO | increment | Fixed reuses the anchor seed, increment marches upward, random draws a deterministic sequence from the anchor. |
| base_seed | INT | 1234567890–9223372036854776000 | Anchor seed. Acts as the starting point for increment mode or the RNG seed for random mode. |
| sampler_name | COMBO | euler | Which sampler to use for every variation. |
| scheduler_name | COMBO | normal | Noise schedule for sampler execution. |
| steps | INT | 181–150 | Sampler steps per variation. Keep modest; we are refining, not regenerating from scratch. |
| cfg | FLOAT | 7.01–30 | Classifier-free guidance shared across the batch. |
| go_ultra | BOOLEAN | false | Flip to capture JSON logs and optional preview artefacts for every variation. |
| modelopt | MODEL | — | |
| clipopt | CLIP | — | |
| vaeopt | VAE | — | |
| latent_inopt | LATENT | — | |
| positive_inopt | CONDITIONING | — | |
| negative_inopt | CONDITIONING | — | |
| style_positive_inopt | CONDITIONING | — | |
| style_negative_inopt | CONDITIONING | — | |
| prompt_jitter_enabledopt | BOOLEAN | false | Append weighted prompt fragments per variation. Requires a positive prompt and CLIP handle. |
| prompt_jitter_strengthopt | FLOAT | 0.150–1 | Maximum deviation when no explicit token range is provided (1.0 ± strength). |
| prompt_jitter_tokensopt | STRING | Optional token list for jittering. One per line. Format: token|min|max (weights). | |
| style_mix_enabledopt | BOOLEAN | false | Blend a secondary conditioning or prompt into the main prompt using the mix ratio. |
| style_mix_ratioopt | FLOAT | 0.350–1 | 0 keeps the base prompt. 1.0 swaps fully to the style-mix source. |
| base_positive_promptopt | STRING | Fallback positive prompt when no conditioning input is connected (also used for prompt jitter). | |
| base_negative_promptopt | STRING | Fallback negative prompt when no conditioning input is connected. | |
| style_mix_promptopt | STRING | Optional prompt string to blend when style mixing is enabled and no conditioning input is provided. | |
| style_mix_negative_promptopt | STRING | Optional negative prompt counterpart for style mixing. | |
| ultra_json_logopt | BOOLEAN | true | Persist a JSON dossier of the run when GO PLUS ULTRA?! is on. |
| ultra_cache_artifactsopt | BOOLEAN | true | When GO PLUS ULTRA?! is on, save preview PNGs alongside the JSON log. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| variations | IMAGE | — |
| latent_batch | LATENT | — |
| summary | STRING | — |