Nodes/h4 ToolKit/h4 : The Engine (Simple Sampler+Plot) v1.3.0
ComfyUI Node

h4 : The Engine (Simple Sampler+Plot) v1.3.0

A sampler, an XY grid, and a LoRA watchdog in one node

By m3rr·Created 11 months ago·Updated 2 months ago· 0
h4 : The Engine (Simple Sampler+Plot) v1.3.0
  • model_in
  • clip_in
  • vae_in
  • conditioning_in
  • conditioning_positive_in
  • conditioning_negative_in
  • latent_in
  • image_in
  • Images
  • Grid_Image
  • Model
  • CLIP
  • VAE
  • Latent
  • Positive
  • Negative
seed0
steps20
cfg7.5
denoise1.00
clip_skip2
sampler_nameeuler
scheduler_namenormal
width512
height512
checkpointNONE
vae_name<checkpoint>
clip_text_name<checkpoint>
clip_vision_name<checkpoint>
positive_prompt
negative_prompt
x_axis_modeprompt
x_axis_values
y_axis_modenone
y_axis_values
bypass_enginefalse
axis_x
axis_y
axis_z
legacy_summary

XY plot grids are the classic way to answer "which sampler and CFG actually work for this prompt?" Most packs make you bolt a grid plotters onto a normal sampler. The h4 Toolkit's "Engine" (h4 : The Engine (Simple Sampler+Plot)) skips the bolt-on entirely: it is the sampler, and the grid is built into its output list. One node, an annotated comparison panel, and the model handles you'd otherwise have to re-route out of a KSampler.

It's also the flagship of a genuinely obscure pack - zero search impressions, essentially no community footprint, and the README flat-out announces it's a shelved project (the author points you at h4_Live instead). So set expectations: this is an enthusiast's tool, documented to an almost absurd degree by its author, and supported by exactly one person. The good news is the docs are unusually honest, and there's no heavy machinery under the hood - no model downloads, just plumbing over ComfyUI's own sampler infrastructure.

How it works

Give it a checkpoint (or wire model_in/clip_in/vae_in), a base prompt, and up to two axes. Each axis has a mode - prompt, checkpoint, sampler, scheduler, cfg, steps, denoise, seed, lora, or none - plus a newline-separated list of values. It builds a plan matrix, runs every combination through the sampler, and stitches the results into one labelled grid with the plan name written on each tile. Along the way it layers LoRAs, encodes images you feed it, clones incoming latents when you're refining, and keeps the final Model/CLIP/VAE/Latent/conditioning handles on its outputs so downstream nodes keep working without rebuilding state.

The touches you'll notice: it auto-cleans the CUDA cache between grid cells, it gracefully skips clip-skip when the model has no hook, and it tries to publish live previews mid-run (falling back to direct VAE decode if latent_preview isn't available). It also has a signature-aware sampler shim that renames or drops kwargs to match whatever ComfyUI version you're on - a nod to how often upstream breaks node packs, a theme the ecosystem knows all too well.

The inputs that matter

  • seed, steps, cfg, denoise - the baseline sampler settings. Axis plans can override per cell.
  • sampler_name / scheduler_name - defaults for the whole grid.
  • positive_prompt / negative_prompt - base text; a prompt axis appends its values to the base prompt.
  • x_axis_mode / x_axis_values and y_axis_mode / y_axis_values - the actual grid. Keep these small at first; a 6×6 grid is 36 full generations.
  • bypass_engine - handy during wiring: passes through without generating anything.

Outputs: Images (every render stacked), Grid_Image (the annotated panel - this is the one you save), plus Model, CLIP, VAE, Latent, Positive, Negative for chaining.

Install

ComfyUI Manager, search "h4 ToolKit", or:

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

Restart and watch for the neon status banner. The only deps are colorama and numpy in requirements.txt, and the package auto-installs them (plus a torch version check) on startup - nothing to download by hand. One gotcha: the README talks about h4_Plot/nodes.py and h4_Plot/js/, but the shipped tree keeps nodes.py and js/ at the repo root. The code is what installs, not the prose.

Common issues

  • Sampler rejects kwargs on bleeding-edge ComfyUI. The compatibility shim adapts known signatures, but brand-new sampler changes can outrun it. Update the pack, and the author notes recent ComfyUI builds generally fix this.
  • Big grids eat VRAM. Start 2×3 before 8×8. The Engine clears cache per cell, but 36 images is 36 images.
  • The seed trap. Put seed on an axis and every cell rolls its own seed - great for txt2img exploration, disastrous for img2img. If you're refining an existing image with denoise < 1, keep the seed out of the grid and reuse the original seed, or every cell comes back completely different and your careful denoise value quietly stops meaning what you think it means.
Categoryh4 Toolkit/Generation

Inputs (32)

NameTypeDefaultDescription
seedINT00–4294967295
stepsINT201–150
cfgFLOAT7.51–30
denoiseFLOAT1.000–1
clip_skipINT21–12
sampler_nameCOMBOeuler44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
scheduler_nameCOMBOnormal6 options: normal, simple, karras, exponential, sgm_uniform, lognormal
widthINT51264–2048
heightINT51264–2048
checkpointCOMBONONE1 options: NONE
vae_nameCOMBO<checkpoint>2 options: NONE, <checkpoint>
clip_text_nameCOMBO<checkpoint>2 options: NONE, <checkpoint>
clip_vision_nameCOMBO<checkpoint>2 options: NONE, <checkpoint>
positive_promptSTRING
negative_promptSTRING
x_axis_modeCOMBOprompt10 options: prompt, checkpoint, sampler, scheduler, cfg, steps, +4
x_axis_valuesSTRING
y_axis_modeCOMBOnone10 options: prompt, checkpoint, sampler, scheduler, cfg, steps, +4
y_axis_valuesSTRING
bypass_engineBOOLEANfalse
axis_xoptSTRING
axis_yoptSTRING
axis_zoptSTRING
legacy_summaryoptSTRING
model_inoptMODEL
clip_inoptCLIP
vae_inoptVAE
conditioning_inoptCONDITIONING
conditioning_positive_inoptCONDITIONING
conditioning_negative_inoptCONDITIONING
latent_inoptLATENT
image_inoptIMAGE

Outputs (8)

NameTypeDescription
ImagesIMAGE
Grid_ImageIMAGE
ModelMODEL
CLIPCLIP
VAEVAE
LatentLATENT
PositiveCONDITIONING
NegativeCONDITIONING