ComfyUI Node

musubi

Musubi, the Wan trainer, without the Dockerfile

By civitai·Created 2 months ago·Updated about a month ago· 42
musubi
  • model
  • api_config
  • moderation_status
  • epochs
  • sample_images_prompts
  • sample_input_images
  • stored_as_assets
  • eta
  • workflow_id
  • raw_json
training_data
training_data_images_count0
lora_namemy-lora
sample_prompts_json
negative_prompt
epochs5
resolution512
enable_buckettrue
unet_lr0.00
lr_scheduler
lr_scheduler_num_cycles3
network_dim1
network_alpha1
optimizer_type
target_steps0

Musubi is the LoRA trainer the Wan community actually uses - it's the standard tool for training Wan LoRAs locally, and it's famously fiddly to stand up (Docker, CUDA versions, a mountain of moving parts). This node is the whole Musubi training recipe, running on Civitai's farm, controlled from a ComfyUI node. You get the Musubi parameter vocabulary without the setup: epochs, resolution, enable_bucket, unet_lr, lr_scheduler, network_dim/network_alpha, optimizer_type.

The framing matters: unlike kohya (SD/SDXL-centric), Musubi is the Wan-specific trainer. So this node is the answer to "I want a Wan LoRA" - for a character, a style, a motion tendency - without fighting a local Musubi install or renting a GPU with enough VRAM (Wan training is heavy; 5B eats a lot, 14B eats everything).

How it works

Hosted training, same as the pack's other training nodes: model (required, CIVITAI_AIR from a Civitai Model Selector - wire the Wan checkpoint you're training on), training_data (required, a URL), training_data_images_count (required, cost input). Then the Musubi surface, which is a trimmed kohya-style set:

  • epochs - default 5, up to 20. One pass through the dataset.
  • resolution - default 512; training images get scaled down to this.
  • enable_bucket - default true; buckets images by size. Leave it on unless all your images are identical dimensions.
  • unet_lr - 5e-05 default.
  • network_dim / network_alpha - the rank/alpha pair; dim 1 is the default here which is very low capacity - for Wan, expect to raise dim into the 8–32 range and match alpha to it.
  • lr_scheduler, lr_scheduler_num_cycles, optimizer_type, target_steps - the rest.

Outputs: moderation_status, epochs, sample_images_prompts, sample_input_images, stored_as_assets, eta, workflow_id, raw_json.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/civitai/civitai-comfy-nodes.git
pip install -r civitai-comfy-nodes/requirements.txt

Or ComfyUI Manager → "Civitai Comfy Nodes" → Install → restart. Authenticate (CIVITAI_API_TOKEN or sidebar); training bills in Buzz, and Wan training is not cheap.

Gotchas

The default network_dim of 1 is the thing that will bite you - that's effectively a toy-rank placeholder, and a Wan LoRA trained at dim 1 will look like nothing happened. Plan to raise it (and set network_alpha sensibly relative to it; the KB's rank/alpha guidance applies unchanged: alpha/dim ≈ how hard the rank applies). Also, Wan training wants a lot of data and a lot of steps, so eta will read like a small novel - that's normal, not a hang. And the usual cloud-training rules hold: dataset on a reachable URL, count your images honestly (it drives cost), and this being early preview means the recipe surface can shift. If you want a Wan LoRA and the Dockerfile was the blocker, this node is the point-and-click version - just remember it's Musubi underneath, with all of Musubi's data appetite.

CategoryCivitai/Training/musubi

Inputs (17)

NameTypeDefaultDescription
modelCIVITAI_AIRThe primary model to train upon.
training_dataSTRINGA url referring data to use in training.
training_data_images_countINT00–2147483647The number of images embedded in this training data. This is used to calculate the cost of training.
lora_nameoptSTRINGmy-loraThe desired lora name.
sample_prompts_jsonoptSTRINGA selection of sample prompts.
negative_promptoptSTRINGAn optional negative prompt that will get applied when generating samples
epochsoptINT50–20Number of training epochs. An epoch is one complete pass through the training dataset. Maximum of 20 epochs can be specified.
resolutionoptINT512512–1024Specify the maximum resolution of training images. If the training images exceed the resolution specified here, they will be scaled down to this resolution
enable_bucketoptBOOLEANtrueSorts images into buckets by size for the purposes of training. If your training images are all the same size, you can turn this option off, but leaving it on has no effect.
unet_lroptFLOAT0.000–1Sets the learning rate for U-Net. This is the learning rate when performing additional learning on each attention block (and other blocks depending on the setting) in U-Net
lr_scheduleroptCOMBOYou can change the learning rate in the middle of learning. A scheduler is a setting for how to change the learning rate.
lr_scheduler_num_cyclesoptINT31–4This option specifies how many cycles the scheduler runs during training. It is only used when "cosine_with_restarts" or "polynomial" is used as the scheduler.
network_dimoptINT11–256The larger the Dim setting, the more learning information can be stored, but the possibility of learning unnecessary information other than the learning target increases. A larger Dim also increases LoRA file size.
network_alphaoptINT11–256The smaller the Network alpha value, the larger the stored LoRA neural net weights. For example, with an Alpha of 16 and a Dim of 32, the strength of the weight used is 16/32 = 0.5, meaning that the learning rate is only half as powerful as the Learning Rate setting. If Alpha and Dim are the same number, the strength used will be 1 and will have no effect on the learning rate.
optimizer_typeoptSTRINGThe optimizer determines how to update the neural net weights during training. Various methods have been proposed for smart learning, but the most commonly used in LoRA learning is "AdamW8bit" or "Adafactor" for SDXL.
target_stepsoptINT00–2147483647
api_configoptCIVITAI_CONFIGOptional Civitai Auth connection; defaults to CIVITAI_API_TOKEN or stored OAuth login.

Outputs (8)

NameTypeDescription
moderation_statusSTRING
epochsSTRING
sample_images_promptsSTRING
sample_input_imagesSTRING
stored_as_assetsSTRING
etaSTRING
workflow_idSTRING
raw_jsonSTRING