Nodes/Pixel Palette Art/GIMP Palette Loader
ComfyUI Node

GIMP Palette Loader

Stop hand-typing pixel art colors into ComfyUI

By ranska·Created about a year ago·Updated 7 months ago· 1
GIMP Palette Loader
    • palette
    palette_file

    GIMP Palette Loader is the node that makes the whole pack actually usable. Pixel art has a huge culture of ready-made palettes - the Lospec database alone has thousands of .gpl files people have lovingly curated - and this node pulls those straight into ComfyUI. Drop a .gpl, .pal, or Adobe .aco file into your input folder, pick it from the dropdown, and out comes a PIXEL_PALETTE you can sort, mix, subset, and export. It's the difference between hand-typing 32 RGB values and just loading someone else's taste.

    The loader is honestly the smartest node in the pack. It reads the file, sniffs the format, and delegates to the right parser: GIMP .gpl text, Adobe .aco binary (v1), or a generic hex/rgb line parser as a fallback. The .aco parsing is a nice touch - it reads the big-endian binary blocks, handles the RGB color space, and skips gracefully past truncated files. There's even a layered encoding fallback (utf-8 → latin-1 → forced decode) so it survives messy real-world files.

    How it works

    Files are read from ComfyUI's input directory - the same place your images live. The node lists every .gpl/.pal/.aco file there in a dropdown (it has an image_upload flag, so you can also drag a file onto the node and it lands in input for you). IS_CHANGED returns the file's mtime so ComfyUI re-runs it when the file changes on disk - meaning you can edit the palette file externally and re-run without touching the graph.

    Two defensive behaviors worth knowing. If no palette file exists, the dropdown shows the French placeholder "Aucun fichier palette" and the node returns an empty palette rather than crashing. And on a real parse failure it returns a palette carrying an error string as its content. Neither throws, so a broken file silently produces an empty palette - check the console if you load a file and get nothing.

    Inputs and outputs

    One required input: palette_file, a dropdown of the palette files in input. One output: palette, a PIXEL_PALETTE ready for the rest of the pack. The parsed palette carries its name, color count, and detected format (gpl, aco, or generic) - the console prints a confirmation line like ✓ Palette chargée when it works.

    Installing

    Part of the Pixel Palette Art pack. ComfyUI Manager → "Pixel Palette Art", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ranska/pixel_palette_art.git
    

    Restart ComfyUI; the node is under pixel_art/io. Just Pillow - no downloads, no models. Grab palettes from Lospec to try it.

    Common issues

    The classic mistake is putting the file in the wrong place. It must be in ComfyUI's input folder (or dropped onto the node itself), not in custom_nodes and not in some subfolder - a file in a subfolder won't show in the dropdown. If your freshly downloaded .gpl doesn't appear, restart ComfyUI or use the drag-and-drop upload.

    Second: remember the output is an object, not a render. You'll see nothing until you wire it into Palette View or Palette Formatter. And .aco files: only Adobe ACO v1 RGB blocks are parsed, which covers most pixel-art-era palettes but not v2 - if you load a modern .aco and get fewer colors than expected, that's likely why.

    Categorypixel_art/io

    Inputs (1)

    NameTypeDefaultDescription
    palette_fileCOMBOCharger un fichier palette (.gpl, .pal, .aco)

    Outputs (1)

    NameTypeDescription
    palettePIXEL_PALETTE