Nodes/ComfyUI-STARWrapper/STAR Prepare Video
ComfyUI Node

STAR Prepare Video

Where 'how big' becomes 'how big, exactly'

By vjumpkung·Created 9 months ago·Updated 12 days ago· 3
STAR Prepare Video
  • images
  • prepared video
resolution720

STAR Prepare Video is the front door of the whole STAR super-resolution graph, and it looks almost insultingly simple for a node that does what it does. You feed it video frames and a number, it hands you a "prepared video" that STAR Sample can eat. Nothing glamorous, but everything about your output resolution is decided right here.

This node is part of the video/upscaling/STAR family in the ComfyUI-STARWrapper pack, which wraps the STAR diffusion video upscaler from NJU-PCALab. In the full graph the flow is: frames → STAR Prepare Video → STAR Sample → STAR VAE Decode → STAR Color Fix. Prepare Video is the step that converts your ordinary ComfyUI IMAGE batch into STAR's internal world - a quantized, normalized, width-and-height-baked tensor in [frames, channels, H, W], with pixel values pushed into the -1..1 range the diffusion model expects. It does this quietly on the CPU and keeps the result there, so having a prepared clip sitting in your graph isn't reserving precious VRAM while you fiddle with other nodes.

The one setting that matters

Just two inputs, and you'll touch one of them:

  • images - video frames as a standard ComfyUI IMAGE batch.
  • resolution - the target length of the shorter side, default 720, range 16–16384. Aspect ratio is preserved and the result is snapped to an even size. Set it to 1080 for 1080p output, 2160 for 4K, and the model regenerates detail at that size.

The resolution number is a target the model upscales toward - STAR is a generative super-resolution model, not a bicubic resize, so this is where you declare how much new detail you want the diffusion pass to invent. Concretely: a 540p short-side source at resolution 1080 is roughly a 2x generative upscale, which is the comfortable zone. Asking a 240p clip for 2160 is asking the model to quadruple-and-a-half a picture with almost nothing in it; it will try, and the honest community verdict on this whole model family is that the bigger the jump, the more the output starts to look like the model's idea of detail rather than your video's.

A word on where frames come from: this node does no file I/O. Upstream you want a video loader - the pack's own example workflow uses LoadVideoGetVideoComponents, whose images output is exactly what feeds in here. And note the frame count you load is the frame count everything downstream inherits, including the color-fix pass that needs the originals as reference. Load what you intend to process.

Installing the pack

Search ComfyUI-STARWrapper in ComfyUI Manager, or:

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

Restart ComfyUI after. Two setup realities to know before you start: you need a fairly recent ComfyUI because the pack is built on the newer comfy_api.latest node API, and the dependencies are heavy - diffusers, av, opencv-python, open-clip-torch pinned to 2.20.0, and a numpy<2.3 pin that occasionally fights existing environments. It also wants CUDA PyTorch plus an xformers that matches; the README flags CUDA 13 xformers as broken, and the pack tries to install a compatible build automatically.

Troubleshooting

The traps here are upstream and downstream, not inside the node:

  • "images must be a ComfyUI IMAGE tensor" errors - you fed it something else, usually a video file directly or a list. Convert to an IMAGE batch first.
  • Degraded output or banding - check what you loaded. The model expects ordinary RGB frames; weird color spaces upstream (BGR channels swapped, or non-standard bit depth) will quietly ruin the upscale and it'll look like the model's fault.
  • OOM further down the graph - don't reach for the resolution slider first when the sampler is the thing dying; a smaller resolution does cut diffusion cost, but so does the chunk length in STAR Sample. The short-side number is your quality target, not your first memory knob.

Keep Prepare Video on the canvas and cached - that's its design. When you're experimenting with prompts and sampling settings, it shouldn't re-run at all.

Categoryvideo/upscaling/STAR

Inputs (2)

NameTypeDefaultDescription
imagesIMAGEVideo frames as a ComfyUI IMAGE batch.
resolutionINT72016–16384Target size of the shorter side; aspect ratio is preserved.

Outputs (1)

NameTypeDescription
prepared videoSTARVSR_VIDEO