Nodes/ComfyUI_Swwan/RGBA Multi Save (Swwan)
ComfyUI Node

RGBA Multi Save (Swwan)

Saves premultiplied IMAGE output as JPEG, PNG, or WebP. It embeds RGBA Safe Post logic internally only when alpha must be preserved. Otherwise it flattens the image over a background color for fast RGB export.

By aining2022·Created 9 months ago·Updated about a month ago· 27
RGBA Multi Save (Swwan)
  • image
  • alpha
    has_alpha
    file_formatpng
    alpha_modeauto
    filename_prefixRGBA
    epsilon0.0010
    background_red1.00
    background_green1.00
    background_blue1.00
    jpeg_quality95
    webp_quality90
    webp_losslessfalse
    png_compress_level4
    CategorySwwan/RGBA

    Inputs (14)

    NameTypeDefaultDescription
    imageIMAGEProcessed image. If it comes from RGBA Safe Pre, it is usually still premultiplied.
    alphaMASKAlpha from RGBA Safe Pre. It will be resized automatically to the current image size.
    has_alphaBOOLEANBoolean flag from RGBA Safe Pre. Used by auto mode to decide whether alpha should be kept.
    file_formatCOMBOpngOutput file format. JPEG never keeps alpha. PNG and WebP can keep alpha.
    alpha_modeCOMBOautoauto: keep alpha only for PNG/WebP when has_alpha is true. keep: force alpha-capable save. flatten: composite over background color and save RGB only.
    filename_prefixSTRINGRGBAFilename prefix for saved files.
    epsilonoptFLOAT0.00100.000001–0.1Only used when alpha is kept. Prevents divide-by-zero and overbright edges during unpremultiply.
    background_redoptFLOAT1.000–1Background red channel used when flattening alpha to RGB.
    background_greenoptFLOAT1.000–1Background green channel used when flattening alpha to RGB.
    background_blueoptFLOAT1.000–1Background blue channel used when flattening alpha to RGB.
    jpeg_qualityoptINT951–100JPEG encoder quality. Higher values keep more detail and larger files.
    webp_qualityoptINT901–100WebP quality used in lossy mode.
    webp_losslessoptBOOLEANfalseEnable lossless WebP encoding. Usually larger but preserves pixels better.
    png_compress_leveloptINT40–9PNG compression level. Higher values reduce size but may save slower.

    Outputs (0)

    No outputs