Nodes/VRGameDevGirl Video Enhancement Nodes/VRGDG LTX LoRA Train Chunk
ComfyUI Node

VRGDG LTX LoRA Train Chunk

Train an LTX-2 LoRA From Inside ComfyUI, One Chunk at a Time

By vrgamegirl19·Created about a year ago·Updated about 7 hours ago· 718
VRGDG LTX LoRA Train Chunk
  • model
  • model
  • latest_state_path
  • log_path
  • video_filename_prefix
  • output_name
  • completed_steps
  • total_target_steps
dataset_images_dir
workspace_dir
run_nameLTXChunkRun
output_nameLTXChunkRun
resolution_width1920
resolution_height1080
steps_per_run250
total_target_steps3000
network_dim64
network_alpha32
blocks_to_swap4
clear_memory_before_gemmatrue
learning_rate_preset7e-5
learning_rate0.0001
num_repeats1
cache_strategyauto
copy_latest_to_comfy_lorastrue
keep_only_comfy_lorafalse
strength_model1.00
create_captionsfalse
caption_text
add_trigger_wordfalse
trigger_text
musubi_rootA:/MUSUBI/musubi-tuner-ltx2
ltx2_checkpointA:/MUSUBI/models/ltx2/ltx-2.3-22b-dev.safetensors
gemma_rootA:/MUSUBI/models/gemma3
gemma_recovery_modefalse
gemma_load_in_4bitfalse

VRGDG_LTXLoraTrainChunk runs one chunk of LTX-2 LoRA training using musubi-tuner, right from your workflow - train a few hundred steps, preview the result, then run the next chunk and keep going. It's the node that turns LoRA training into a ComfyUI graph instead of a separate terminal ritual.

