Nodes/HommageTools for ComfyUI/HT Save Image Plus
ComfyUI Node

HT Save Image Plus

Save Image is fine. HT Save Image Plus is for when it isn't.

By ArtHommage·Created 2 years ago·Updated about a year ago· 4
HT Save Image Plus
  • images
  • mask
  • florence2_model
    output_formatPNG
    filename_prefixComfyUI_
    add_sequence_numbertrue
    output_dir/tmp/ComfyUI/output
    min_pixel_threshold0
    crop_to_alphafalse
    enable_captioningfalse
    jpeg_quality90
    tiff_compressionadobe_deflate
    save_alphatrue
    text_content
    text_extension.txt
    text_encodingUTF-8
    save_metadatatrue
    caption_typedetailed_caption
    caption_pre
    caption_post
    max_new_tokens1024
    num_beams3
    do_sampletrue
    seed1
    keep_model_loadedfalse

    The stock Save Image node will get your PNG onto disk, and nothing more. HT Save Image Plus (from the HommageTools pack) is for the workflows where that isn't enough: you want a JPEG at a specific quality, a TIFF with compression, a mask saved as the alpha channel, a caption text file dropped next to every image, or a filter that skips the garbage outputs before they ever hit disk. If you've ever built a training dataset or a batch pipeline, you know exactly why that's useful.

    What it does

    It's an output node (category HommageTools/output), so nothing wires out of it - you put it at the end of the line and it writes files. The essentials:

    • output_format - PNG, JPEG, or TIFF. Each has its own controls: jpeg_quality (1–100), tiff_compression (adobe_deflate or none). TIFF support is why the pack pulls in tifffile.
    • mask - feed a mask in and it becomes the image's alpha channel (toggle with save_alpha). Great for cutouts and layered work.
    • text_content - a text sidecar file saved alongside the image with the same base name (text_extension, text_encoding). This is the training-dataset trick: prompt → .txt file per image, ready for a caption loader.
    • min_pixel_threshold - skip any image with fewer pixels than this. Perfect for batch jobs where half the outputs are tiny garbage.
    • crop_to_alpha - crop the saved image to the alpha channel's content before writing.
    • filename_prefix and add_sequence_number - prefix plus auto-incrementing numbers, or a fixed filename if you turn sequencing off.

    The captioning feature

    The headline extra is automatic captioning via Florence2 (enable_captioning). It's not bundled with this pack - you connect a florence2_model (FL2MODEL type) loaded by a separate Florence2 node, then pick a caption_type (caption / detailed_caption / more_detailed_caption) and tune generation with max_new_tokens, num_beams, do_sample, and seed. You can prepend/append fixed text with caption_pre and caption_post, and keep_model_loaded stops it from reloading the model every run. This is a real time-saver when you're captioning a dataset before training, but it's the one feature with a moving part: no Florence2 node installed, no captions, no error - the checkbox just does nothing.

    Installing it

    Standard pack install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ArtHommage/HommageTools.git
    cd HommageTools
    pip install -r requirements.txt
    

    Restart ComfyUI, or use ComfyUI Manager → "HommageTools". Remember the pack's own disclaimer: it's labeled perpetual alpha, not for production. For saving images that's a low-risk stance to take, but don't be shocked if an update renames a parameter.

    Common issues

    JPEG has no alpha. Feed it a mask with output_format set to JPEG and the transparency is gone; use PNG or TIFF when alpha matters. Metadata in JPEG/TIFF is also less reliable than PNG - save_metadata is really a PNG feature. And check output_dir: it defaults to your ComfyUI output folder, and the node will happily write anywhere you point it, which is convenient for dataset builds but easy to misplace files if you've got several pipelines running. Oh, and if min_pixel_threshold is set higher than your smallest legitimate output, you'll wonder where images went - it skips silently by design.

    CategoryHommageTools/output

    Inputs (25)

    NameTypeDefaultDescription
    imagesIMAGEImages in BHWC format to save
    output_formatCOMBOPNGOutput image format
    filename_prefixSTRINGComfyUI_Prefix or full filename for output
    add_sequence_numberBOOLEANtrueAppend sequential number to filename
    output_dirSTRING/tmp/ComfyUI/outputOutput directory path
    min_pixel_thresholdINT00–2147483647Skip saving images with fewer pixels than this threshold
    crop_to_alphaBOOLEANfalseCrop images to alpha channel content area
    enable_captioningBOOLEANfalseEnable automatic captioning of saved images
    jpeg_qualityoptINT901–100JPEG Quality (1-100)
    tiff_compressionoptCOMBOadobe_deflateTIFF compression method
    maskoptMASKOptional mask to use as alpha channel
    save_alphaoptBOOLEANtrueSave alpha channel if present
    text_contentoptSTRINGOptional text content to save alongside image
    text_extensionoptSTRING.txtExtension for text file
    text_encodingoptCOMBOUTF-8Text file encoding
    save_metadataoptBOOLEANtrueSave prompt metadata in PNG files
    florence2_modeloptFL2MODELFlorence2 model for auto-captioning
    caption_typeoptCOMBOdetailed_captionType of caption to generate
    caption_preoptSTRINGText to add before the caption
    caption_postoptSTRINGText to add after the caption
    max_new_tokensoptINT10241–4096Maximum number of tokens to generate for caption
    num_beamsoptINT31–64Number of beams for caption generation
    do_sampleoptBOOLEANtrueWhether to use sampling for caption generation
    seedoptINT11–18446744073709550000Seed for caption generation
    keep_model_loadedoptBOOLEANfalseKeep Florence2 model loaded after processing

    Outputs (0)

    No outputs