ComfyUI Node Runs on cloud

Fast Preview

Skipping the base64/JSON tax on live previews

By kijai·Created 3 years ago·Updated about 14 hours ago· 2,930
Fast Preview
  • image
    formatJPEG
    max_size768

    ComfyUI's standard preview path sends images to the browser over a websocket, but it typically goes through base64 encoding wrapped in JSON - which is a real, measurable overhead when you're pushing frames repeatedly (think a long video batch or a high-frequency progress preview). Fast Preview does the same basic job - show me the image - but sends it as raw binary over the websocket instead, skipping that encoding step entirely.

    Why you'd want this

    If you're generating something where previews update frequently - long video batches, big multi-frame outputs, anything where you want to watch progress rather than wait for a single final result - the encoding overhead on the standard preview path adds up. Fast Preview is specifically there to make that overhead smaller, so your progress previews feel snappier rather than lagging behind the actual generation.

    It's worth taking the category seriously here: this node lives under KJNodes/experimental, which is the author's own signal that it's not treated as a stable, guaranteed-forever part of the pack the way the rest of KJNodes is. Use it for what it's good at - a faster live preview during iteration - and don't be surprised if its behavior shifts in a future update the way a more settled node's wouldn't.

    How it works

    It's an output node with no data outputs of its own - its whole job is the side effect of pushing the image to the UI over a binary websocket message, bypassing the base64/JSON encode-decode round trip the standard preview mechanism uses. To keep that fast, it also caps the image at max_size and compresses it in your chosen format before sending, rather than pushing full-resolution frames every time.

    The inputs and outputs that matter

    • image - the image to preview (required).
    • format - JPEG (default) or PNG. JPEG is smaller and faster to encode/transmit; PNG is lossless if you actually need pixel-perfect previews rather than just a quick look.
    • max_size (default 768, range 128–4096, step 64) - the preview is downsampled so its largest dimension doesn't exceed this. Lower it for even faster updates on big images or long batches; raise it if you need to actually inspect detail in the preview rather than just track progress.

    No outputs - this is purely a display sink, the same shape as Preview Image, just faster.

    How to install it

    • ComfyUI Manager - search KJNodes for ComfyUI, install, restart.
    • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, then pip install -r ComfyUI-KJNodes/requirements.txt (portable: python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-KJNodes\requirements.txt), then restart.

    No model downloads - this is display infrastructure, not ML.

    Common issues & troubleshooting

    Preview looks blurrier or lower quality than a normal Preview Image. That's expected - you're trading fidelity for speed. max_size downsamples, and JPEG (the default format) is lossy. Switch to PNG and raise max_size if you need a cleaner look and can tolerate a bit less speed.

    Nothing shows up at all. Since it's marked experimental, check that your ComfyUI frontend version actually supports the binary websocket path this node relies on - a mismatch between an older or newer frontend and what the node expects is the most likely cause if the standard Preview Image node works fine but this one shows nothing.

    Behavior changes after an update. Given the experimental category, this is the one node in the pack where "it used to work differently" is genuinely plausible rather than user error - check the pack's changelog if something that worked before stops behaving the same way.

    CategoryKJNodes/experimental

    Inputs (3)

    NameTypeDefaultDescription
    imageIMAGE
    formatCOMBOJPEG2 options: JPEG, PNG
    max_sizeINT768128–4096Maximum width or height for the preview. Images larger than this are downscaled before encoding.

    Outputs (0)

    No outputs