Nodes/AK Pack/AK Base
ComfyUI Node

AK Base

The image picker that rewires your sampler settings on click

By akawana·Created 9 months ago·Updated 7 days ago· 2
AK Base
  • a_image
  • b_image

    AK Base is the node that makes a wall of generated variations actually usable. If you run AK-XZ-Axis (the author's XY-plot pack) or any workflow that produces a batch of images, you know the pain: you get 20 nearly-identical frames and have to hunt for the good one by scrolling through the temp folder. This node gives you a clickable gallery right in the graph, and - here's the part nothing else does - selecting an image in that gallery can re-apply that run's sampler settings to the KSampler upstream.

    Think of it as an image comparison node (like the one rgthree ships) with three upgrades: it handles a multi-image gallery instead of just an A/B pair, it has copy-to-clipboard buttons for single images and the whole gallery, and it talks to the author's AK ecosystem. It's an output/preview node, so it doesn't modify anything - it shows you results and lets you act on them.

    What it does under the hood. Feed it images and it saves them as PNGs in ComfyUI's temp directory, writes a small state file, and its bundled JavaScript renders that into the gallery and picture-in-picture preview you see in the node body. Give it more than one image on either input and it flips into gallery mode; give it exactly one image on a_image and it does a straight two-up compare with b_image.

    The genuinely clever part: when you feed it images that came out of AK-XZ-Axis, those images carry the run's settings embedded in their pixel data. AK Base extracts that embedded JSON and writes it to a config file, which is how selecting a gallery image can push seed, denoise, cfg, and xz_steps back into your samplers. In the node's Properties panel there's a node_list text field where you list node names or IDs (e.g. KSampler, 12, My Detailer), and that's the list of samplers it drives.

    The inputs that matter. There are only two, and they're both images:

    • a_image (required) - the main image, or the batch of images you want in the gallery.
    • b_image (optional) - the second image for an A/B comparison when you're not in gallery mode.

    That's it. No outputs - nothing to wire downstream. It's an endpoint.

    How to install it. Same as every node in the AK Pack - via ComfyUI Manager (search "AK Pack") or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/akawana/ComfyUI-Utils-extra
    

    Restart ComfyUI. There are no extra Python dependencies and no model downloads; the pack is pure Python plus its JS frontend. The repo also ships example workflows (simple_AKBase_...json) that show the intended setup with the XZ-Axis pack.

    Where people get burned. First, it's a frontend-driven node - the gallery, clipboard buttons, and auto-parameter behavior live in the browser JS. Run the workflow headless through the API and you get the temp files but no gallery magic. Second, the parameter auto-apply only does something if you've configured node_list and you're working with AK-XZ-Axis settings (or the AK KSampler Settings pair). If you just want a pretty gallery, you can ignore all of that - it works fine as a plain multi-image preview. Third, the gallery lives in temp state, so after a restart it won't remember your last selection; don't expect persistence.

    CategoryAK

    Inputs (2)

    NameTypeDefaultDescription
    a_imageIMAGE
    b_imageoptIMAGE

    Outputs (0)

    No outputs