Nodes/Bonfire/Bonfire Image Loader
ComfyUI Node

Bonfire Image Loader

ComfyUI Sorts Your Input Folder. Bonfire Image Loader Doesn't Have To.

By DaemonSK·Created 23 days ago·Updated 21 days ago· 1
Bonfire Image Loader
    • IMAGE
    • MASK
    • width
    • height
    ◄image▾►
    ◄queue[]►
    ◄alignmentminimax_h3►
    ◄custom_multiple8►
    ◄resize_modeoff►
    ◄megapixels1.00►
    ◄long_edge1024►
    ◄target_width1024►
    ◄target_height1024►

    Core ComfyUI's Load Image node shows you every file in ComfyUI/input, sorted by name. Fine when you have three pictures. Maddening when you have thirty image-to-video references and want them in the order you actually chose - the one you settled on, then two alternates, then the mask source. The dropdown re-sorts under you, and IMG_4471, IMG_4472, IMG_4475 is not an order you picked.

    Bonfire Image Loader is a loader with a queue. Add pictures in the order you mean, the order sticks, and you flip between them with the arrow keys while the node is selected. For i2v work that's the difference between a workflow you can leave open for an afternoon and one you re-pick your way through every run.

    What's actually in the box

    Only one of the three moving parts is the node: the loader itself, a browser UI shipped as frontend JavaScript, and a small HTTP route that lets that UI list, thumbnail, dedupe and delete files in your input folder. Browse opens your input directory with search, sorting and multi-select; Add files and Add folder pull pictures in from elsewhere, subfolders included; drag-and-drop and clipboard paste both work. Add the same picture twice and it jumps to the copy you already have - a real sha256 comparison, not a filename check.

    How it works

    The queue widget is a JSON string holding the ordered list, maintained by the node's interface and saved inside the workflow, not a sidecar file. It isn't part of the loader's cache key - reordering shouldn't force a re-decode - but the file's modification time, size and every pixel-affecting parameter are, so re-exporting over ref_01.png triggers a reload even though the name is identical.

    Decoding is Pillow into ComfyUI tensors, with one convention worth internalising: alpha becomes the MASK output, inverted, because ComfyUI masks treat transparent as 1. No alpha gives you the same empty 64×64 sentinel mask the built-in loader returns. If you resize, the mask gets the identical scale-and-crop geometry - the part hand-rolled pipelines get wrong, and why the mask is safe to feed an inpainting branch.

    Files are read from ComfyUI/input and only from there. Paths are resolved and re-checked for containment, and a widget value ending in [output] or [temp] is rejected outright.

    The two inputs you actually set

    • alignment - the pixel grid both output dimensions get rounded to. The default is MiniMax H3's 32, and there are also Krea 2 (16), plain multiples of 8/32/64, and a custom multiple from 1 to 1024.
    • resize_mode - off, megapixels, long_edge, fit or crop, the last two using target_width / target_height.

    Here's the trap the README flags and the source confirms: a model profile snaps, a bare multiple doesn't. Leave resize_mode on off with the H3 profile selected and a 1000×1000 still comes out 992×992, rounded onto the 32 grid; anything whose short edge exceeds 2048 gets scaled down so the short edge is 2048, never upscaled. Pick "Multiple of 32" instead and off really means off. Only one of those is what you wanted.

    The resampler is picked by total pixel area - area averaging when the image shrinks, Lanczos when it grows.

    Outputs, and where they go

    IMAGE, MASK, width, height. Wire width and height straight into whatever's asking for a size - an empty latent, a video latent node, or Bonfire Shot in the same pack - so the latent can't quietly disagree with the picture you loaded. Sizes resolved once, from one source, instead of retyped in three places.

    Install

    In ComfyUI Manager, search Bonfire. Or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/DaemonSK/ComfyUI-Bonfire ComfyUI-Bonfire
    

    Restart. There's no requirements.txt and pyproject.toml declares nothing; it rides on what stock ComfyUI already ships. One real caveat: it's a V3-API pack (comfy_entrypoint, no legacy NODE_CLASS_MAPPINGS). If your ComfyUI is more than a few months old, update first - an old build will simply not show the nodes.

    Where people get burned

    Your image isn't in the dropdown. It has to be in ComfyUI/input. The node refuses to read anywhere else, on purpose. Use Browse or Add files and let it copy the file in.

    An animated GIF or WebP won't load. The loader probes the frame count and refuses instead of silently handing you frame one. Animated PNGs and multipage TIFFs get the same treatment.

    "Image file does not exist" after sharing a workflow. The queue stores input-relative names, so the workflow travels but the pictures don't. Send the files or the graph is a picker pointing at nothing.

    You expected a batch. It returns one image per run - the one currently selected. The queue is there so switching costs a keystroke, not a re-pick.

    Worth saying plainly: this is a brand-new two-node MIT pack from a solo author, with no community track record yet. You're not adopting a standard, you're adopting a small, dependency-free utility. For ordered reference sets, that's a good trade.

    CategoryBonfire

    Inputs (9)

    NameTypeDefaultDescription
    imageCOMBOThe image currently selected from the queue.
    queueSTRING[]The ordered queue, as JSON. Maintained by the node interface and persisted with the workflow.
    alignmentCOMBOminimax_h3Pixel grid both output dimensions are rounded to.
    custom_multipleINT81–1024Grid used when the alignment profile is 'custom'.
    resize_modeCOMBOoffHow the image is scaled before alignment is applied.
    megapixelsFLOAT1.000.01–64Target area for the 'megapixels' resize mode.
    long_edgeINT10248–16384Target longest side for the 'long_edge' resize mode.
    target_widthINT10248–16384Target width for the 'fit' and 'crop' resize modes.
    target_heightINT10248–16384Target height for the 'fit' and 'crop' resize modes.

    Outputs (4)

    NameTypeDescription
    IMAGEIMAGE—
    MASKMASK—
    widthINT—
    heightINT—