ComfyUI Node

ADSDSampler

Text-to-image at multi-GPU speed — ADSDSampler

By SlackinJack·Created 2 years ago·Updated about a year ago· 0
ADSDSampler
  • model
  • config
  • lora
  • scheduler
  • IMAGE
model_typesd1
positive_prompt
negative_prompt
width512
height512
seed0
steps60
guidance_scale3.5

ADSDSampler is the pack's text-to-image sampler: prompt in, IMAGE out, with the denoising split across your GPUs by AsyncDiff. It's the SD 1.5/2.1, SDXL, and SD3 text-to-image lane of asyncdiff_comfyui, and it's the node where you should think hardest about whether you actually need this pack at all.

Because here's the honest take: for a single still image, AsyncDiff is often the wrong tool. The community figured this out the day the framework dropped - people asked "can I run this on multiple GPUs in ComfyUI?" and the response was basically "SDXL Turbo and LCM already solved image speed without needing a second card." AsyncDiff's real value is when you have multiple GPUs sitting idle and want a big image (or a batch of them) faster than one card can manage, and especially for video, where the speed tricks that fixed images don't exist. On one GPU, this sampler is just slower than ComfyUI's native KSampler.

How it works

Same AsyncDiff machinery as the rest of the pack. The noise-prediction model is split into N components (your model_n), each on its own GPU. Instead of every denoising step waiting for the previous one, the framework exploits how similar hidden states are between consecutive steps: after a warm-up phase, each component predicts its next input and computes in parallel. The serial chain becomes a pipeline. The paper's own number: ~2.8x faster on SDXL with four devices, with output quality close to the sequential run.

Inputs that matter

  • model - your AD_MODEL from ADModelLoader. model_type - sd1, sd2, sd3, or sdxl; this tells the pipeline which architecture the model is, and getting it wrong means it fails weirdly, so set it right the first time.
  • config - the AD_CONFIG from ADPipelineConfigurator. Yes, it's mandatory. This pack doesn't run without it.
  • positive_prompt / negative_prompt - the usual. Multiline, so your full prompt fits.
  • steps (default 60) - generous; you can usually back off toward 30–40 for SD1.5/SDXL depending on scheduler.
  • guidance_scale (default 3.5) - on the low side, which is normal for this pack's defaults. Crank it toward 7+ if your images look undercooked, but the default isn't wrong.
  • Optional lora (from ADLoraLoader or ADMultiLoraCombiner) and scheduler (from ADSchedulerSelector).

Output is a single IMAGE, wired to a preview or save node like any other generation.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/SlackinJack/asyncdiff_comfyui.git
cd asyncdiff_comfyui
./clone_asyncdiff_repo.sh   # required - pulls the upstream AsyncDiff framework

Restart ComfyUI, or use ComfyUI Manager (search "asyncdiff_comfyui"). Underneath you need NVIDIA multi-GPU, CUDA >= 12.0, and the pack's torch.distributed / diffusers / accelerate deps.

Where people get burned

The #1 mistake is expecting this to beat ComfyUI's native sampler on one GPU - it won't, and it isn't supposed to. #2 is model_type mismatch. And #3 is the README's support note: the author's stated working path is stable-video-diffusion-img2vid, so the SD lane here is the less-tested side of the pack. It works - but you're the QA department.

CategoryAsyncDiff/Samplers (StableDiffusion)

Inputs (12)

NameTypeDefaultDescription
modelAD_MODEL
model_typeCOMBOsd14 options: sd1, sd2, sd3, sdxl
configAD_CONFIG
positive_promptSTRING
negative_promptSTRING
widthINT5128–4294967295
heightINT5128–4294967295
seedINT00–4294967295
stepsINT601–4294967295
guidance_scaleFLOAT3.50–4294967295
loraoptAD_LORA
scheduleroptAD_SCHEDULER

Outputs (1)

NameTypeDescription
IMAGEIMAGE