Load Image (JXL)
ComfyUI won't open your JXL? This node is the reader
- IMAGE
- MASK
ComfyUI's built-in Load Image has a blind spot: it only lists PNG, JPG, WebP and a few friends. Drop a .jxl into your input folder and it simply never shows up in the dropdown. Load Image (JXL) is the missing reader - a drop-in replacement that understands JPEG XL, the format that's roughly 40% smaller than PNG at the same quality. It's the other half of a pair from the same pack: Save Image (JXL) writes these files, this node reads them back, and between the two you can make JPEG XL your default archive format without leaving ComfyUI.
What it actually does
Pick the node from the image category and it behaves exactly like the stock Load Image - a dropdown of files plus an upload button - except the list is filtered to .jxl files in your ComfyUI/input folder. Under the hood it reads the whole file and decodes it with the imagecodecs library. It's cleverer than it looks, because it handles both JXL flavors: the bare codestream and the full ISOBMFF container that Save Image (JXL) writes with embedded workflow metadata. It also participates in the drag-and-drop trick: the pack patches the frontend so that dropping a .jxl straight onto the canvas tries to reconstruct the workflow embedded in the file, the same way PNG drop-restore works natively.
The inputs and outputs that matter
The only input is image, which is the file picker - pick your JXL, done. Everything else happens on the way out:
- IMAGE - the decoded image as a
[B, H, W, 3]float tensor in 0–1 range. Wire this into anything: VAE decode, img2img, ControlNet preprocessors, the works. - MASK - a
[H, W]float tensor. If your JXL carries an alpha channel, this is1 - alpha, so transparent areas become a mask ready for inpainting - same convention as the built-in Load Image. No alpha? You get an all-zeros mask, which downstream nodes treat as "no mask."
Nothing else to configure. It's a load node; it loads.
Installing it
ComfyUI Manager is the easy path - search for ComfyUI_jxl_support and install. Manual install is the usual two lines:
cd ComfyUI/custom_nodes/
git clone https://github.com/koloved/ComfyUI_jxl_support
One trap the README glosses over: it says "restart and go," but the code hard-errors if imagecodecs isn't importable. Manager pulls dependencies for you; if you cloned by hand, you need the requirements too:
cd ComfyUI/custom_nodes/ComfyUI_jxl_support
pip install -r requirements.txt # imagecodecs + brotli
imagecodecs ships prebuilt wheels for Windows, Linux and macOS on current Python, so it's normally painless - just make sure pip is reasonably modern or it'll try to build from source and that's no fun.
Where people get burned
Two things, both real, both reported by actual users:
Previews don't render. The node saves and loads fine, but your browser can't decode JXL, so output thumbnails are blank. That's the display layer, not the node. Enable JXL in your browser to see the images: Chrome/Edge need chrome://flags/#enable-jxl-image-format set to Enabled, Firefox needs image.jxl.enabled flipped to true in about:config (Nightly has it by default).
Drag-and-drop recovery is best-effort. Restoring a workflow from a dropped JXL needs the browser to decompress the Brotli-compressed metadata; if it can't, the frontend falls back to a server-side route, and if both fail the file just lands in Load Image like a plain image. It works on modern Chrome/Firefox - just don't treat it as a guarantee on a five-year-old browser.
One honest caveat from the author himself: if you work mostly with flat-color anime output, AVIF compresses that better than JXL. For photographic renders and lossless archiving, this node plus its save sibling is the easy win.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 0 options: |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |