LaVi-Bridge Sampler
The entire KSampler pipeline, boxed into one node
- lavibridge_model
- lavi_embeds
- images
In a normal ComfyUI workflow, sampling is a pipeline: empty latents, a KSampler, a VAEDecode, and a fistful of helper nodes in between. The LaVi-Bridge Sampler collapses all of that into one node. It takes the bridged model from the LaVi-Bridge Model Loader and the embeddings from a LaVi-Bridge encoder, runs the whole diffusion loop internally - noise, scheduler, classifier-free guidance, VAE decode - and hands you finished IMAGE tensors. If the Model Loader is the pack's checkpoint converter and the encoder is its text brain, this is the renderer.
How it works
The node builds a diffusers scheduler from a fixed SD1.5 config (beta_start 0.00085, scaled_linear, 1000 train timesteps), generates random latents seeded from seed, and repeats your prompt embeddings to match batch_size. Then the loop runs: each step, the latent is concatenated with itself, the UNet predicts noise for both halves, and the node does classifier-free guidance the classic way - uncond + guidance_scale * (cond - uncond) - before stepping the scheduler. When it's done, the latents get scaled and passed through the converted AutoencoderKL for decode. There's a tqdm progress bar, so you can watch it churn.
Because all of that lives inside one node, the usual ComfyUI levers don't apply here. You can't slide a LoraLoader in, you can't hook ControlNet into it, and you can't route its latents to a different sampler - LaVi-Bridge doesn't support ControlNet at all, a limitation the community flagged in the research repo's issues. The sampler is the whole show.
Inputs that matter
- lavibridge_model (
LAVIBRIDGE) and lavi_embeds (LAVIEMBEDS) - the only wiring. Straight from the Model Loader and one of the two encoders. - width / height (
INT, default 512, step 64, max 2048) - remember this is SD1.5 underneath; 512 or 768 is your real range. - batch_size (
INT, default 1) - the embeddings are repeated to match, so CFG still behaves correctly at batch > 1. - steps (
INT, default 25) - the usual tradeoff. 25 with the default scheduler is fine. - guidance_scale (
FLOAT, default 7.5) - this is the real CFG scale, applied inside the loop. SD1.5 reflexes apply: nudge it up for prompt adherence, down for freedom. - seed (
INT) - reproducibility. Same seed, same latents, same image. - scheduler - ten choices, default
DPMSolverMultistepScheduler, which is the right call and what you should leave it on. The full diffusers menu is here -DDPMScheduler,DDIMScheduler,Euler,EulerAncestral,PNDM,DEIS,UniPC- plusLCMSchedulerif you want to chase 4-step generations. Nobody's promising LCM quality on an adapter that wasn't trained for it, but it's there.
The single output, images (IMAGE), plugs into a PreviewImage or SaveImage like any other image tensor.
Installing and first-run gotchas
Install is pack-wide: ComfyUI Manager search "ComfyUI-LaVi-Bridge-Wrapper", or
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-LaVi-Bridge-Wrapper
pip install -r requirements.txt
(diffusers>=0.26.0, sentencepiece, peft>=0.8.2 - and transformers/omegaconf if your setup errors on them.) First run downloads shihaozhao/LaVi-Bridge into ComfyUI/models/lavibridge/ if the Model Loader hasn't already, so give the first generation a minute.
The practical trap with this node is expectation management. It's a self-contained 2024 experiment that renders SD1.5 - decent prompt adherence from the T5 path, but no ControlNet, no SDXL, no ecosystem around it. If you go in wanting a drop-in KSampler replacement, you'll be annoyed. If you go in wanting to see what the "LLM as text encoder" wave looked like before it got absorbed into everything modern, this one node is the whole pipeline, and it's fun to watch.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| lavibridge_model | LAVIBRIDGE | — | |
| lavi_embeds | LAVIEMBEDS | — | |
| width | INT | 51264–2048 | — |
| height | INT | 51264–2048 | — |
| batch_size | INT | 11–256 | — |
| steps | INT | 251–200 | — |
| guidance_scale | FLOAT | 7.500–20 | — |
| seed | INT | 00–18446744073709550000 | — |
| scheduler | COMBO | DPMSolverMultistepScheduler | 10 options: DPMSolverMultistepScheduler, DPMSolverMultistepScheduler_SDE_karras, DDPMScheduler, LCMScheduler, PNDMScheduler, DEISMultistepScheduler, +4 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |