ComfyUI Node Runs on cloud

pipeKSampler

The sampler that also upscales, applies a LoRA, and saves

By TinyTerraΒ·Created 3 years agoΒ·Updated 3 months agoΒ· 604
pipeKSampler
  • pipe
  • optional_model
  • optional_positive
  • optional_negative
  • optional_latent
  • optional_vae
  • optional_clip
  • input_image_override
  • adv_xyPlot
  • pipe
  • model
  • positive
  • negative
  • latent
  • vae
  • clip
  • images
  • seed
  • plot_image
β—„lora_nameβ–Ύβ–Ί
β—„lora_strength1.00β–Ί
β—„upscale_methodNoneβ–Ί
β—„upscale_model_nameβ–Ύβ–Ί
β—„factor2.00β–Ί
β—„rescaleβ–Ύβ–Ί
β—„percent50β–Ί
β—„width1024β–Ί
β—„height1024β–Ί
β—„longer_side1024β–Ί
β—„cropβ–Ύβ–Ί
β—„steps20β–Ί
β—„cfg8.00β–Ί
β—„sampler_nameβ–Ύβ–Ί
β—„schedulerβ–Ύβ–Ί
β—„denoise1.00β–Ί
β—„image_outputβ–Ύβ–Ί
β—„save_prefixComfyUIβ–Ί
β—„file_typepngβ–Ί
β—„embed_workflowtrueβ–Ί
β—„seed0β–Ί

pipeKSampler is where a tinyterra workflow actually does the generating. It takes the pipe from pipeLoader, runs the sampler, and gives you back the results plus an updated pipe - and it folds in three extra jobs you'd normally need separate nodes for: an optional LoRA apply, an optional upscale before sampling, and the image preview/save. It's the KSampler that thinks it's a Swiss Army knife, and mostly it's right.

The design goal, borrowed from the Efficiency Nodes lineage: keep the graph small enough to read. Instead of Load Checkpoint β†’ LoRA β†’ Text Encode Γ—2 β†’ Empty Latent β†’ KSampler β†’ Preview, you get pipeLoader β†’ pipeKSampler β†’ done. The README even shows the old multi-node layout next to the pipe version to make the point.

How it works

Feed it a PIPE_LINE (from pipeLoader_v2 or the legacy loader). The sampler pulls model, conditioning, latent, VAE, CLIP and seed out of the pipe, but every one of those has an optional_* input to override it - that's how you hook in a ControlNet-applied conditioning or a custom latent without unwrapping the pipe. The seed input on the node overrides the pipe's seed if you provide it.

Three built-ins you'll actually use:

  • lora_name / lora_strength - one quick LoRA apply right before sampling, without touching the loader.
  • upscale_method - the hires-fix block. Choose from [latent] (latent-space upscale: nearest-exact, bilinear, area…) or [hiresFix] (pixel upscale via an upscale_model_name), then set factor, or rescale to a percentage / width-height / longer side. In practice: latent upscale for a cheap second pass, hiresFix with a real upscaler model for quality.
  • image_output / save_prefix / file_type / embed_workflow - preview or save right here, with the same prefix-parsing as the standalone imageOutput node.

Sampler controls are the standard steps, cfg, sampler_name (44 samplers), scheduler (including the AYS presets the pack adds), and denoise.

Inputs and outputs

The inputs that matter day-to-day: pipe, steps, cfg, sampler_name, scheduler, denoise, and the upscale trio. Outputs: the updated pipe, plus model, positive, negative, latent, vae, clip, images, seed, and plot_image (the last one exists so an advanced xyPlot can inject a grid image into the flow).

Installing it

Part of tinyterraNodes:

cd ComfyUI/custom_nodes
git clone https://github.com/TinyTerra/ComfyUI_tinyterraNodes.git

or ComfyUI Manager β†’ tinyterraNodes. No extra dependencies.

Gotchas

The [hiresFix] upscale path needs an upscale model in ComfyUI/models/upscale_models - pick None there and the hiresFix options silently can't work, so set upscale_model_name first. And because image_output here saves every run when set to Save, iterate in Preview and flip to Hide/Save when you're done. One more: the optional overrides are a real power feature but also the classic "why is my result ignoring the loader?" culprit - if a wired optional_model or optional_latent is connected, it wins over the pipe.

Category🌏 tinyterra/pipe

Inputs (30)

NameTypeDefaultDescription
pipePIPE_LINEβ€”
lora_nameCOMBO1 options: None
lora_strengthFLOAT1.00-10–10β€”
upscale_methodCOMBONone13 options: None, [latent] nearest-exact, [latent] bilinear, [latent] area, [latent] bicubic, [latent] lanczos, +7
upscale_model_nameCOMBO1 options: None
factorFLOAT2.000–10β€”
rescaleCOMBO4 options: by percentage, to Width/Height, to longer side - maintain aspect, None
percentINT500–1000β€”
widthINT102464–16384β€”
heightINT102464–16384β€”
longer_sideINT102464–16384β€”
cropCOMBO2 options: disabled, center
stepsINT201–10000β€”
cfgFLOAT8.000–100β€”
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO13 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +7
denoiseFLOAT1.000–1β€”
image_outputCOMBO5 options: Hide, Preview, Save, Hide/Save, Disabled
save_prefixSTRINGComfyUIβ€”
file_typeCOMBOpng7 options: png, jpg, jpeg, tiff, tif, webp, +1
embed_workflowBOOLEANtrueβ€”
seedoptINT00–18446744073709550000β€”
optional_modeloptMODELβ€”
optional_positiveoptCONDITIONINGβ€”
optional_negativeoptCONDITIONINGβ€”
optional_latentoptLATENTβ€”
optional_vaeoptVAEβ€”
optional_clipoptCLIPβ€”
input_image_overrideoptIMAGEβ€”
adv_xyPlotoptADV_XYPLOTβ€”

Outputs (10)

NameTypeDescription
pipePIPE_LINEβ€”
modelMODELβ€”
positiveCONDITIONINGβ€”
negativeCONDITIONINGβ€”
latentLATENTβ€”
vaeVAEβ€”
clipCLIPβ€”
imagesIMAGEβ€”
seedINTβ€”
plot_imageIMAGEβ€”