Nodes/ComfyUI-Testing/XYZ Viewer (Artify)
ComfyUI Node

XYZ Viewer (Artify)

XYZ Viewer (Artify)

By ArtifyGames·Created 7 months ago·Updated 3 days ago· 0
XYZ Viewer (Artify)
  • xyz_plot

    The whole point of an XYZ sweep is to see all the cells side by side and pick a winner - not to open twenty files. XYZ Viewer (Artify) is the display half of this pack: an in-node HTML viewer that renders your sweep as a labeled grid, straight from result.json. On its own it does nothing, which confuses people; its whole job is to sit at the end of an XYZ Plot (Artify) run and show you what came out.

    It's the ComfyUI equivalent of a contact sheet. Sweep three CFG values against three samplers, and instead of eyeballing output/ you get a matrix with X values down one axis and Y values across the other, headers and legend included. If you used a Z axis, it nests as a third dimension you can flip through.

    How it works

    The plot node hands the viewer a folder reference over its xyz_plot socket, and the viewer's frontend reads that folder through the pack's own local routes - /artify_testing/xyz/result for the labeled matrix, /artify_testing/xyz/images for a plain file list. It's all served by your own ComfyUI instance; no external service involved.

    Two rendering modes:

    • Labeled matrix when the folder has a result.json - X/Y axis labels from the values you swept, Z as a nested axis, per-cell images with their batch index.
    • Flat image grid fallback when there's no result.json - handy if you point it at an ordinary folder of images.

    It also reloads on each run: the node marks itself non-idempotent, so it re-reads the folder as queued cells finish, and the plot node schedules a final viewer refresh prompt after the last cell lands. That's a nice touch - no manual refresh while your grid is still cooking.

    The one input

    • xyz_plot (optional, type ARTIFY_XYZ_PLOT): wire this from XYZ Plot (Artify). That's it - the node has no outputs, because it's an output node. Everything else happens in the widget UI.

    Beyond the socket there are two buttons worth knowing: Load Folder lets you type or pick a folder (server-side output folders via the API, or a local directory through the browser's folder picker), and Export Grid Image stitches the current view into a merged PNG with headers/legend, saved to output/ as <folder>_grid.png.

    Install

    Same pack as the plot node - install once, get both. It's dependency-free: no requirements.txt entries beyond a standard ComfyUI, no models.

    cd ComfyUI/custom_nodes
    git clone https://github.com/ArtifyGames/comfyui-testing.git
    

    Restart, refresh the browser. Or use ComfyUI Manager and search for comfyui-testing.

    Where people get burned

    • "No folder selected." If you run the viewer with nothing connected and no folder loaded, that's what you get - and it's intentional, not a crash. The node returns early and stays non-fatal.
    • Wrong mode. If the folder you loaded has a result.json with a structure the viewer can't parse, you'll get an "Invalid result.json axis structure" message rather than a silent wrong render. A folder with no result.json just drops into the flat grid.
    • Stale grids. Because each sweep archives the old output folder to _old_<timestamp>, make sure you're looking at the current folder after a rerun - the viewer follows the folder name, not the workflow.

    Reach for this when you're doing the classic compare-samplers-or-CFG workflow and want the answer in one glance. If you just need to compare two single images, a slide-to-compare node is the better tool; this one shines specifically on grid-sized sweeps.

    CategoryArtify/Testing

    Inputs (1)

    NameTypeDefaultDescription
    xyz_plotoptARTIFY_XYZ_PLOT

    Outputs (0)

    No outputs