This is the heaviest node in the pack, and the honest summary is: it's a wrapper around musubi-tuner (kohya-ss's trainer, the one the community has gravitated to for video and modern-architecture training). It shells out to musubi, manages the dataset config, caches the text-encoder embeddings, and hands you back a model with the freshly trained LoRA applied for a quick preview. Nothing about training is free - this needs the trainer installed, a 22B LTX-2 checkpoint, and a serious GPU (musubi's own guidance is 24GB VRAM for video training, 64GB system RAM). What the node buys you is the plumbing.

Inputs worth knowing

There are ~30, which is a lot, but they cluster into a few groups.

The paths - get these right first. musubi_root, ltx2_checkpoint, and gemma_root tell the node where musubi, the base checkpoint, and the Gemma text-encoder files live. The defaults are the author's own Windows machine (A:/MUSUBI/...) - you must repoint these to your install or nothing runs. This is the single most common reason this node fails for someone else.

The dataset. dataset_images_dir (your training images, captioned with sibling .txt files), workspace_dir (where cache, logs, configs, and checkpoints go), run_name/output_name, num_repeats. With create_captions on, the node writes caption files from caption_text, and add_trigger_word/trigger_text prepend a trigger word to each - which, per the LoRA training orthodoxy in the KB, is how you keep a character concept recallable at inference.

The training recipe. resolution_width/resolution_height (defaults 1920×1080; the tooltips suggest 960×540 for light tests), steps_per_run (how many steps this chunk trains - 250 default), total_target_steps (when to stop overall - 3000 default), network_dim (LoRA rank, default 64), network_alpha (default 32, "alpha at half the rank" per the tooltip and the community's modern default), learning_rate_preset (a picker: 1e-4 aggressive through 1e-5 gentle, default 7e-5), and blocks_to_swap (musubi's block swapping to trade VRAM for speed - 0 to disable, 4 balanced, 8–12 for lower-VRAM cards).

The memory dance. clear_memory_before_gemma unloads ComfyUI models before the Gemma text-encoder caching stage (keep it on if stage 2 stalls), gemma_load_in_4bit squeezes VRAM further, and gemma_recovery_mode is the experimental fallback if caching fails. cache_strategy (auto/force/skip) controls whether the cache rebuilds.

The outputs. model comes back with the latest LoRA applied at strength_model (0.0 disables the application) so you can run a preview generation right in the graph. copy_latest_to_comfy_loras drops the .comfy.safetensors file into your ComfyUI loras folder (and keep_only_comfy_lora cleans up the raw files). Plus latest_state_path, log_path, video_filename_prefix, output_name, and the two progress ints completed_steps and total_target_steps.

Why "chunked" training is the point

Train 250 steps, preview the LoRA on a real generation, and only then decide whether to keep going. If the preview is weak, tweak the recipe and run another chunk; if it's overfit, stop early. You're never committing to a 3,000-step run blind - which matters because LTX-2 LoRA training is expensive enough that a wasted full run is a real loss. The chunk model is genuinely the right way to train on video hardware.

Install

Same pack install:

cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl

Restart ComfyUI; find it under VRGDG/Training. Then the real install: get musubi-tuner (the LTX-2 variant) onto disk, download the LTX-2/2.3 checkpoint and Gemma files, and point the three path inputs at them. The pack's requirements.txt (kornia, librosa, imageio) does not cover musubi's own dependencies - musubi is a separate project with its own environment.

Honest note

This node is the one I'd call "for the author's own machine first." The Windows absolute-path defaults, the musubi dependency, and the 24GB+ VRAM appetite mean it's not a beginner toy - but if you're already running musubi-tuner for LTX-2, this genuinely saves you the config-file drudgery and gives you the loop-training workflow for free. The single biggest gotcha (the A:/MUSUBI paths) is also the easiest to fix: repoint, verify the checkpoint loads, and start with 50 steps per chunk to smoke-test before spending real time.

CategoryVRGDG/Training

Inputs (29)

NameTypeDefaultDescription
modelMODELBase model to return downstream with the latest trained LoRA optionally applied.
dataset_images_dirSTRINGFolder containing your training images, or a parent folder that will be organized into an images subfolder.
workspace_dirSTRINGWorking folder for cache, logs, config files, checkpoints, and training state.
run_nameSTRINGLTXChunkRunName prefix used for the log file.
output_nameSTRINGLTXChunkRunName prefix used for saved LoRA files and state folders.
resolution_widthINT192064–8192Training bucket width written to the musubi dataset config. Examples: 960 for lighter tests, 1280 for medium runs, 1920 for full HD style training.
resolution_heightINT108064–8192Training bucket height written to the musubi dataset config. Examples: 540 for lighter tests, 720 for medium runs, 1080 for full HD style training.
steps_per_runINT2501–100000How many steps to train per run, and also when to save the LoRA/state at the end of that run. Examples: 50 for quick tests, 250 for normal preview cadence, 500 for longer chunks.
total_target_stepsINT30001–1000000Training stops once the latest saved step reaches this total. Examples: 1000 for a short experiment, 3000 for a normal run, 6000+ for longer training.
network_dimINT641–2048LoRA rank. Higher values increase capacity and VRAM usage. Examples: 16 for very small tests, 32 for lighter runs, 64 as a common default, 128 for larger higher-capacity LoRAs.
network_alphaINT321–2048LoRA alpha scaling value. A common pairing is alpha at half the rank. Examples: rank 16 -> alpha 8, rank 32 -> alpha 16, rank 64 -> alpha 32.
blocks_to_swapINT40–64Higher values reduce VRAM usage but usually slow training. Use 0 to disable block swapping. Examples: 0 for max speed if VRAM is sufficient, 4 as a balanced default, 8 to 12 for lower VRAM cards.
clear_memory_before_gemmaBOOLEANtrueTries to unload ComfyUI models and clear VRAM/RAM before Gemma text encoder caching. Keep enabled if stage 2 tends to stall.
learning_rate_presetCOMBO7e-5Quick preset for the training learning rate. Examples: 1e-4 for aggressive training, 7e-5 as a common default, 5e-5 or 3e-5 for gentler training. Choose Custom to use the float input below.
learning_rateFLOAT0.00011e-8–1Custom learning rate used only when the preset is set to Custom. Examples: 0.0001 = 1e-4, 0.00007 = 7e-5, 0.00005 = 5e-5, 0.00003 = 3e-5.
num_repeatsINT11–1000How many times each image-caption pair is repeated in the dataset. Examples: 1 for normal use, 2 to 4 if the dataset is very small, higher only when you intentionally want more repeats.
cache_strategyCOMBOautoAuto builds cache only when needed, Force always rebuilds it, Skip goes straight to training.
copy_latest_to_comfy_lorasBOOLEANtrueCopies the latest Comfy-compatible LoRA into the ComfyUI loras folder after training.
keep_only_comfy_loraBOOLEANfalseIf enabled, deletes the standard .safetensors LoRA files after a matching .comfy.safetensors file exists. Resume state folders are kept.
strength_modelFLOAT1.00-100–100Strength used if the node applies the latest LoRA back onto the output model. Examples: 1.0 for normal preview, 0.7 for a lighter effect, 0.0 to effectively disable applying the LoRA to the returned model.
create_captionsBOOLEANfalseIf enabled, missing caption txt files are created automatically using the caption text input.
caption_textSTRINGBase caption text used when create_captions is enabled and an image has no caption file. Example: woman portrait, cinematic close-up, soft natural light.
add_trigger_wordBOOLEANfalseIf enabled, the trigger text is prepended to each caption.
trigger_textSTRINGTrigger word or phrase to prepend to captions when add_trigger_word is enabled. Examples: miranda, my_character, retro-future heroine.
musubi_rootSTRINGA:/MUSUBI/musubi-tuner-ltx2Root folder of your musubi-tuner-ltx2 install.
ltx2_checkpointSTRINGA:/MUSUBI/models/ltx2/ltx-2.3-22b-dev.safetensorsPath to the base LTX-2 checkpoint used for caching and training.
gemma_rootSTRINGA:/MUSUBI/models/gemma3Folder containing the Gemma model files used for text encoder caching.
gemma_recovery_modeBOOLEANfalseExperimental. If enabled, the node will keep the normal Gemma cache path first, then try alternate cache settings if that stage fails.
gemma_load_in_4bitBOOLEANfalseLoads Gemma in 4-bit mode during text encoder caching. This lowers VRAM more than 8-bit, but can be slower or less stable.

Outputs (7)

NameTypeDescription
modelMODEL
latest_state_pathSTRING
log_pathSTRING
video_filename_prefixSTRING
output_nameSTRING
completed_stepsINT
total_target_stepsINT