ComfyUI Node

ADMD_DiffusersLoader

Train from a HuggingFace-style SD 1.5 folder — or just let it download one

By kijai·Created 3 years ago·Updated 2 years ago· 187
ADMD_DiffusersLoader
  • additional_models
  • PIPELINE
download_defaultfalse
schedulerDDIMScheduler
use_xformersfalse
model

ADMD_DiffusersLoader is the loader for people whose SD 1.5 lives in HuggingFace's folder format rather than as a single checkpoint file. Point it at a diffusers directory under ComfyUI/models/diffusers/, feed it the ADDITIONAL_MODELS output from ADMD_AdditionalModelSelect, and you get the same training PIPELINE the other loaders produce.

It's also the zero-hunting option: tick download_default and the node will snapshot_download the classic runwayml/stable-diffusion-v1-5 repo into models/diffusers/ for you, skipping the safetensors/ckpt/png and safety-checker files - it only wants the small structural files (VAE, tokenizer, text encoder, UNet config) plus the diffusers weights it needs. If you don't already own an SD 1.5 in any format, that button is the fastest way to a working training graph.

How it works

Rather than converting a monolithic checkpoint, this node loads each piece from its subfolder: AutoencoderKL.from_pretrained(..., subfolder="vae"), CLIPTextModel and CLIPTokenizer from their subfolders, and the UNet via UNet3DConditionModel.from_pretrained_2d(..., subfolder="unet") with AnimateDiff's additional config. Then the usual pipeline assembly: freeze unet/vae/text_encoder, enable gradient checkpointing, optional xformers, load the motion module and domain adapter, build the two noise schedulers (linear + scaled_linear). The result is the identical PIPELINE bundle that feeds ADMD_InitializeTraining.

Inputs and output

  • additional_models - from ADMD_AdditionalModelSelect.
  • download_default - off by default. Tick it to pull runwayml/stable-diffusion-v1-5 into models/diffusers/. Since the node re-executes every queue, the download/check can rerun - snapshot_download is idempotent, so it'll just verify what's there.
  • model (optional) - a dropdown of existing diffusers folders found by scanning models/diffusers/ for model_index.json. When download_default is on, it uses the downloaded folder regardless.
  • scheduler - DDIMScheduler (default) or DDPMScheduler for training noise. Leave it.
  • use_xformers - off by default; only relevant if xformers is installed.

Output: one PIPELINEADMD_InitializeTraining.

Install and gotchas

Standard pack install: ComfyUI Manager → "ADMotionDirector", or clone into custom_nodes/ and restart, then install the dependencies ComfyUI doesn't include:

cd ComfyUI/custom_nodes/ComfyUI-ADMotionDirector
pip install -r requirements.txt

(portable: python_embeded\python.exe -m pip install -r ...). That's diffusers, transformers, huggingface_hub, lion-pytorch, peft, loralib, einops, omegaconf, and imageio. huggingface_hub>=0.20.3 is pinned because the auto-download needs it. And requirements.txt doesn't force a CUDA torch - make sure your ComfyUI env already has the CUDA build, or the whole training side will crawl.

A quick reality check on the base model: this trains onto an SD 1.5 UNet (the diffusers download is exactly that), so the output motion LoRA is SD 1.5-only, like every AnimateDiff artifact. If you picked this pack for general video training, know that AnimateDiff's ecosystem has been superseded by modern video models - this node is the convenient path in, not a sign the base model is current.

CategoryAD_MotionDirector

Inputs (5)

NameTypeDefaultDescription
additional_modelsADDITIONAL_MODELS
download_defaultBOOLEANfalse
schedulerCOMBODDIMScheduler2 options: DDIMScheduler, DDPMScheduler
use_xformersBOOLEANfalse
modeloptCOMBO0 options:

Outputs (1)

NameTypeDescription
PIPELINEPIPELINE