Nodes/VRGameDevGirl Video Enhancement Nodes/VRGDG Krea 2 LoRA Train Chunk
ComfyUI Node

VRGDG Krea 2 LoRA Train Chunk

Train a chunk of a Krea 2 LoRA and get a native safetensors path back

By vrgamegirl19·Created about a year ago·Updated about 7 hours ago· 718
VRGDG Krea 2 LoRA Train Chunk
    • latest_lora_path
    • latest_state_path
    • log_path
    • output_name
    • completed_steps
    • total_target_steps
    dataset_images_dir
    workspace_dirA:/MUSUBI/Training/Krea2LoraTrain
    run_nameKrea2ChunkRun
    output_nameKrea2ChunkRun
    resolution_width1024
    resolution_height1024
    steps_per_run250
    total_target_steps3000
    network_dim32
    network_alpha32
    blocks_to_swap4
    clear_memory_before_text_encodertrue
    learning_rate_preset1e-4
    learning_rate0.0001
    num_repeats1
    cache_strategyauto
    copy_latest_to_comfy_lorasfalse
    create_captionsfalse
    caption_text
    add_trigger_wordfalse
    trigger_text
    musubi_rootA:/MUSUBI/musubi-tuner-ltx2
    krea2_raw_ditA:/MUSUBI/models/krea2/raw.safetensors
    vaeA:/MUSUBI/models/qwen_image/qwen_image_vae.safetensors
    text_encoderA:/MUSUBI/models/qwen3vl/qwen3vl_4b_bf16.safetensors
    fp8_basetrue
    fp8_scaledtrue
    timestep_samplingshift
    discrete_flow_shift2.5

    VRGDG Krea 2 LoRA Train Chunk is the workhorse: it runs one Krea 2 LoRA training chunk through musubi-tuner and hands you the path to the trained .safetensors - in native Krea 2 form, no Comfy conversion attempted. "One chunk" is the design: you train a slice of steps, get a LoRA and a state save, then decide whether to continue. It's the node the LoRA Studio UI drives under the hood, and you can also wire it directly into a graph.

    This is the modern LoRA training reality in one node. The old SDXL-era rules don't port to a 12B Qwen3-VL-based model - you don't train the text encoder, you cache embeddings once, and the rank/alpha tables people memorized for SDXL are wrong here. Krea 2's own docs (which the node's defaults follow) recommend rank 32, alpha 32, fp8 base weights, and a shift timestep sampling at 2.5. The node's defaults are the author's reading of those docs, which is the right place to start.

    The inputs that matter

    • dataset_images_dir - your training images (or a parent that gets organized into an images subfolder). It's everything: curation beats every other knob.
    • workspace_dir - working folder for caches, logs, configs, checkpoints, and training state.
    • steps_per_run (250) and total_target_steps (3000) - one chunk's length and when training stops. Lower steps_per_run = more frequent saves, easier iteration.
    • resolution_width/height - 1024 default, matching Krea 2's native inference resolution.
    • network_dim / network_alpha - rank and alpha, both 32 per Krea 2 docs.
    • blocks_to_swap - how many Krea 2 main blocks to offload to CPU (default 4, max 26). This is your VRAM lever: on a tight GPU, raise it; it slows training but keeps you under the ceiling.
    • fp8_base / fp8_scaled - both on. Krea 2 requires fp8_scaled whenever fp8_base is enabled, so keep them in lockstep.
    • learning_rate_preset - quick picks (1e-4 default) or Custom to use the float below. 1e-4 is hot for a 12B; the KB's modern-model experience suggests going lower (5e-5, 3e-5) is often safer.
    • cache_strategy - auto builds the cache only when needed, force always rebuilds, skip jumps straight to training. First run uses auto and pays the cache cost once.
    • create_captions / caption_text / add_trigger_word / trigger_text - caption handling. Caption what should vary; leave fixed things undescribed. A trigger word helps but isn't magic.
    • musubi_root, krea2_raw_dit, vae, text_encoder - the environment paths. These are exactly what VRGDG Krea 2 Musubi Installer outputs, so wire them through rather than typing them.

    The outputs

    • latest_lora_path - the trained native Krea 2 LoRA. This is the one you actually want.
    • latest_state_path - training state, for continuing a chunked run.
    • log_path, output_name, completed_steps, total_target_steps - run bookkeeping.

    Installing it

    Pack install (Manager → search vrgamedev, or git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl.git), restart, hard-refresh. This node does not install the training stack - you need the Musubi installer to have run, with a Python 3.10–3.12 environment, or it will fail at first contact.

    Common issues

    • Errors before training starts. Almost always the environment: musubi not installed, wrong Python, or model paths that don't exist. Verify with the installer's report_path and the paths it output.
    • OOM mid-run. Raise blocks_to_swap, or free VRAM first (the clear_memory_before_text_encoder toggle helps at the cache step). Drop resolution if it persists.
    • Loss looks weird / output is garbage. Krea 2 training is young. Sample what you train (VRGDG LoRA From Path Model Only is made for this), compare chunks, and stop when the last saved chunk is worse, not the number of steps.

    This is not a beginner's first training node - it assumes you have a stack stood up and a dataset worth the compute. If you do, it's the cleanest way to get a native Krea 2 LoRA out of ComfyUI.

    CategoryVRGDG/Training

    Inputs (29)

    NameTypeDefaultDescription
    dataset_images_dirSTRINGFolder containing your training images, or a parent folder that will be organized into an images subfolder.
    workspace_dirSTRINGA:/MUSUBI/Training/Krea2LoraTrainWorking folder for cache, logs, config files, checkpoints, and training state.
    run_nameSTRINGKrea2ChunkRunName prefix used for the log file.
    output_nameSTRINGKrea2ChunkRunName prefix used for saved LoRA files and state folders.
    resolution_widthINT102464–8192Training bucket width written to the musubi dataset config.
    resolution_heightINT102464–8192Training bucket height written to the musubi dataset config.
    steps_per_runINT2501–100000How many steps to train per run, and also when to save the LoRA/state at the end of that run.
    total_target_stepsINT30001–1000000Training stops once the latest saved step reaches this total.
    network_dimINT321–2048LoRA rank. Krea 2 docs recommend 32 as the default.
    network_alphaINT321–2048LoRA alpha scaling value. Krea 2 docs recommend 32 as the default.
    blocks_to_swapINT40–26How many Krea 2 main blocks to offload to CPU. Krea 2 docs list 26 as the maximum.
    clear_memory_before_text_encoderBOOLEANtrueTries to unload ComfyUI models and clear VRAM/RAM before text encoder caching.
    learning_rate_presetCOMBO1e-4Quick preset for the training learning rate. Choose Custom to use the float input below.
    learning_rateFLOAT0.00011e-8–1Custom learning rate used only when the preset is set to Custom.
    num_repeatsINT11–1000How many times each image-caption pair is repeated in the dataset.
    cache_strategyCOMBOautoAuto builds cache only when needed, Force always rebuilds it, Skip goes straight to training.
    copy_latest_to_comfy_lorasBOOLEANfalseCopies the latest native Krea 2 LoRA into the ComfyUI loras folder after training.
    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.
    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.
    musubi_rootSTRINGA:/MUSUBI/musubi-tuner-ltx2Root folder of a native Krea 2-capable musubi-tuner install.
    krea2_raw_ditSTRINGA:/MUSUBI/models/krea2/raw.safetensorsPath to the Krea 2 RAW DiT checkpoint used for training.
    vaeSTRINGA:/MUSUBI/models/qwen_image/qwen_image_vae.safetensorsPath to the Qwen-Image VAE checkpoint.
    text_encoderSTRINGA:/MUSUBI/models/qwen3vl/qwen3vl_4b_bf16.safetensorsPath to the Qwen3-VL-4B-Instruct single safetensors text encoder.
    fp8_baseBOOLEANtrueEnable fp8 base model weights during Krea 2 training. Krea 2 requires fp8_scaled with this.
    fp8_scaledBOOLEANtrueEnable dynamic scaled fp8 weights during Krea 2 training. Required when fp8_base is enabled.
    timestep_samplingCOMBOshiftKrea 2 docs recommend shift with discrete_flow_shift=2.5 for 1024px.
    discrete_flow_shiftFLOAT2.50–10Used when timestep_sampling is shift. 2.5 matches Krea 2's 1024x1024 inference time-shift.

    Outputs (6)

    NameTypeDescription
    latest_lora_pathSTRING
    latest_state_pathSTRING
    log_pathSTRING
    output_nameSTRING
    completed_stepsINT
    total_target_stepsINT