TBG PiD Creative SDE Sampler
TBG PiD Creative SDE Sampler
- output_1
NVIDIA's PiD models are distilled to a fixed, tiny number of steps - run them with a normal sampler and you're either under-sampling or injecting noise into a schedule that wasn't built for it. This node builds a proper SAMPLER for the PiD SDE, tuned to that distilled schedule, with a few creative knobs on top so "fast distilled upscaler" doesn't have to mean "boring, locked-in result."
The KB has good context on PiD: it's the pixel-diffusion decoder from NVIDIA Research, best known as a fast 4x image upscaler / VAE replacement that invents detail the latent never held. It's also the same family the Refiner's vae_encode = "Nvidia PiD 4x" option uses. If you're using PiD models, you want a sampler that speaks their language.
How it works
The registry registers two samplers, pid_sde and pid_creative_sde; this node builds the creative variant. The core sample_pid_sde function walks a fixed distilled timestep ladder - [0.999, 0.866, 0.634, 0.342, 0.0] - instead of a normal continuous sigma schedule. Distilled models are trained to jump that ladder in one shot per step, so the sampler denoises at exactly those timesteps. The pid_creative_sde wrapper then layers creativity onto that skeleton: it boosts noise and (optionally) CFG in the early steps - where distilled models tend to be most conservative - and adds optional "thinking" steps so the model can reconsider before committing.
This is exactly the distillation trap the KB warns about in general: you can't just throw more steps at a distilled model. The schedule is the model. This sampler respects the schedule and instead gives you levers inside it.
Inputs
- creative_strength (0.35) - how much creative deviation the sampler injects. This is the main dial; 0 gives you the plain PiD behavior.
- early_noise_boost (0.15) - extra noise added in the earliest steps, where structure gets decided. More = more invention, less = more fidelity to the source.
- early_cfg_boost (0) - extra classifier-free guidance in early steps. Zero by default because PiD models are guidance-distilled and don't need much; nudge it only if early steps feel unresponsive.
- think_steps (1, 0–2) - extra "thinking" steps between the distilled ladder. One is the sane default; two roughly doubles cost for marginal gains on most images.
- extra_semantic_step (on) - inserts an extra early-mid step between the first two distilled timesteps, which the source code notes is where semantic (compositional) decisions get made. Turning it off is the fast path.
Output: a single SAMPLER, which you plug into your KSampler's sampler input like any other.
Install
Part of the TBG pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Ltamann/ComfyUI-TBG-ETUR
cd ComfyUI-TBG-ETUR && pip install -r requirements.txt
or ComfyUI Manager → "TBG Enhanced Upscaler," then restart. The PiD side pulls in transformers, diffusers, accelerate, and kornia from requirements.txt - if those failed to install, the sampler may register but the model runtime won't cooperate. You also need PiD model weights; the pack has a dedicated "TBG ETUR Download PiD Model" node for that.
Common issues
- "PID sampler not in the list" - the samplers are registered at import time by
register_tbg_pid_sde_samplers(). If the pack failed to import (usually a missing requirement), the sampler silently won't appear. Check the console for the TBG import error before anything else. - Steps don't behave - remember the schedule is distilled.
stepsin your KSampler is mapped onto the 4-step ladder; asking for 30 steps doesn't give you 30 independent denoise steps, it stretches the same ladder. That's not a bug. - Creative knobs barely move the image - PiD is a fast upscaler at heart. It's not SUPIR; it adds detail but won't hallucinate a full re-imagining. Keep expectations in the "sharpen + add texture" range, or pair it with the Refiner for the heavy lifting.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| creative_strength | FLOAT | 0.350–1 | — |
| early_noise_boost | FLOAT | 0.150–1 | — |
| early_cfg_boost | FLOAT | 0.000–3 | — |
| think_steps | INT | 10–2 | — |
| extra_semantic_step | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output_1 | SAMPLER | — |