Nodes/ComfyUI_tinyterraNodes/pipeKSamplerSDXL
ComfyUI Node Runs on cloud

pipeKSamplerSDXL

Base and refiner in one node, the SDXL way

By TinyTerraΒ·Created 3 years agoΒ·Updated 3 months agoΒ· 604
pipeKSamplerSDXL
  • sdxl_pipe
  • optional_model
  • optional_positive
  • optional_negative
  • optional_latent
  • optional_vae
  • optional_refiner_model
  • optional_refiner_positive
  • optional_refiner_negative
  • optional_clip
  • input_image_override
  • adv_xyPlot
  • sdxl_pipe
  • pipe
  • model
  • positive
  • negative
  • refiner_model
  • refiner_positive
  • refiner_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β–Ύβ–Ί
β—„base_steps20β–Ί
β—„cfg8.00β–Ί
β—„denoise1.00β–Ί
β—„refiner_steps20β–Ί
β—„refiner_cfg8.00β–Ί
β—„refiner_denoise1.00β–Ί
β—„sampler_nameβ–Ύβ–Ί
β—„schedulerβ–Ύβ–Ί
β—„image_outputβ–Ύβ–Ί
β—„save_prefixComfyUIβ–Ί
β—„file_typepngβ–Ί
β—„embed_workflowtrueβ–Ί
β—„seed0β–Ί

pipeKSamplerSDXL is the SDXL specialist of the tinyterra pipe family: one node that runs the base model and the refiner in sequence, with separate step/CFG/denoise controls for each, then hands you the result and an updated sdxl_pipe. It's for the classic two-stage SDXL setup where the base does the composition and the refiner polishes - without building two sampler chains and manually wiring the latent between them.

SDXL workflows have this awkward shape: a base model that generates the image and a refiner model that takes the base's latent and denoises it further for detail. Normally that's base sampler β†’ latent β†’ refiner sampler, twice the nodes, twice the wiring, and a seed that needs to stay in sync. This node collapses it. The README's tagline is "SDXL Sampler (base and refiner in one)," and that's exactly the deal.

How it works

You feed it an sdxl_pipe from pipeLoaderSDXL (which loads the base and refiner checkpoints plus their prompt encodings). The sampler runs the base model for base_steps, then hands the latent to the refiner for refiner_steps, with separate cfg / denoise for each stage. Set refiner_steps to 0 to skip the refiner entirely if you don't have one loaded.

The same built-ins as the regular pipeKSampler appear here: a quick lora_name / lora_strength apply, the [latent] / [hiresFix] upscale block with factor/rescale options, and inline image_output / save_prefix / file_type / embed_workflow for previewing or saving. Optional overrides cover every piece of the pipeline, including optional_refiner_model, optional_refiner_positive, optional_refiner_negative - so you can run a single checkpoint as base and skip the refiner without a separate branch.

Inputs you'll actually set

  • sdxl_pipe - from pipeLoaderSDXL_v2 (or the legacy SDXL loader).
  • base_steps / refiner_steps - the two stage counts.
  • cfg / denoise for the base; refiner_cfg / refiner_denoise for the refiner. Refiner denoise is usually lower than the base's.
  • sampler_name / scheduler - shared across both stages.

Outputs: the sdxl_pipe (updated), a standard pipe for downstream non-SDXL nodes, model, positive, negative, refiner_model, refiner_positive, refiner_negative, latent, vae, clip, images, seed, plot_image.

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 pipe type is the trap: this node speaks PIPE_LINE_SDXL, a different type from the regular pipe, so wiring a standard pipeLoader output in here does nothing until you convert. Community reports (people trying to jam a Comfyroll lora stack between an SDXL loader and this sampler) also hit the fact that the v2 SDXL loader takes LoRAs through its text box rather than a stack slot - use optional_lora_stack where available, or the in-node lora_name. And the refiner only runs when both refiner_steps is above 0 and a refiner model is actually loaded - leave the default 20 with no refiner installed and the node quietly skips to a base-only run, which is convenient but easy to mistake for a refiner actually running. Set refiner_steps to 0 to make it explicit.

Category🌏 tinyterra/pipe

Inputs (36)

NameTypeDefaultDescription
sdxl_pipePIPE_LINE_SDXLβ€”
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
base_stepsINT201–10000β€”
cfgFLOAT8.000–100β€”
denoiseFLOAT1.000–1β€”
refiner_stepsINT200–10000β€”
refiner_cfgFLOAT8.000–100β€”
refiner_denoiseFLOAT1.000–1β€”
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
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_refiner_modeloptMODELβ€”
optional_refiner_positiveoptCONDITIONINGβ€”
optional_refiner_negativeoptCONDITIONINGβ€”
optional_clipoptCLIPβ€”
input_image_overrideoptIMAGEβ€”
adv_xyPlotoptADV_XYPLOTβ€”

Outputs (14)

NameTypeDescription
sdxl_pipePIPE_LINE_SDXLβ€”
pipePIPE_LINEβ€”
modelMODELβ€”
positiveCONDITIONINGβ€”
negativeCONDITIONINGβ€”
refiner_modelMODELβ€”
refiner_positiveCONDITIONINGβ€”
refiner_negativeCONDITIONINGβ€”
latentLATENTβ€”
vaeVAEβ€”
clipCLIPβ€”
imagesIMAGEβ€”
seedINTβ€”
plot_imageIMAGEβ€”