Nodes/ComfyUI-texflow-extension/Save Texflow Image
ComfyUI Node

Save Texflow Image

ComfyUI's Save Image with a secret handshake

By theAdamColton·Created 2 years ago·Updated 2 years ago· 1
Save Texflow Image
  • images
  • texflow_metadata

    It's a Save Image with a tag on it

    Save Texflow Image is ComfyUI's ordinary Save Image node, plus one small addition: it stamps your output filename with a render_id so that Blender knows which generated image belongs to which 3D surface. If you're using texflow to paint AI textures onto objects, this node is the exit door of your whole graph - the last thing before ComfyUI writes files, and the reason the Blender side can find them again.

    The loop goes like this. You're in Blender, you select faces on a mesh, pick a camera, and render a depth image. The depth flows into ComfyUI through Load Texflow Depth Image, your KSampler refines it into a texture, and this node saves the result. Back in Blender you hit "Load ComfyUI Images" and the extension polls ComfyUI's history endpoint, downloads everything saved with the matching prefix, and applies it as a diffuse material on the object. Without the tag, Blender has no idea which file belongs to which render - so this node is the glue, not the paint.

    What it takes

    An output node with two required inputs and nothing to configure:

    • images - the image(s) you generated and want to hand back to Blender.
    • texflow_metadata - wire this to the TEXFLOW_METADATA output of Load Texflow Depth Image. The tooltip in the pack says it plainly: connect it to the metadata returned by the loader. That's how the node learns the render_id; it's required, not optional.

    Under the hood it just calls ComfyUI's own SaveImage with the filename prefix texflow_<render_id>, so your output folder fills up with files named like texflow_a9cb714f-de4a-4cc5-8d38-392ec73e2a6d_00001_.png. Everything else - PNG encoding, compression level, output directory - is inherited from core SaveImage. This node adds precisely one thing, and that one thing is the handshake.

    Install

    Same pack as the loader, one install covers both nodes. ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/theAdamColton/ComfyUI-texflow-extension
    

    Restart ComfyUI and the "texflow" category appears. No pip requirements, no model downloads, no keys - it's a thin wrapper around core, so there's nothing extra to break.

    Gotchas

    • texflow_metadata is required. Build the graph from memory and forget that wire, and the node refuses to run. It has to come from Load Texflow Depth Image in the same run - that's where the render_id gets read out of the occupancy PNG.
    • Stale render_ids bite. Re-render the depth in Blender mid-session and the metadata you loaded earlier is stale. Re-run the loader so the render_id matches the new render before you save, or Blender will import the old, mislabeled results.
    • If you rename the output files or strip the prefix, the Blender side can't match them against its history query. The prefix is the contract.
    • If you don't need the round trip back to Blender at all - say you just want to see what your texture looks like - a plain Save Image does the same job. This node only earns its keep when something on the other end is going to look for that prefix.

    It's a genuinely thin node, and that's a compliment: the less there is to misconfigure, the more likely your texture makes it back onto the mesh intact.

    Categorytexflow

    Inputs (2)

    NameTypeDefaultDescription
    imagesIMAGEThe images to save.
    texflow_metadataTEXFLOW_METADATAConnect this to the texflow metadata returned by load texflow depth image

    Outputs (0)

    No outputs