Nodes/ComfyUI-CryptIO/Preview Image ๐Ÿ”’
ComfyUI Node

Preview Image ๐Ÿ”’

A preview node that doesn't leave a plaintext file behind

By Suzu008ยทCreated 8 months agoยทUpdated 2 months agoยท 0
Preview Image ๐Ÿ”’
  • images
    โ—„formatโ–พโ–บ
    โ—„quality95โ–บ
    โ—„auto_downloadfalseโ–บ

    This is the CryptIO pack's answer to the stock PreviewImage node, with one twist: instead of writing a plain PNG/JPEG into ComfyUI's temp directory, it encrypts the image first. Your browser decrypts it on the way back for display, so what you see in the preview grid looks completely normal - it's what's sitting on disk in the meantime that's different.

    CryptIO's whole idea is RSA encryption of anything moving between your browser and the ComfyUI server: a keypair auto-generates server-side on startup, the browser auto-fetches the public key, and nothing needs manual configuration. This node runs that encryption on your generated images before the temp file gets written, and is a terminal node in the graph - it doesn't output anything further downstream, same as the stock preview node.

    The inputs that matter

    • images (IMAGE, required) - the batch you want to preview. Standard image input, same as any preview/save node.
    • format - a dropdown for the file format the encrypted temp file gets saved in.
    • quality (INT, 1โ€“100, default 95) - only bites for lossy formats; if you're on something lossless this setting won't do much.
    • auto_download (BOOLEAN, default false) - flip this on and the node automatically triggers a browser download of the decrypted image as soon as it's ready, instead of you having to right-click the preview thumbnail yourself.

    No outputs - is_output_node is true, meaning this ends the branch of the graph it sits on, exactly like the built-in preview.

    Why encrypt something that's just a preview?

    Here's the case: ComfyUI generally serves its temp and output files through an endpoint that has no authentication by default - a soft spot the community has PSA'd about repeatedly ("please secure your ComfyUI instance"). If you're running this on a machine reachable over a network you don't fully trust - a shared host, a remote GPU box - a plain file sitting in the temp folder is readable by anyone who can hit that path directly, bypassing your browser session entirely. Encrypting the file at rest means a direct poke at that endpoint gets ciphertext instead of your actual output; your own browser still sees it fine because it holds the matching decryption path. It's a narrow protection - it doesn't lock down the endpoint itself, just what's sitting behind it - but it's a real one for that specific failure mode.

    Installing it

    Comes bundled with the rest of the CryptIO pack. ComfyUI Manager: search "ComfyUI-CryptIO," install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/Suzu008/ComfyUI-CryptIO, restart ComfyUI. No models to fetch - it's a small Python + frontend-JS pack, so this is a fast install either way.

    Troubleshooting

    If you're batch-generating and didn't mean to, turn auto_download off - leaving it on during a big batch means a browser download prompt (or a silent download, depending on your browser settings) for every single image, which gets old fast. quality doing nothing visible is expected if your chosen format is lossless - that's not a bug, the setting just doesn't apply there.

    More generally: this is a young, small pack - its README still has the untouched boilerplate from ComfyUI's official cookiecutter extension template - so there's no deep community troubleshooting history to lean on beyond the node's own tooltips and the README. If the preview thumbnail never appears, the first thing to check is whether your browser actually completed the decrypt-and-render step; a stale cached frontend bundle after updating the pack is a common enough cause of custom-node JS weirdness in ComfyUI generally that a hard refresh is worth trying before anything else.

    CategoryCryptIO๐Ÿ”’

    Inputs (4)

    NameTypeDefaultDescription
    imagesIMAGEThe images to encrypt and preview
    formatCOMBOThe file format in which to save the image
    qualityINT951โ€“100Quality setting for the saved image
    auto_downloadBOOLEANfalseAutomatically download decrypted image in browser

    Outputs (0)

    No outputs