ComfyUI-XENodes Introduction
ComfyUI-XENodes is a collection of custom nodes and interface tools for ComfyUI. It helps you organize busy workflows, choose between creative options, adjust values visually, work through folders of images, convert standard images or video to HDR, and save finished images, video, or audio.
You can use its tools independently. For example, Multi-Switch can help you compare two image-processing branches without reconnecting wires, while Node Execution Time can show which part of a workflow takes the longest. The extension also supports ComfyUI’s newer Nodes 2.0 interface.
How ComfyUI-XENodes Works
A ComfyUI workflow passes information between connected nodes. ComfyUI-XENodes adds nodes that help you control those connections and tools that make the workflow easier to follow.
Think of Multi-Switch as a selector: several inputs arrive, and you choose which one continues to the output. Multi-Pipe is more like a cable organizer: it bundles several connections together, then separates them at the other end. Slider nodes give you visual controls for numbers instead of requiring you to type every adjustment.
The HDR nodes serve a different purpose. They take standard dynamic range (SDR) images or video and expand them into high dynamic range (HDR). The regular SDR to HDR node uses adjustable processing controls. The beta SDR to HDR (using Model) node uses a learned model to reconstruct highlights. You can then connect the result to a compatible Save Image or Save Video node. HDR output is most useful when the file format, playback software, and display can handle it.
ComfyUI-XENodes Features
Organize and control your workflow
-
Multi-Switch selects one of several connected inputs and sends it to one output. Its input slots grow as you add connections, and buttons on the node show the connected source names. You can hide connection slots from the right-click menu to reduce clutter. For example, connect two versions of an image-processing chain and switch between them while keeping both branches in place.
-
Multi-Pipe In and Multi-Pipe Out bundle multiple inputs into one
XE_MULTI_PIPEconnection and unpack them elsewhere. Input slots grow as needed, and the output names stay synchronized with the connected Multi-Pipe In node. This can make a workflow with many long, parallel connections easier to read. -
Combo Selector chooses an option from a connected node’s dropdown using a numbered index. It discovers the available options from that node and provides both a COMBO output and a text (STRING) output. Use it when another part of your workflow supplies a number that should control a dropdown choice.
-
Show Any displays an incoming value as readable text on the node. It accepts different data types and displays complex values in a JSON-style representation. This is useful when you need to check what a node is producing. It also supports Nodes 2.0 Group Nodes.
Adjust values visually
-
Slider provides a visual control for a single number. Its
stepsetting determines how values change: whole-number steps produce anINToutput, while decimal steps produce aFLOAToutput. A step of1, for example, suits settings that require whole numbers; a step of0.1allows finer adjustments. -
Slider 2D lets you adjust X and Y together on a coordinate plane. You can set
stepXandstepYindependently, so one axis can move in whole numbers while the other uses decimals. Its display precision follows those step settings. Turn onsnapwhen you want the handle to land on defined increments.
Work with images and HDR
-
Load Image From Folder loads one image at a time from a folder or a direct file path. It keeps the original resolution and aspect ratio, and shows a preview after execution. The
indexinput works with ComfyUI’s after-generation controls, such as increment and randomize; when a sequential index passes the last image, it loops back to the first. You can sort by name, modification date, creation date, or randomly, reverse the order, and include subfolders. Outputs include the image, mask, filename, file path, current index, and total image count. This is useful for processing a folder through a queued workflow or passing individual images to a vision-language workflow. -
SDR to HDR expands SDR images or video into 10-bit HDR. Its inverse tone-mapping controls include
peak_nits,itm_knee, anditm_exponent, which affect how brightness and highlights are expanded. It also converts color from BT.709 to the wider BT.2020 color space. Choose HDR PQ for a PQ/HDR10 transfer curve or HDR for an HLG transfer curve. The node processes large image batches and video frames in chunks to manage memory use. -
SDR to HDR (using Model) [Beta] uses a learned model for HDR reconstruction. Its
exposurecontrol adjusts luminance in EV stops, whileliftraises the shadow and midtone floor. It can output HDR PQ or HDR (HLG) for use with the extension’s saving nodes. Because this node is marked beta, consider checking short samples before committing to a long video workflow.
Save your results
-
Save Image saves PNG, WebP, or 10-bit AVIF. WebP offers lossless and quality controls. For HDR results from SDR to HDR, the node detects HDR color-space metadata and applies appropriate AVIF color information. It can embed ComfyUI workflow and prompt metadata in PNG, WebP, and, when
exiftoolis available, AVIF. -
Save Video saves MP4 or WebM with supported codec choices including H.264, H.265, AV1, and GPU-accelerated NVENC options. You can adjust
crffor encoding quality and set the audio bitrate. For HDR input, the node applies 10-bit pixel formats and the relevant BT.2020, PQ, or HLG tags during encoding. -
Save Audio saves MP3, Opus, or FLAC. It offers standard bitrate choices and MP3 variable bitrate (V0). A built-in player lets you preview saved audio in ComfyUI.
Older HDR saving nodes: Save HDR Image and Save HDR Video are deprecated. For new workflows, use SDR to HDR with Save Image set to AVIF, or with Save Video.
FFmpeg must be available on your system for Save Video, AVIF output from Save Image, and Save Audio. AVIF workflow and prompt metadata embedding also uses exiftool.
Follow workflow progress
-
Node Execution Time shows a small gray timing badge on each node, in milliseconds or seconds. It can account for GroupNodes and subgraphs, and avoids counting time twice when another extension has already measured it. Toggle the display in ComfyUI Settings under XENodes → Node Execution Time.
-
Progress Bar shows execution progress and helps you find the active node. Click the bar to navigate into a nested subgraph and center the running node; if another workflow tab is open, it switches to the executing tab. Its text shows the path through nested graphs, and a pulse highlights the focused node. Right-click the bar to return to the root graph. Toggle it under XENodes → Progress Bar.
ComfyUI-XENodes Models
The beta SDR to HDR (using Model) node supports these pretrained weights, which are downloaded when requested:
| Model file | Best suited to | What to expect |
|---|---|---|
HR.pth (HDRTVNet++) | Anime, CG, artwork, and illustrations | Highlight refinement aimed at strong contrast and vivid wide-gamut color. The author identifies it as the highest-visual-quality choice. |
HDRTVDM_params_3DM.pth (HDRTVDM) | Live-action footage and movies | Reconstruction designed to suppress issues such as compression artifacts, banding, and noise. |
ITMLUT_params.pth (ITMLUT) | Long video batches or workflows with limited VRAM | A lightweight 3D-LUT approach intended for much faster processing than deep models. |
Try a short representative clip or a few still frames when choosing a model: illustrated scenes, live-action footage, and long batches have different priorities. These are choices within the beta model-based HDR node; the regular SDR to HDR node does not require one of these pretrained models.
The model architectures and weights have their own licenses and terms. Before commercial use, review THIRD_PARTY_LICENSES.md, including any terms associated with the models’ training data.
Troubleshooting ComfyUI-XENodes
A save node reports an FFmpeg error
- Check whether the operation is Save Video, Save Audio, or AVIF output from Save Image. These require FFmpeg.
- Confirm that
ffmpegis installed and available in your system’s PATH. - Restart ComfyUI after making FFmpeg available, then run a short test.
AVIF files do not include workflow or prompt metadata
- Confirm that
exiftoolis available on your system; AVIF metadata embedding uses it. - Save a new test image and check that file. PNG and WebP use their own metadata-embedding paths.
Folder images appear in an unexpected order
- Check the Load Image From Folder sort mode:
name,date_modified,date_created, orrandom. - Check whether
reverseorsubfoldersis enabled. - Check the
indexvalue and its after-generation behavior. An incrementing index loops to the first image after the last.
A slider will not connect to a number input
- Check whether the destination expects
INTorFLOAT. - Adjust the slider’s
step: use a whole-number step forINTor a decimal step forFLOAT. - For Slider 2D, check
stepXandstepYseparately because each output type follows its own step.
Timing badges or the progress bar are missing
Open ComfyUI Settings and check XENodes → Node Execution Time or XENodes → Progress Bar, respectively. Each display can be turned on or off independently.
Frequently asked questions
Do I need a model to make HDR output?
No. The regular SDR to HDR node uses adjustable inverse tone mapping. Pretrained weights are used by the separate, beta SDR to HDR (using Model) node.
Which node should save an HDR image or video?
Use Save Image with AVIF for an HDR image, or Save Video for HDR video, after an SDR to HDR node. The standalone Save HDR Image and Save HDR Video nodes are deprecated.
Will Load Image From Folder resize my source images?
No. It loads each image at its original resolution and aspect ratio.
Can I use these tools inside grouped workflows?
The documented interface support includes Show Any in Nodes 2.0 Group Nodes, execution timing for GroupNodes and subgraphs, and progress-bar navigation into nested workflows.
Learn More about ComfyUI-XENodes
- The screenshots in the Multi-Switch and Multi-Pipe sections show how those workflow-organizing nodes appear in ComfyUI.
- Read THIRD_PARTY_LICENSES.md for model attributions, license texts, and terms to consider when using pretrained HDR weights.
- Read the project’s LICENSE for the terms of ComfyUI-XENodes itself.
