ComfyUI Node

SaveImage_LCM

The plain save node the pack's workflows use

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

    Every workflow in this pack ends the same way: an image tensor into SaveImage_LCM. It's the pack's default save node, and despite the name it has nothing LCM-specific about it - it's a standard ComfyUI PNG saver with two small extras. It writes to ComfyUI/output/ with workflow metadata embedded, and it also writes a tiny lastimage.json file into the pack's CanvasTool/ folder recording the path of the last saved image. The SaveImage_LCM variant writes the path with no "done" flag; the puzzle savers write a done marker too.

    If you're not using the canvas app, the lastimage.json side effect is harmless - it's just a one-line JSON file dropped in the pack's folder so the canvas tools can find the most recent result.

    How it works

    save_images computes a numbered filename from your filename_prefix via folder_paths.get_save_image_path, then for each image writes a PNG into the output folder with PngInfo metadata (the full workflow prompt plus any extra_pnginfo) - so the saved file carries its own graph and can be dragged back into ComfyUI to reconstruct the workflow. After each save it opens .../LCM_Inpaint_Outpaint_Comfy/CanvasTool/lastimage.json and overwrites it with {"lastimage": "<full path>"}.

    It's an output node: RETURN_TYPES is empty and is_output_node is true.

    The inputs that matter

    • images - the IMAGE tensor(s) to save.
    • filename_prefix - default ComfyUI. Output lands at ComfyUI/output/<prefix>_<counter>_.png.

    No outputs.

    How to install it

    Same as 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. No models needed.

    Common issues

    Honestly, not much to trip on. The one thing to know is that this node assumes the pack's CanvasTool/ folder exists in your custom_nodes directory to write lastimage.json - it does if you installed the pack normally, since the folder ships with the repo. If you've deleted the canvas files, the JSON write can fail after the PNG is already saved, so check whether the file actually got written before hunting for a deeper cause.

    The bigger "issue" is a judgment call: there are three near-identical save nodes in this pack (SaveImage_LCM, SaveImage_Puzzle, SaveImage_PuzzleV2) plus SaveImage_Canvas, and which one you want depends on which companion app you're feeding. For plain saving with no app in the loop, this one - no server calls, no environment variables, just a PNG and a JSON file - is the safe default. It's the least clever save node in the pack, and that's exactly why it's the right one to reach for.

    Categoryimage

    Inputs (2)

    NameTypeDefaultDescription
    imagesIMAGE
    filename_prefixSTRINGComfyUI

    Outputs (0)

    No outputs