Nodes/ComfyUI_KubaNodes/kubakub onnx style transfer
ComfyUI Node

kubakub onnx style transfer

Restyles an image with your own trained pix2pix model (an .onnx file), at full resolution by working in overlapping tiles. Runs on the GPU when onnxruntime has CUDA, else on the CPU.

By kubakubkub·Created 15 days ago·Updated 3 days ago· 9
kubakub onnx style transfer
  • image
  • styled_image
◄model_path►
◄modetiled►
◄tile_size512►
◄overlap64►
◄blend1.00►
◄passes1►
◄keep_loadedfalse►
Categorykubakub/lab

Inputs (8)

NameTypeDefaultDescription
imageIMAGEThe image (or batch) to restyle; each image is done on its own.
model_pathSTRINGAn .onnx file: a full path, or a name inside ComfyUI/models/onnx.
modeoptCOMBOtiledtiled runs the model on overlapping squares at full resolution. single squeezes the whole image into one square and scales it back (fast, softer).
tile_sizeoptINT512256–1024Square size in pixels the model works at. Use the size it was trained at (usually 512).
overlapoptINT640–256tiled only. Pixels neighbouring tiles share and blend across, so no seams show.
blendoptFLOAT1.000–1Mix with the original: 1 = fully styled, 0 = the original image.
passesoptINT11–5Run the model again on its own result this many times for a stronger style. 1 = once.
keep_loadedoptBOOLEANfalseKeep the ONNX session (and its VRAM) between runs; off frees the GPU for the diffusion models.

Outputs (1)

NameTypeDescription
styled_imageIMAGEThe restyled image, same size as the input.