Nodes/ComfyUI-StableXWrapper/StableX Process Image
ComfyUI Node

StableX Process Image

StableX Process Image — where the actual work happens (and the 2048-VRAM trap)

By kijai·Created 2 years ago·Updated 2 years ago· 69
StableX Process Image
  • pipeline
  • image
  • image
processing_resolution2048
controlnet_strength1.00
seed42

The loader just downloads weights and builds the pipeline. This is the node that actually runs the thing: feed it the YOSOPIPE from DownloadAndLoadStableXModel, an image, and out comes the result. It's the whole reason you installed the pack, and it has four inputs, three of which matter.

The trick to understanding it: there's no text prompt and no multi-step denoising. YOSO is short for "You Only Sample Once" - the image gets encoded to latent space, a ControlNet-style module (the pack's custom ControlNetVAE) conditions on it at a fixed starting timestep, the UNet runs a single pass, and the VAE decodes. One step. That's why it's fast and why the model itself is deterministic-ish.

What you get out depends entirely on which model you loaded:

  • Delight → the image with glare, specular highlights and reflections removed. Bright, flat, "de-lit" version.
  • Normal → a surface normal map, the RGB-encoded "which direction does each pixel face" image that relighting and 3D workflows eat for breakfast.

The inputs that matter

  • image - any IMAGE tensor. Feed it from Load Image, or the output of another node.
  • processing_resolution (default 2048, range 64–4096) - the longer side your image gets resized to internally before the UNet runs. This is the one beginners get burned by: 2048 on a mid-range card is a quick OOM trip. Drop it to 1024–1280 if you're on 8 GB and the output still comes back at your original resolution. Lower = faster and lighter, but coarser detail.
  • controlnet_strength (default 1.0) - the condition scale for the ControlNetVAE, per the author's own tooltip. 1.0 is where the example workflow runs it; most people leave it alone.
  • seed - and here's a fun one: the tooltip says it only affects normal prediction mode. That's because in delight mode the pipeline starts from zero latents (deterministic by construction), while normal mode starts from random noise, so the seed actually changes the normal map. Set it once for reproducibility on normals; it's a no-op for delight.

Output and what to do with it

Single output, image (a normal IMAGE tensor in 0–1 range), so it wires into anything - Preview Image, Save Image, or back into the rest of your graph. The bundled example sends the delight output and the original photo into the pack's Extract Difference node to isolate exactly what was removed: the specular/lighting component. That's the neat trick of this pack - load one photo, run both models, subtract.

Watch out for

VRAM is the main event. The node pulls the UNet, VAE and ControlNet onto the GPU together, and 2048 is a lot for a diffusion-ish UNet even at fp16. If it dies on the first call, that's the resolution - not a broken install. There's a commented-out enable_model_cpu_offload() in the loader, so no automatic offloading is happening; the models do move back to CPU after each call. First call per session has a warmup tax while everything transfers. And don't forget the pipeline is model-specific: if you want both outputs, you need two loaders, one per model choice.

CategoryStableXWrapper

Inputs (5)

NameTypeDefaultDescription
pipelineYOSOPIPE
imageIMAGE
processing_resolutionINT204864–4096
controlnet_strengthFLOAT1.000.01–10controlnet condition scale
seedINT420–18446744073709550000Seed only affects normal prediction mode

Outputs (1)

NameTypeDescription
imageIMAGE