XYImage☀
XY Plot that doesn't make you re-run the whole grid to fix the labels
- images
- images
- xyimage
XY Plot is how you answer "what happens if I sweep this?" - prompt variants down one axis, CFG or seed or LoRA strength down the other, and a grid of images showing every combination. ComfyUI's ecosystem has had XY Plot nodes for a while, but most of them are fiddly, tied to specific sampler types, or force you to re-render the entire grid if you want a bigger gap or different font. XY_Image is the DashuaiTools take, and its party trick is real: it only re-runs the grid when your content changes. Tweak the layout and you get an instant redraw from cache.
How it works
The node hooks into the whole workflow graph - not just its upstream, the entire prompt - through a hidden PROMPT input. You define an X axis and a Y axis as a list of parameter overrides, and it executes every combination.
The mechanism is the interesting part. For each X/Y combination it deep-copies the workflow, applies your overrides to the targeted node inputs (with type conversion - it reads the target node's declared input types so a STRING "3" becomes an actual FLOAT 3.0), then executes the graph itself with a per-run cache keyed by node hash. Unchanged upstream nodes - a model loader, a LoRA, a VAE - run once and get reused across every iteration, which is why a sweep doesn't cost you N×M full pipeline runs. Results get moved to CPU to protect VRAM, and it calls soft_empty_cache between loops so swapping LoRAs per cell doesn't accumulate garbage. When it's done it walks the executed nodes to find the final IMAGE tensors and builds the grid with Pillow, including CJK-aware font loading for Chinese labels.
On top of that there's a global content-hash cache: IS_CHANGED returns a fingerprint of the workflow plus your axis config, so changing gap_size, font_size, or panel_mode alone never triggers a re-render. That's the "dashboard-like refresh" the README promises, and it's the reason to pick this over a naive XY node.
The config syntax
The axis fields use a compact format:
<x:Prompt>[12:positive]='a dragon in a neon city'
<y:CFG>[7:cfg]='4'
That's a label, then [node_id:input_name]='value'. Node IDs are the numbers ComfyUI assigns in the prompt graph, and typing them by hand is misery - which is why the pack ships a web extension. Right-click any node's parameter, and a dropdown builds the [id:input]='value' entry for you.
Inputs and outputs
- images - a placeholder IMAGE; the node mostly needs it for the graph connection.
- x_attr / y_attr - the axis configs above.
- panel_mode -
XY Plot(axes + grid),X:YorY:X(label under each cell). - gap_size (5–1000, default 10) and font_size (50–250, default 50) - pure layout; changing them never re-runs generations.
- Outputs: images (the raw per-iteration batch) and xyimage (the composited grid).
Gotchas
- It's node-ID based, and IDs are fragile. Rewire the workflow and the
[id:...]overrides silently point elsewhere. Rebuild the axes after any structural edit. - It re-executes the graph per combination. Caching makes unchanged nodes cheap, but every changed value still runs its branch - big graphs with lots of variation are still N×M executions.
- The whole-graph hook is clever but heavy. This is a workflow-level tool; don't drop it in a simple single-image pipeline.
- Check your CJK font on Linux. Chinese labels need a Noto/Source Han font installed; otherwise you get boxes. The font loader falls back to DejaVu Sans if nothing better exists.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Hasasasa/ComfyUI_DashuaiTools
then restart ComfyUI, or install via ComfyUI Manager ("DashuaiTools"). The web extension loads automatically from the pack's web folder.
For parameter sweeps on real workflows - prompt matrices, seed/CFG sweeps, LoRA strength comparisons - this is the pack's flagship, and the layout-cache behavior is the feature that makes it feel fast.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| gap_size | INT | 105–1000 | — |
| font_size | INT | 5050–250 | — |
| panel_mode | COMBO | 3 options: XY Plot, X:Y, Y:X | |
| x_attr | STRING | — | |
| y_attr | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| xyimage | IMAGE | — |