ComfyUI Node

SaveImage_PuzzleV2

The puzzle saver's near-identical sequel

By taabata·Created 3 years ago·Updated 2 years ago· 259
SaveImage_PuzzleV2
  • images
    filename_prefixComfyUI

    SaveImage_PuzzleV2 is SaveImage_Puzzle with a "2" on it, and the V2 is basically identical under the hood. Read the Puzzle article and you've read 95% of this one: it saves your generated image to ComfyUI/output/ with workflow metadata, then writes a lastimage.json into the pack's puzzle/ folder carrying the saved path plus a "done": "y" flag, which is the signal the jigsaw outpainting app waits for before collecting the new piece.

    Why does a version 2 exist with no meaningful behavioral change? The two classes save through slightly different code paths (one converts tensors with an explicit 255. * step, the other writes the tensor directly - which amounts to the same result for standard images), and both write to the same file. This is the kind of duplication that happens when an author iterates fast and doesn't clean up. It's not a bug; it's just untidy.

    How it works

    Same numbered-filename flow as every save node in the pack: filename_prefixfolder_paths.get_save_image_path → PNG with PngInfo metadata (workflow prompt + extra_pnginfo) → then overwrite .../LCM_Inpaint_Outpaint_Comfy/puzzle/lastimage.json with {"lastimage": "<full path>", "done": "y"}. Output node, no return values.

    The inputs that matter

    • images - the IMAGE tensor(s) to save.
    • filename_prefix - default ComfyUI.

    No outputs.

    How to install it

    With the rest of the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/taabata/LCM_Inpaint-Outpaint_Comfy
    cd LCM_Inpaint-Outpaint_Comfy
    pip install -r requirements.txt
    

    Or ComfyUI Manager → "LCM_Inpaint-Outpaint_Comfy" → restart. The full puzzle workflow additionally needs the puzzle.py Flask app running from the pack's puzzle/ folder.

    Common issues

    Because both Puzzle and PuzzleV2 write the same lastimage.json, they share a failure mode: if the puzzle/ folder is missing or unwritable, the JSON side-effect fails after the PNG is saved and the puzzle app never sees a done flag. Since the two are interchangeable, there's also no harm in just picking one and sticking with it - the V2 is the later revision, so if you're starting fresh, use it. The real caveat is the same as for the whole puzzle sub-project: it's a clever idea that's more plumbing than the outpainting it enables, so only reach for it if the tile-by-tile canvas genuinely helps your workflow.

    Categoryimage

    Inputs (2)

    NameTypeDefaultDescription
    imagesIMAGE
    filename_prefixSTRINGComfyUI

    Outputs (0)

    No outputs