翻篇收录说明
翻篇网页快照

Fine-tuning Video Models with LoRA locally | Unsloth Documentation

https://unsloth.ai/docs/basics/fine-tune-video-models-with-lora

最近抓取:2026-12-04 23:18:13(北京时间)

最近内容变化:2026-12-02 10:46:18(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Train a video LoRA in Unsloth from your own images or clips, with examples for LTX-2.5 and MiniMax-H3.

正文摘录

A LoRA is a small add-on that teaches a video model a new style or subject. In Unsloth you train one on the Video page without writing code, then use it to generate videos. LTX-2.5 learns from still images, so you can train a video style from 10 to 50 pictures. MiniMax-H3 learns picture and sound together from short clips with audio.Each example shows the same prompt and seed without (left) and with (right) a LoRA trained in Unsloth. Previews are downscaled and loop.LTX-2.5 without the LoRAWith a LoRA trained on 16 neon line-art imagesMiniMax-H3 without the LoRAWith a LoRA trained on 12 one-second clipsWhich models you can trainModelTraining dataGPUDefault steps, rank, learning rate, resolutionPreviews while trainingLTX-2.510 to 50 still images with captionsNVIDIA with bf16 (Ampere or newer), about 24 GB500, 32, 0.0001, 512NoMiniMax-H3Short video clips with sound and captions80 GB+ suggested (49.7 GB peak in our run)500, 16, 0.0001, 768 (short edge)NoBoth use a constant schedule with 20 warmup steps, and Base precision Auto picks the frozen base's precision by free GPU memory. Video LoRAs are merged into the model when it loads, so after adding, removing or reweighting a LoRA, click Reload to apply. For image models, see How to Run Image Diffusion Models Locally with Unsloth and each model's fine-tune guide.How to train a video LoRA from imagesThis walkthrough uses LTX-2.5, which trains on still images: the LoRA learns a look or subject from pictures and applies it to every frame it generates.LTX-2.5 LoRA training is available in Unsloth Desktop v0.1.920-beta and later builds. Update Unsloth if the model isn't in Train.You need:An NVIDIA GPU with bf16 support (Ampere or newer). Unsloth suggests about 24 GB. LTX-2.5 cannot train on a T4, on the CPU or on a Mac.10 to 50 images of one style or subject.A trigger word in every caption, such as sks neon style, to turn the LoRA on in prompts.For the best results, a Hugging Face token that has accepted the license of Lightricks/LTX-2.5-Diffusers, so Unsloth trains the dev model (see Which model trains).1Prepare your imagesFormats: PNG, JPG, WebP or BMP.Captions: a .txt (or .caption) file with the same name next to each image, for example neon_00.png and neon_00.txt, or a metadata.jsonl with one line per image, such as {"file_name": "neon_00.png", "text": "a geometric composition, sks neon style"}.Trigger word: put it in every caption. Images without a caption use the Trigger prompt; with no trigger prompt they are skipped.One of our 16 training images, captioned "a geometric composition, sks neon style"2Open Train and pick LTX-2.5On the Video page, click Train. Click the model name at the top left and pick Lightricks/LTX-2.5-Diffusers under LTX-2.5. Training fetches only what it needs: the VAEs, connectors, scheduler and INT8 Gemma 4 text encoder (about 13 GB) from unsloth/LTX-2.5-FP8, and the 38 GB dev video model from Lightricks/LTX-2.5-Diffusers.3Add your imagesUnder Training images, pick Upload new images... and upload the images with their captions, or start from an example dataset. Set an Adapter name (the LoRA's name on the Video page).4Check the settingsDefaults: 500 steps, rank 32, learning rate 0.0001, 512 px, constant schedule with 20 warmup steps. Resolution must be a multiple of 32.Train settings, steps lowered to 30 for a short testBase precision: Auto picks bf16 with more than about 63 GB of free GPU memory, INT8 with more than about 48 GB, and nf4 otherwise. nf4 uses the least memory.5Start trainingClick Start training. Unsloth first encodes your captions with the text encoder, then closes the encoder and loads the video model, so the two are never on the GPU together. The loss is noisy; watch the smoothed line.Training on an NVIDIA L4 (24 GB)A finished run6Use the LoRAWhen Adapter ready appears, click Deploy to Video. Unsloth loads the model with your LoRA at weight 1 and puts your Trigger prompt in the prompt box. Prompt with your trigger word and click Generate.The LoRA after Deploy to VideoTo add it yourself, load the model on the Video page, click Add LoRA, pick your LoRA, then click Reload to apply.Examples by modelLTX-2.5Training data: still images. Our reference run used 16 neon line-art images, an nf4 base, rank 32, learning rate 0.0002, 512 px and 300 steps on an A100 80 GB (Colab). The mean loss per 50 steps fell from 1.39 to about 1.00. It trained at 1.07 images/s and took about 10 minutes including the downloads.MemoryA100 80 GB, nf4Training loop peak11.7 GBWhole GPU peak (text encoder included)22.9 GBSystem RAM, training processes20.5 GBA 30-step test with the defaults (Auto picked nf4) also trains on an NVIDIA L4 (24 GB): 0.46 images/s and an 11.8 GB peak in the training loop.Seed 7, 768 × 512, 25 frames at 24 fps, 8 steps, guidance 1; only the LoRA weight changes. Prompt: a cat sitting on a sofa in a cozy living room, sks neon styleNo LoRAWeight 0.5Weight 1Prompt: a mountain landscape at sunset with a lake, sks neon styleNo LoRAWeight 0.5Weight 1Weight 0.5 adds neon accents; weight 1 turns the scene into the training style.Unsloth trains the dev model when your Hugging Face token can read Lightricks/LTX-2.5-Diffusers, and otherwise the mirror's distilled model. Either way, the LoRA runs on the Video page's distilled model.With a LoRA, Unsloth loads the bf16 distilled video model and merges the LoRA into it; the first LoRA load downloads about 42 GB. The GGUF and Single file entries take no LoRAs.Full guide: Fine-tune LTX-2.5.MiniMax-H3Training data: video clips with sound. MiniMax-H3 learns picture and audio together, so every clip needs a soundtrack; it cannot train on still images. This example teaches the look of Big Buck Bunny (CC BY 3.0, Blender Foundation) with the trigger bbbstyle: 12 one-second clips, 400 steps, default settings.Formats: .mp4, .mov, .mkv, .webm, .m4v, .avi, each with a .txt caption of the same name (clip01.mp4 and clip01.txt) that starts with the trigger.Unsloth trains the first 22 frames (0.92 s) of each clip at 24 fps, center-cropped to a 768 px short edge. Sound must cover the whole clip; silent clips are refused.On the Video page, click Train, upload the clips under Training images, then pick MiniMaxAI/MiniMax-H3 from the model menu. It appears there only once a set of clips exists.The 12 training clipsStep 95 of 400, about 4 s per stepThe run finished at loss 0.61 (video 0.44, audio 0.17) in 36 minutes: 9 to load and encode, 27 to train. Deploy to Video loads the original bf16 MiniMax-H3 with the LoRA merged in (the first load downloads about 144 GB; the GGUF and Fast FP8 entries cannot load LoRAs).864 × 480, 5.2 s, 20 steps, seed 42. Prompt: bbbstyle, a sunny meadow with a big oak tree and a small stream, birds chirpingWithout LoRAWith bbbstyle LoRA, 200 stepsDeploy to Video, sped upFull guide, including using the LoRA from Python with diffusers: Fine-tune MiniMax-H3.TipsUse the trigger word in your prompts.Weight: 1 gives the full style; around 0.5 adds accents.Changed a LoRA? Click Reload to apply: video LoRAs are merged when the model loads.Out of memory: keep Base precision on Auto (or pick nf4) and gradient checkpointing on.PreviousFine-tuning Diffusion ModelsNextClaude CodeWas this helpful?