AI Video Generation: Local PC, Cloud LoRA & Long Clips

AI Video Generation: Local PC, Cloud LoRA & Long Clips

83 / 100 Powered by Rank Math SEO SEO Score AI Video Studio: Run, Train and Extend Video [...]

🔴 Table of Article Content[Show]

AI Video Studio: Run, Train and Extend Video Models on Your Own Hardware

AI Video Studio: ඔබේම පරිගණකයෙන් AI වීඩියෝ සෑදීම, පුහුණු කිරීම සහ දිගු කිරීම

A practical ICT guide for G.C.E. O/L and A/L students, teachers and creators

අ.පො.ස. සා/පෙළ සහ උ/පෙළ සිසුන්, ගුරුවරුන් සහ නිර්මාණකරුවන් සඳහා ප්‍රායෝගික ICT මාර්ගෝපදේශයක්

Every tool for AI video generation that you can run at home is built on a diffusion model: a network that learns to turn random noise into a clear picture, then does the same across many frames so objects stay consistent in time. That single idea explains the rest of this guide: why VRAM is the limit, why a small LoRA file can teach a model a new character, why datasets must be clean, and why long clips are stitched from short ones.

ඔබට ගෙදරදී ධාවනය කළ හැකි සෑම වීඩියෝ ජනකයක්ම ගොඩනැගී ඇත්තේ diffusion model එකක් මතය. එය අහඹු noise පැහැදිලි රූපයක් බවට හරවන්න ඉගෙන ගත් network එකකි; වීඩියෝවලදී රූපරාමු ගණනාවක් හරහා එය කරන නිසා වස්තූන් කාලය සමඟ එකම ලෙස පවතී. මෙම මාර්ගෝපදේශයේ ඉතිරි සියල්ල පැහැදිලි වන්නේ මේ එක අදහසිනි: VRAM සීමාව ඇයි, කුඩා LoRA ගොනුවකින් අලුත් චරිතයක් ඉගැන්විය හැක්කේ ඇයි, dataset පිරිසිදු විය යුත්තේ ඇයි, දිගු වීඩියෝ කෙටි කොටස් එකතු කර සාදන්නේ ඇයි යන්න.

From noise to moving pictures

Noise වලින් චලනය වන රූප දක්වා

A diffusion model starts with random noise and removes a little of it at every step, guided by your text prompt, until a clear picture is left. Working on full-size pixels would be far too slow, so the work happens in latent space: a compressed version of the image that a VAE (variational autoencoder) turns back into pixels at the end.

Diffusion model එකක් ආරම්භ කරන්නේ අහඹු noise එකකිනි. ඔබේ text prompt එකේ මඟ පෙන්වීම යටතේ සෑම පියවරකදීම noise ටිකක් ඉවත් කරමින්, අවසානයේ පැහැදිලි රූපයක් ඉතිරි කරයි. සම්පූර්ණ pixel මත වැඩ කිරීම අතිශය මන්දගාමී බැවින්, වැඩ සිදු වන්නේ latent space එකේ ය. එනම් රූපයේ සම්පීඩිත ස්වරූපයකි; අවසානයේ VAE (variational autoencoder) එක එය නැවත pixel බවට හරවයි.

  1. Text encoderText encoderTurns your prompt into numbers the model can follow.ඔබේ prompt එක model එකට තේරෙන සංඛ්‍යා බවට හරවයි.
  2. Noisy latentNoisy latentA block of random values: one slot per frame.අහඹු අගයන් වැටියක්: රූපරාමුවකට එක් ස්ථානයක්.
  3. Diffusion transformerDiffusion transformerRemoves noise step by step, with every frame looking at the others.සෑම රූපරාමුවක්ම අනෙක් ඒවා දෙස බලමින් පියවරෙන් පියවර noise ඉවත් කරයි.
  4. VAE decoderVAE decoderExpands the clean latent into real video frames.පිරිසිදු latent එක සැබෑ වීඩියෝ රූපරාමු බවට විහිදුවයි.

Video adds the time dimension. The model denoises a whole stack of frames together, so a character’s face and clothes stay the same from frame to frame. The price is memory: it grows with frame count and resolution, which is why VRAM, not CPU speed, decides what your PC can run. Wan 2.2 14B typically outputs 16 frames per second, so 81 frames is about five seconds. Frame counts take the form 4n+1 because the VAE compresses time by a factor of four.

වීඩියෝවලදී කාල මානය (time) එකතු වේ. Model එක රූපරාමු සමූහයක් එකවර denoise කරන නිසා චරිතයේ මුහුණ සහ ඇඳුම් රූපරාමුවෙන් රූපරාමුවට එක ලෙස පවතී. මෙහි වියදම මතකයයි: රූපරාමු ගණන සහ resolution සමඟ එය වැඩි වන නිසා, ඔබේ PC එකට කළ හැකි දේ තීරණය වන්නේ CPU වේගයෙන් නොව VRAM ප්‍රමාණයෙනි. Wan 2.2 14B සාමාන්‍යයෙන් තත්පරයකට රූපරාමු 16ක් නිපදවන බැවින්, රූපරාමු 81ක් යනු තත්පර පහක පමණ වීඩියෝවකි. VAE එක කාලය සතර ගුණයකින් සම්පීඩනය කරන නිසා රූපරාමු ගණන 4n+1 ආකාරයෙන් වේ.

Where this fits in your syllabus: SL A/L ICT (new trends in ICT), Cambridge 9618 and GCSE Computer Science (artificial intelligence, data representation), AP Computer Science Principles (impact of computing). For a deeper read on the maths, see the Wikipedia article on diffusion models.

ඔබේ විෂය නිර්දේශයේ මෙය ගැළපෙන තැන: SL A/L ICT (ICT හි නව ප්‍රවණතා), Cambridge 9618 සහ GCSE Computer Science (කෘත්‍රිම බුද්ධිය, දත්ත නිරූපණය), AP Computer Science Principles (පරිගණනයේ බලපෑම). ගණිතය ගැන වැඩි විස්තර සඳහා diffusion model පිළිබඳ Wikipedia ලිපිය කියවන්න.

A common mistake and an honest limit

සාමාන්‍ය වැරැද්දක් සහ අවංක සීමාවක්

Students often assume the model searches a library of real clips and pastes pieces together. It does not. It generates new pixels from patterns it learned, which is why it can invent extra fingers, melt text on signs, or let a face drift. Today’s open models for AI video generation handle short, simple motion well and long, complex physics poorly. Plan your story around that.

Model එක සැබෑ වීඩියෝ පුස්තකාලයක් පිරික්සා කොටස් අලවයි කියා සිසුන් බොහෝ විට සිතයි. එය එසේ නොවේ. එය ඉගෙන ගත් රටා වලින් අලුත් pixel නිර්මාණය කරයි. එබැවින් අමතර ඇඟිලි, විකෘති වූ අකුරු, හෝ මාරු වන මුහුණු ඇති විය හැක. අද තිබෙන open models කෙටි, සරල චලනය හොඳින් කරන අතර දිගු, සංකීර්ණ භෞතික චලනය දුර්වලව කරයි. ඔබේ කතාව එයට අනුව සැලසුම් කරන්න.

Choosing a PC for local video generation

Local වීඩියෝ ජනනය සඳහා PC එකක් තෝරාගැනීම

An Nvidia GPU is still the easiest route, because most ComfyUI video workflows assume CUDA. AMD cards are improving through ROCm but need more tinkering, and Apple Silicon works for small jobs but is slow. When you compare cards, rank these in order: VRAM first, then memory bandwidth, then system RAM, then SSD speed, then CPU.

බොහෝ ComfyUI වීඩියෝ workflows CUDA මත රඳා පවතින නිසා Nvidia GPU එකක් තවමත් ලේසිම මාර්ගයයි. AMD කාඩ්පත් ROCm හරහා දියුණු වෙමින් පවතී, නමුත් වැඩි සකස් කිරීම් අවශ්‍ය වේ. Apple Silicon කුඩා කාර්යයන් සඳහා ක්‍රියා කරන නමුත් මන්දගාමී ය. කාඩ්පත් සසඳන විට මෙම අනුපිළිවෙල අනුගමනය කරන්න: මුලින් VRAM, ඉන්පසු memory bandwidth, පසුව RAM, SSD වේගය, අවසානයේ CPU.

Quick check: what can my GPU run?

ඉක්මන් පරීක්ෂාව: මගේ GPU එකට කළ හැක්කේ කුමක්ද?

Generate: Wan 2.2 5B or heavily quantized models, short low-resolution clips. Train: not realistic for video; rent a cloud GPU.

ජනනය: Wan 2.2 5B හෝ දැඩි ලෙස quantize කළ models, කෙටි අඩු-resolution වීඩියෝ. පුහුණුව: වීඩියෝ සඳහා ප්‍රායෝගික නැත; cloud GPU එකක් කුලියට ගන්න.

Generate: Wan 2.2 5B comfortably; the 14B model in 4-bit (Q4) form at about 480p for a few seconds. Train: image LoRAs only, with memory-saving options; use the cloud for video LoRAs.

ජනනය: Wan 2.2 5B පහසුවෙන්; 14B model එක 4-bit (Q4) ආකාරයෙන් 480p පමණ resolution එකෙන් තත්පර කිහිපයක් සඳහා. පුහුණුව: memory-saving options සමඟ image LoRA පමණි; වීඩියෝ LoRA සඳහා cloud භාවිතා කරන්න.

Generate: 8-bit (fp8/int8) versions of Wan 2.2 14B and LTX 2.3. Speed depends on memory bandwidth, so a 16 GB card with a narrow memory bus can be slower than its VRAM suggests. Train: video LoRAs are not comfortable here; rent a cloud GPU.

ජනනය: Wan 2.2 14B සහ LTX 2.3 හි 8-bit (fp8/int8) අනුවාද. වේගය රඳා පවතින්නේ memory bandwidth මත නිසා, memory bus එක පටු 16 GB කාඩ්පතක් එහි VRAM ප්‍රමාණයෙන් හැඟෙනවාට වඩා මන්දගාමී විය හැක. පුහුණුව: වීඩියෝ LoRA මෙහි පහසු නැත; cloud GPU කුලියට ගන්න.

Generate: Wan 2.2 14B at its full-precision minimum or 8-bit with headroom, plus HunyuanVideo. Train: video LoRAs become possible at low resolution with block swapping and fp8, which is the tool’s own minimum recommendation. A used 24 GB card is the best value for local work.

ජනනය: Wan 2.2 14B හි full-precision අවම මට්ටමෙන් හෝ 8-bit ආකාරයෙන් ඉඩ ඇතිව, HunyuanVideo ද. පුහුණුව: block swapping සහ fp8 සමඟ අඩු resolution එකකින් වීඩියෝ LoRA කළ හැකි වේ; මෙය tool එකේම අවම නිර්දේශයයි. පාවිච්චි කළ 24 GB කාඩ්පතක් local වැඩ සඳහා හොඳම වටිනාකම ලබා දේ.

Generate: full-precision models with room for longer clips and batches. Train: video LoRAs at moderate resolution without heavy memory tricks.

ජනනය: දිගු වීඩියෝ සහ batches සඳහා ඉඩ ඇති full-precision models. පුහුණුව: බරපතල memory උපක්‍රම නොමැතිව මධ්‍යම resolution එකකින් වීඩියෝ LoRA.

Generate: everything open models offer at full quality. Train: comfortable video LoRA training, including the 14B models. This is the size most cloud rentals offer.

ජනනය: open models ලබා දෙන සියල්ල full quality එකෙන්. පුහුණුව: 14B models ඇතුළුව පහසු වීඩියෝ LoRA පුහුණුව. බොහෝ cloud කුලී සේවා ලබා දෙන ප්‍රමාණය මෙයයි.

These are guide values. Real limits change with resolution, clip length, quantization and the workflow you use.

මේවා මගපෙන්වීමේ අගයන් පමණි. සැබෑ සීමාවන් resolution, වීඩියෝ දිග, quantization සහ ඔබ භාවිතා කරන workflow අනුව වෙනස් වේ.

Three practical tiers

ප්‍රායෝගික මට්ටම් තුන

Tierමට්ටමGPU memoryGPU මතකයWhat you getඔබට ලැබෙන්නේ
Starterආරම්භක12 GB (e.g. RTX 3060 12 GB)Quantized models, short low-resolution clips, long waits. Good for learning.Quantized models, කෙටි අඩු-resolution වීඩියෝ, දිගු රැඳී සිටීම. ඉගෙනීමට සුදුසුයි.
Balancedමධ්‍යම16 GB8-bit models at 480p to 720p. Check the memory bus width before buying.480p සිට 720p දක්වා 8-bit models. මිලදී ගැනීමට පෙර memory bus පළල පරීක්ෂා කරන්න.
Seriousබරපතල24 GB to 32 GBFull-quality generation and low-resolution video LoRA training at home.Full-quality ජනනය සහ ගෙදරදීම අඩු-resolution වීඩියෝ LoRA පුහුණුව.

The rest of the machine

පරිගණකයේ අනෙක් කොටස්

  • System RAM: 32 GB is the practical minimum; 64 GB helps when models spill out of VRAM.
  • Storage: a 1 TB NVMe SSD. Single model files are often 10 GB to 30 GB or more, and you will keep several.
  • Power and cooling: a quality power supply sized for the GPU and good airflow. Renders can run for an hour at full load.
  • Power cuts: a UPS protects a long render from a sudden cut. Save outputs often, because a crash loses the whole queue.
  • System RAM: 32 GB ප්‍රායෝගික අවම ප්‍රමාණයයි; models VRAM එකෙන් ඉවතට යන විට 64 GB උපකාරී වේ.
  • ගබඩාව: 1 TB NVMe SSD එකක්. තනි model ගොනු බොහෝ විට 10 GB සිට 30 GB හෝ ඉන් වැඩිය; ඔබ කිහිපයක් තබාගනු ඇත.
  • විදුලිය සහ සිසිලනය: GPU එකට ගැලපෙන ගුණාත්මක power supply එකක් සහ හොඳ වාතාශ්‍රය. Render පැයක් පුරා උපරිම බරින් ධාවනය විය හැක.
  • විදුලි විසන්ධි වීම්: UPS එකක් දිගු render එකක් හදිසි විදුලි විසන්ධි වීමකින් ආරක්ෂා කරයි. Crash එකකදී මුළු queue එකම නැති වන නිසා output නිතර save කරන්න.

To see what your Nvidia card offers, open a terminal and run:

ඔබේ Nvidia කාඩ්පතේ තොරතුරු බැලීමට terminal එකක් විවෘත කර මෙය ධාවනය කරන්න:

nvidia-smi

Open video models and the ComfyUI workflow

Open වීඩියෝ models සහ ComfyUI workflow

Most of these models are open-weight, not fully open source: the trained weights are public, but the training data and some code may not be. That matters when you read licenses, so check each model’s terms before using output commercially.

මෙම models බොහොමයක් open-weight මිස සම්පූර්ණයෙන්ම open source නොවේ. පුහුණු කළ weights ප්‍රසිද්ධ වුවත්, training data සහ ඇතැම් code ප්‍රසිද්ධ නොවිය හැක. බලපත්‍ර කියවන විට මෙය වැදගත් වන නිසා, output වාණිජමය ලෙස භාවිතා කිරීමට පෙර එක් එක් model එකේ නියම පරීක්ෂා කරන්න.

ModelStrengthsශක්තීන්Notes (checked October 2026)සටහන් (2026 ඔක්තෝබර් පරීක්ෂා කළ)
Wan 2.2 (Alibaba)Best all-rounder, mature ComfyUI support, 5B and 14B sizesහොඳම සාමාන්‍ය තේරීම, පරිණත ComfyUI සහාය, 5B සහ 14B ප්‍රමාණDownloadable weights under an open license. Later Wan versions were announced as hosted-only, so verify before you plan around them.විවෘත බලපත්‍රයක් යටතේ බාගත හැකි weights. පසුව ආ Wan අනුවාද hosted-only ලෙස නිවේදනය විය; ඒවා අනුව සැලසුම් කිරීමට පෙර තහවුරු කරගන්න.
LTX 2.3 (Lightricks)Fast drafts; makes synchronized audio with the videoවේගවත් කෙටුම්පත්; වීඩියෝව සමඟ සමමුහුර්ත ශබ්දය නිපදවයිReleased March 2026, about 22B parameters, 8-bit runs from about 16 GB. Read its license terms.2026 මාර්තු නිකුත් කළා, parameters 22B පමණ, 8-bit අනුවාදය 16 GB පමණ සිට ධාවනය වේ. එහි බලපත්‍ර නියම කියවන්න.
HunyuanVideo (Tencent)Realistic, cinematic lookයථාර්ථවාදී, සිනමා ස්වරූපයAbout 13B parameters and 24 GB or more of VRAM; no native audio.Parameters 13B පමණ සහ 24 GB හෝ ඊට වැඩි VRAM; ස්වභාවික ශබ්දය නැත.
CogVideoXStrong image-to-video detailimage-to-video සඳහා ශක්තිමත් විස්තරOlder but well supported; good for animating a still you made first.පැරණි නමුත් හොඳින් සහාය දක්වයි; ඔබ මුලින් සෑදූ රූපයක් සජීවීකරණයට හොඳයි.

New releases appear every few months, so treat this table as a snapshot and check each project’s page for the current version.

අලුත් නිකුතු මාස කිහිපයකට වරක් එයි. මෙම වගුව ඡායාරූපයක් ලෙස සලකා, වත්මන් අනුවාදය සඳහා එක් එක් ව්‍යාපෘතියේ පිටුව පරීක්ෂා කරන්න.

Your first ComfyUI video, step by step

ඔබේ පළමු ComfyUI වීඩියෝව, පියවරෙන් පියවර

  1. Install ComfyUI from comfy.org (the desktop or portable build is easiest on Windows).
  2. Download the model files that the official example workflow names, and place them in the matching folders: models/diffusion_models, models/text_encoders and models/vae. Your trained LoRA files later go in models/loras.
  3. Load the official text-to-video or image-to-video example workflow, then run it unchanged once to confirm everything works.
  4. Start small: 480p, three to five seconds, a fixed seed. Raise resolution only after a clip succeeds.
  1. comfy.org වෙතින් ComfyUI ස්ථාපනය කරන්න (Windows සඳහා desktop හෝ portable අනුවාදය ලේසිය).
  2. නිල උදාහරණ workflow එක නම් කරන model ගොනු බාගෙන ගැළපෙන folders වල තබන්න: models/diffusion_models, models/text_encoders සහ models/vae. ඔබ පුහුණු කළ LoRA ගොනු පසුව models/loras හි තබන්න.
  3. නිල text-to-video හෝ image-to-video උදාහරණ workflow එක load කර, සියල්ල ක්‍රියා කරන බව තහවුරු කිරීමට වෙනස් නොකර එක් වරක් ධාවනය කරන්න.
  4. කුඩාවෙන් ආරම්භ කරන්න: 480p, තත්පර තුනේ සිට පහ දක්වා, ස්ථිර seed එකක්. එක් වීඩියෝවක් සාර්ථක වූ පසුව පමණක් resolution වැඩි කරන්න.

Quantization in one minute

Quantization විනාඩියකින්

A model stores billions of numbers. Saving them at lower precision (16-bit, then 8-bit, then 4-bit GGUF) shrinks the file and the VRAM needed, at a small cost in quality. If a model runs out of memory, step down one precision level before you give up on the model.

Model එකක් සංඛ්‍යා බිලියන ගණනක් ගබඩා කරයි. ඒවා අඩු නිරවද්‍යතාවයකින් (16-bit, පසුව 8-bit, පසුව 4-bit GGUF) save කිරීමෙන් ගොනුවේ ප්‍රමාණය සහ අවශ්‍ය VRAM අඩු වේ; ගුණාත්මකභාවය ස්වල්පයක් අඩු වේ. Model එකක් මතකය අවසන් වුවහොත්, එය අත්හැරීමට පෙර එක් නිරවද්‍යතා මට්ටමක් පහළට යන්න.

A prompt that works: input and output

ක්‍රියා කරන prompt එකක්: input සහ output

Describe the subject, the action, the camera and the light, in that order. Weak: “a girl in a school.” Better: “A teenage girl in a white school uniform walks across a sunlit courtyard, slow tracking shot from the side, warm afternoon light, shallow depth of field.” The better prompt gives the model one action, one camera move and one lighting condition to commit to.

විෂයය, ක්‍රියාව, කැමරාව සහ ආලෝකය එම අනුපිළිවෙලින් විස්තර කරන්න. දුර්වල: “පාසලක සිටින ගැහැනු ළමයෙක්.” වඩා හොඳ: “සුදු පාසල් නිල ඇඳුමින් සැරසුණු තරුණ ගැහැනු ළමයෙක් හිරු එළියෙන් පිරුණු මිදුලක් හරහා ඇවිදිමින් සිටී, පැත්තෙන් මන්දගාමී tracking shot, උණුසුම් සවස් ආලෝකය, shallow depth of field.” වඩා හොඳ prompt එක model එකට එක් ක්‍රියාවක්, එක් කැමරා චලනයක් සහ එක් ආලෝක තත්ත්වයක් ලබා දෙයි.

Training a LoRA on a rented cloud GPU

කුලියට ගත් cloud GPU එකක LoRA පුහුණුව

LoRA (Low-Rank Adaptation) leaves the huge base model frozen and trains only small extra matrices that are added to its layers. The result is a file of tens to hundreds of megabytes that teaches the model one character or style, instead of a new multi-gigabyte model.

LoRA (Low-Rank Adaptation) විශාල base model එක නොවෙනස්ව තබා, එහි layers වලට එකතු වන කුඩා අමතර matrices පමණක් පුහුණු කරයි. ප්‍රතිඵලය වන්නේ gigabytes ගණනක අලුත් model එකක් වෙනුවට, model එකට එක් චරිතයක් හෝ ශෛලියක් ඉගැන්වන මෙගාබයිට් දස සිට සිය ගණනක ගොනුවකි.

How much VRAM does training really need?

පුහුණුවට සැබවින්ම අවශ්‍ය VRAM කොපමණද?

The base model must still sit in VRAM, and video training also stores several frames at once. The musubi-tuner project, a popular LoRA trainer for Wan and HunyuanVideo, recommends 12 GB or more for image training and 24 GB or more for video training. A 48 GB card is comfortable, and 80 GB cards give extra headroom for 14B models and higher resolution, but they are not required. Wan 2.2 14B is built from two expert models, so out-of-memory errors usually come from the training settings (resolution, clip length, block swapping, fp8), not from the hardware alone.

Base model එක තවමත් VRAM හි තිබිය යුතු අතර, වීඩියෝ පුහුණුවේදී රූපරාමු කිහිපයක්ද එකවර ගබඩා වේ. Wan සහ HunyuanVideo සඳහා ජනප්‍රිය LoRA trainer එකක් වන musubi-tuner ව්‍යාපෘතිය, image පුහුණුවට 12 GB හෝ ඊට වැඩි සහ වීඩියෝ පුහුණුවට 24 GB හෝ ඊට වැඩි නිර්දේශ කරයි. 48 GB කාඩ්පතක් පහසු වන අතර, 80 GB කාඩ්පත් 14B models සහ ඉහළ resolution සඳහා අමතර ඉඩ දෙයි; නමුත් ඒවා අනිවාර්ය නොවේ. Wan 2.2 14B expert models දෙකකින් සෑදී ඇති නිසා, මතක ඌනතා දෝෂ සාමාන්‍යයෙන් එන්නේ දෘඩාංග නිසා පමණක් නොව පුහුණු සැකසුම් (resolution, වීඩියෝ දිග, block swapping, fp8) නිසාය.

Estimate your training cost

ඔබේ පුහුණු වියදම ගණනය කරන්න

$0.00
Rs. 0

Total = price x (setup + training hours x runs). Storage fees and data transfer are extra.

එකතුව = මිල x (සැකසුම් + පුහුණු පැය x ගණන). ගබඩා ගාස්තු සහ දත්ත හුවමාරුව අමතරයි.

Reported rental prices in 2026 are roughly $0.44 to $0.50 per hour for a 24 GB RTX 4090 and about $0.50 per hour for a 48 GB RTX A6000, with 80 GB data-center cards costing more. Prices change daily and differ by provider, so read the live price before you start.

2026 වර්ෂයේ වාර්තා වූ කුලී මිල 24 GB RTX 4090 සඳහා පැයකට ඩොලර් 0.44 සිට 0.50 පමණ සහ 48 GB RTX A6000 සඳහා පැයකට ඩොලර් 0.50 පමණ වන අතර, 80 GB data-center කාඩ්පත් මිල වැඩිය. මිල දිනපතා වෙනස් වන අතර සපයන්නා අනුව ද වෙනස් වන නිසා, ආරම්භ කිරීමට පෙර සජීවී මිල කියවන්න.

The workflow

ක්‍රියාවලිය

  1. Prepare and caption the dataset on your own PC first (tab 5). Uploading a small, clean dataset is faster and cheaper than fixing it by the hour.
  2. Rent a pod with a PyTorch template and enough disk for the base model files, for example 100 GB.
  3. Upload the dataset, install the trainer from its musubi-tuner repository, and start from the example config for your model instead of inventing settings.
  4. Save a checkpoint every few epochs, then test several in ComfyUI. The last checkpoint is often over-trained and the best one is earlier.
  5. Download the .safetensors LoRA file, then delete the pod and its volume.
  1. මුලින් dataset එක ඔබේම PC එකේ සකස් කර caption කරන්න (tab 5). පැය ගණන් ගෙවමින් එය නිවැරදි කරනවාට වඩා කුඩා, පිරිසිදු dataset එකක් upload කිරීම වේගවත් සහ ලාභදායී ය.
  2. PyTorch template එකක් සහිත pod එකක් සහ base model ගොනු සඳහා ප්‍රමාණවත් disk ඉඩක් (උදා: 100 GB) කුලියට ගන්න.
  3. Dataset එක upload කර, musubi-tuner repository එකෙන් trainer ස්ථාපනය කර, සැකසුම් ඔබම හදනවාට වඩා ඔබේ model සඳහා ඇති උදාහරණ config එකෙන් ආරම්භ කරන්න.
  4. Epochs කිහිපයකට වරක් checkpoint එකක් save කර, ComfyUI හි කිහිපයක් පරීක්ෂා කරන්න. අවසාන checkpoint එක බොහෝ විට over-trained වන අතර හොඳම එක ඊට පෙර ඒවායේ තිබේ.
  5. .safetensors LoRA ගොනුව බාගත කර, පසුව pod එක සහ එහි volume එක මකා දමන්න.

Cost trap: on many providers a stopped pod still charges for its storage until you delete it. Never paste your API keys into a public notebook, and set a spending limit in your account if the provider offers one.

වියදම් උගුල: බොහෝ සපයන්නන් සමඟ නවත්වා දැමූ pod එකක් ඔබ මකා දමන තෙක් එහි ගබඩාව සඳහා ගාස්තු අය කරයි. ඔබේ API keys ප්‍රසිද්ධ notebook එකක කිසිදා නොඅලවන්න, සපයන්නා ඉඩ දෙන්නේ නම් ඔබේ ගිණුමේ වියදම් සීමාවක් නියම කරන්න.

Worked example: a character LoRA from 40 clips, one hour of setup and four hours of training at $0.50 per hour costs $2.50. Two retries bring it to about $4.50. That is the price of a few cups of tea, not a new graphics card.

උදාහරණයක්: clips 40කින් චරිත LoRA එකක්, සැකසීමට පැයක් සහ පැයකට ඩොලර් 0.50 බැගින් පුහුණුවට පැය හතරක් නම් වියදම ඩොලර් 2.50කි. නැවත උත්සාහ දෙකක් සමඟ එය ඩොලර් 4.50 පමණ වේ. එය තේ කෝප්ප කිහිපයක මිලකි; නව graphics card එකක් නොවේ.

Preparing clips for LoRA training

LoRA පුහුණුව සඳහා clips සකස් කිරීම

A 1,000-clip collection is not needed and is often counterproductive. A character LoRA frequently works from a few dozen clean, varied clips, while a broad style may need more. Every extra clip costs GPU time, and one clip with a watermark can teach the model to draw watermarks. Quality and variety beat quantity.

Clips 1,000ක එකතුවක් අවශ්‍ය නැති අතර බොහෝ විට අහිතකර ය. චරිත LoRA එකක් බොහෝ විට පිරිසිදු, විවිධාකාර clips දස කිහිපයකින් ක්‍රියා කරන අතර, පුළුල් ශෛලියකට වැඩි ප්‍රමාණයක් අවශ්‍ය විය හැක. සෑම අමතර clip එකක්ම GPU කාලය වැය කරන අතර, watermark සහිත එක clip එකකට පවා model එකට watermarks අඳින්න ඉගැන්විය හැක. ප්‍රමාණයට වඩා ගුණාත්මකභාවය සහ විවිධත්වය ජයගනී.

Step 1: split at every scene cut

පියවර 1: සෑම scene cut එකකදීම කපන්න

Each clip must be one continuous shot. PySceneDetect finds the cuts and splits the file for you:

සෑම clip එකක්ම එක් අඛණ්ඩ shot එකක් විය යුතුය. PySceneDetect මගින් cuts සොයාගෙන ගොනුව වෙන් කරයි:

pip install scenedetect[opencv]
scenedetect -i input.mp4 detect-content split-video

Step 2: remove audio, fix size, frame rate and length

පියවර 2: ශබ්දය ඉවත් කර, ප්‍රමාණය, frame rate සහ දිග සකස් කරන්න

Video models learn from pictures only. This ffmpeg command drops the audio, sets 16 frames per second, resizes and crops to 832 x 480, and keeps five seconds. Match the frame rate and size to the model you train, because Wan expects dimensions that are multiples of 16.

වීඩියෝ models ඉගෙන ගන්නේ රූප වලින් පමණි. මෙම ffmpeg විධානය ශබ්දය ඉවත් කර, තත්පරයට රූපරාමු 16 නියම කර, 832 x 480 ට resize සහ crop කර, තත්පර පහක් තබාගනී. Wan 16 ගුණාකාර මාන බලාපොරොත්තු වන නිසා, ඔබ පුහුණු කරන model එකට frame rate සහ ප්‍රමාණය ගළපන්න.

ffmpeg -i clip_in.mp4 -an -t 5 -vf "fps=16,scale=832:480:force_original_aspect_ratio=increase,crop=832:480" -c:v libx264 -crf 18 clip_001.mp4

Step 3: remove text and logos, then caption

පියවර 3: අකුරු සහ ලාංඡන ඉවත් කර, caption කරන්න

Reject clips with subtitles, channel logos or watermarks; blurring them leaves a smear the model may copy. Then write one text file per clip with the same name (clip_001.txt). Tools such as JoyCaption or BLIP can draft captions, but read and fix every one. Start each caption with the same trigger word, then describe subject, action and camera.

උපසිරැසි, නාලිකා ලාංඡන හෝ watermarks ඇති clips ප්‍රතික්ෂේප කරන්න; ඒවා blur කිරීමෙන් model එක පිටපත් කළ හැකි ලපයක් ඉතිරි වේ. ඉන්පසු සෑම clip එකකටම එම නමින්ම text ගොනුවක් ලියන්න (clip_001.txt). JoyCaption හෝ BLIP වැනි මෙවලම් මගින් captions කෙටුම්පත් කළ හැකි නමුත්, සෑම එකක්ම කියවා නිවැරදි කරන්න. සෑම caption එකක්ම එකම trigger word එකකින් ආරම්භ කර, පසුව විෂයය, ක්‍රියාව සහ කැමරාව විස්තර කරන්න.

dataset/
  clip_001.mp4
  clip_001.txt   -> "mira_char, a girl in a white uniform walks across a courtyard, side tracking shot, warm light"
  clip_002.mp4
  clip_002.txt

Dataset readiness checklist

Dataset සූදානම් පරීක්ෂා ලැයිස්තුව

0 / 8 readyසූදානම්

Building 20-second stories from short clips

කෙටි clips වලින් තත්පර 20ක කථා නිර්මාණය

Open models make a few seconds at a time because memory grows with every extra frame. The standard workaround is chaining: finish a clip, take its last frame, and use that frame as the first frame of the next clip. Four five-second clips make a 20-second sequence.

අමතර සෑම රූපරාමුවක් සමඟම මතකය වැඩි වන නිසා open models එකවර තත්පර කිහිපයක් සාදයි. සම්මත විසඳුම chaining ය: එක් clip එකක් අවසන් කර, එහි අවසාන රූපරාමුව ගෙන, එය ඊළඟ clip එකේ පළමු රූපරාමුව ලෙස භාවිතා කරන්න. තත්පර පහේ clips හතරකින් තත්පර 20ක අනුපිළිවෙලක් සෑදේ.

SegmentකොටසMethodක්‍රමයPrompt focusPrompt අවධානය
1 (0-5 s)Text-to-videoSet up the scene and the characterදර්ශනය සහ චරිතය ස්ථාපිත කරන්න
2 (5-10 s)Image-to-video from segment 1 last frameDescribe only the next actionඊළඟ ක්‍රියාව පමණක් විස්තර කරන්න
3 (10-15 s)Image-to-video from segment 2 last frameChange camera angle or add a new eventකැමරා කෝණය වෙනස් කරන්න හෝ නව සිදුවීමක් එක් කරන්න
4 (15-20 s)Image-to-video from segment 3 last frameResolve the sceneදර්ශනය නිම කරන්න

The commands

විධාන

Extract the last frame of a finished clip. Using a lossless PNG avoids adding compression damage before the next segment:

අවසන් කළ clip එකක අවසාන රූපරාමුව උපුටා ගන්න. Lossless PNG භාවිතා කිරීමෙන් ඊළඟ කොටසට පෙර compression හානියක් එක් නොවේ:

ffmpeg -sseof -0.2 -i seg1.mp4 -update 1 -q:v 1 last_frame.png

When all segments are ready, list them in a text file and join them without re-encoding:

සියලු කොටස් සූදානම් වූ පසු, ඒවා text ගොනුවක ලැයිස්තුගත කර re-encode නොකර එකතු කරන්න:

file 'seg1.mp4'
file 'seg2.mp4'
file 'seg3.mp4'
file 'seg4.mp4'
ffmpeg -f concat -safe 0 -i list.txt -c copy story_20s.mp4

Keeping the story consistent

කථාව ස්ථාවරව තබාගැනීම

  • Drift is the enemy. Each segment inherits the previous one’s small errors, so faces and colors slowly change. Check every segment before you start the next, and keep chains short.
  • Reuse the same LoRA and trigger word in every segment so the character keeps the same look.
  • Do not change resolution or frame rate between segments; the join will jump.
  • Trim the overlap: the first frame of segment 2 repeats the last frame of segment 1, so cut one frame when you join them.
  • Try first-and-last-frame workflows if your model supports them. Fixing both ends gives smoother planned transitions.
  • Add sound last. Combine the narration and music in CapCut or Premiere Pro, or use a model that generates audio with the video.
  • Drift ප්‍රධාන ප්‍රශ්නයයි. සෑම කොටසක්ම පෙර කොටසේ කුඩා දෝෂ උරුම කරගන්නා නිසා මුහුණු සහ වර්ණ සෙමින් වෙනස් වේ. ඊළඟ කොටස ආරම්භ කිරීමට පෙර සෑම කොටසක්ම පරීක්ෂා කර, chains කෙටිව තබන්න.
  • එකම LoRA සහ trigger word සෑම කොටසකම භාවිතා කරන්න; එවිට චරිතයේ පෙනුම නොවෙනස්ව පවතී.
  • කොටස් අතර resolution හෝ frame rate වෙනස් නොකරන්න; එකතු කිරීමේදී පැනීමක් පෙනේ.
  • අතිච්ඡාදනය කපන්න: 2 වන කොටසේ පළමු රූපරාමුව 1 වන කොටසේ අවසාන රූපරාමුව නැවත කියන නිසා, එකතු කරන විට එක් රූපරාමුවක් කපන්න.
  • ඔබේ model එක සහාය දක්වන්නේ නම් පළමු-සහ-අවසාන රූපරාමු workflows උත්සාහ කරන්න. දෙකෙළවරම නියම කිරීමෙන් සැලසුම් කළ සංක්‍රමණ වඩා සුමට වේ.
  • ශබ්දය අවසානයේ එක් කරන්න. කථන සහ සංගීතය CapCut හෝ Premiere Pro හි එකතු කරන්න, නැතහොත් වීඩියෝව සමඟ ශබ්දය නිපදවන model එකක් භාවිතා කරන්න.

For writing the shot-by-shot prompts, see our guide on prompt engineering for storyboards and the story-to-storyboard generator.

Shot-by-shot prompts ලිවීම සඳහා, අපගේ storyboards සඳහා prompt engineering මාර්ගෝපදේශය සහ story-to-storyboard generator බලන්න.

Ethics, copyright and safe use

ආචාර ධර්ම, කතුහිමිකම සහ ආරක්ෂිත භාවිතය

This section is general education, not legal advice. Laws differ by country and are still being tested in courts, so check the rules that apply to you.

මෙම කොටස සාමාන්‍ය අධ්‍යාපනික තොරතුරු පමණි; නීති උපදෙස් නොවේ. නීති රට අනුව වෙනස් වන අතර තවමත් අධිකරණවල පරීක්ෂා කෙරෙමින් පවතින නිසා, ඔබට අදාළ නීති පරීක්ෂා කරන්න.

Where your training clips come from

ඔබේ පුහුණු clips පැමිණෙන්නේ කොහෙන්ද

  • Best sources: footage you filmed yourself, clips you created with permission, or material whose license clearly allows this use.
  • Downloading other people’s YouTube videos usually breaks the platform’s terms and may infringe copyright. A video being free to watch does not make it free to train on.
  • A LoRA trained on one artist’s or studio’s work can reproduce their style closely. Ask whether the creator would agree.
  • හොඳම මූලාශ්‍ර: ඔබම රූගත කළ footage, අවසර ඇතිව නිර්මාණය කළ clips, හෝ බලපත්‍රය මෙම භාවිතයට පැහැදිලිවම ඉඩ දෙන ද්‍රව්‍ය.
  • අනුන්ගේ YouTube වීඩියෝ බාගැනීම සාමාන්‍යයෙන් වේදිකාවේ නියම කඩ කරන අතර කතුහිමිකම උල්ලංඝනය විය හැක. වීඩියෝවක් නොමිලේ නැරඹිය හැකි වීම එයින් පුහුණු කිරීම නොමිලේ බවට පත් නොකරයි.
  • එක් කලාකරුවෙකුගේ හෝ ස්ටූඩියෝවක කෘති වලින් පුහුණු කළ LoRA එකකට ඔවුන්ගේ ශෛලිය සමීපව ප්‍රතිනිෂ්පාදනය කළ හැක. නිර්මාතෘ එකඟ වේදැයි ඇසීම වටී.

People and faces

පුද්ගලයින් සහ මුහුණු

  • Never create a realistic video of a real person doing or saying something they did not, unless they have clearly agreed.
  • In a school setting, get permission from the school and from parents or guardians before using any student’s face or voice.
  • Models carry the biases of their training data. Check whether your results stereotype people by gender, ethnicity or job.
  • සැබෑ පුද්ගලයෙකු කර නැති දෙයක් කරන හෝ කියන ආකාරයේ යථාර්ථවාදී වීඩියෝවක් ඔවුන් පැහැදිලිව එකඟ වී නොමැති නම් කිසිදා නොසාදන්න.
  • පාසල් පරිසරයක, ශිෂ්‍යයෙකුගේ මුහුණ හෝ හඬ භාවිතා කිරීමට පෙර පාසලෙන් සහ දෙමාපියන් හෝ භාරකරුවන්ගෙන් අවසර ලබාගන්න.
  • Models වල පුහුණු දත්තවල පක්ෂග්‍රාහීත්වය රැගෙන යයි. ඔබේ ප්‍රතිඵල ස්ත්‍රී-පුරුෂ භාවය, ජනවර්ගය හෝ රැකියාව අනුව පුද්ගලයන් stereotype කරන්නේදැයි පරීක්ෂා කරන්න.

Label what you publish

ඔබ ප්‍රසිද්ධ කරන දේ ලේබල් කරන්න

Tell viewers when a video is AI-made. YouTube, for example, asks creators to disclose realistic content that is altered or synthetic. Clear labels protect your audience and your channel.

වීඩියෝවක් AI මගින් සාදා ඇති විට නරඹන්නන්ට දන්වන්න. උදාහරණයක් ලෙස, YouTube නිර්මාණකරුවන්ගෙන් වෙනස් කළ හෝ කෘත්‍රිම යථාර්ථවාදී අන්තර්ගතය හෙළි කරන ලෙස ඉල්ලයි. පැහැදිලි ලේබල් ඔබේ ප්‍රේක්ෂකයන් සහ ඔබේ නාලිකාව ආරක්ෂා කරයි.

Class discussion: A classmate wants a LoRA of a famous singer for a school project. Which questions should the class ask before saying yes?

පන්ති සාකච්ඡාව: පාසල් ව්‍යාපෘතියක් සඳහා සහපාඨියෙකුට ප්‍රසිද්ධ ගායකයෙකුගේ LoRA එකක් අවශ්‍ය ය. එකඟ වීමට පෙර පන්තිය අසිය යුතු ප්‍රශ්න මොනවාද?

Test yourself

ඔබම පරීක්ෂා කරගන්න

Score: 0 / 5

ලකුණු: 0 / 5

1. Why does VRAM limit AI video more than AI image generation?1. AI image ජනනයට වඩා AI වීඩියෝ ජනනය VRAM මගින් වැඩියෙන් සීමා වන්නේ ඇයි?

Frames are denoised together so they can stay consistent, and that stack must fit in VRAM.

රූපරාමු එකිනෙකට අනුකූලව පවතින පරිදි එකට denoise වන අතර, එම සමූහය VRAM එකට ගැළපිය යුතුය.

2. What does LoRA training change?2. LoRA පුහුණුවෙන් වෙනස් වන්නේ කුමක්ද?

The base model stays frozen. That is why a LoRA file is small and cheap to train.

Base model එක frozen ව පවතී. එබැවින් LoRA ගොනුව කුඩා වන අතර පුහුණුව ලාභදායී ය.

3. Why remove watermarks and subtitles from training clips?3. පුහුණු clips වලින් watermarks සහ උපසිරැසි ඉවත් කරන්නේ ඇයි?

The model learns whatever is consistently present, including unwanted overlays.

Model එක ස්ථාවරව පවතින සියල්ල ඉගෙන ගනී; අනවශ්‍ය overlays ද ඇතුළුව.

4. Why should you keep clip chains short when extending a video?4. වීඩියෝවක් දිගු කරන විට clip chains කෙටි තබාගත යුත්තේ ඇයි?

Each segment starts from the previous segment’s last frame, including its flaws.

සෑම කොටසක්ම ආරම්භ වන්නේ පෙර කොටසේ අවසාන රූපරාමුවෙනි; එහි අඩුපාඩු ද සමඟ.

5. You finished training and downloaded your LoRA. What should you do next?5. ඔබ පුහුණුව අවසන් කර LoRA එක බාගත කළා. ඊළඟට කළ යුත්තේ කුමක්ද?

Running or stored resources can keep charging you. Delete what you no longer need.

ධාවනය වන හෝ ගබඩා කළ සම්පත් ඔබෙන් ගාස්තු අය කරමින් සිටිය හැක. තවදුරටත් අවශ්‍ය නැති දේ මකන්න.

Glossary

වචන මාලාව

Diffusion model

A network that generates images or video by removing noise step by step.

noise පියවරෙන් පියවර ඉවත් කරමින් රූප හෝ වීඩියෝ ජනනය කරන network එකකි.

Latent space

A compressed representation of an image or video where the model does its work.

Model එක වැඩ කරන රූපයක් හෝ වීඩියෝවක සම්පීඩිත නිරූපණයකි.

VAE

Variational autoencoder: converts between pixels and latent space.

Variational autoencoder: pixels සහ latent space අතර පරිවර්තනය කරයි.

VRAM

The memory on your graphics card, which holds the model while it runs.

ඔබේ graphics card එකේ මතකය; model එක ධාවනය වන විට එය රඳවා ගනී.

Quantization

Storing model numbers at lower precision to save memory.

මතකය ඉතිරි කිරීමට model සංඛ්‍යා අඩු නිරවද්‍යතාවයකින් ගබඩා කිරීමයි.

LoRA

A small add-on file that teaches a frozen model a new character or style.

Frozen model එකකට නව චරිතයක් හෝ ශෛලියක් ඉගැන්වෙන කුඩා add-on ගොනුවකි.

Trigger word

A unique word in captions that calls up what the LoRA learned.

LoRA එක ඉගෙන ගත් දේ අමතන captions වල ඇති අද්විතීය වචනයකි.

Image-to-video

Generating a clip that starts from a given still image.

ලබා දුන් නිශ්චල රූපයකින් ආරම්භ වන clip එකක් ජනනය කිරීමයි.

Drift

Slow, unwanted change in faces or colors across chained segments.

chained කොටස් හරහා මුහුණු හෝ වර්ණවල සෙමින් සිදුවන අනවශ්‍ය වෙනස් වීමයි.

Open-weight

A model whose trained weights are public even if its data or code are not.

දත්ත හෝ code ප්‍රසිද්ධ නොවුවත් පුහුණු කළ weights ප්‍රසිද්ධ model එකකි.

Frequently asked questions

නිතර අසන ප්‍රශ්න

Can I do this without a GPU?GPU එකක් නැතිව මෙය කළ හැකිද?

On a CPU it is impractically slow. Rent a cloud GPU or use a hosted service instead.

CPU එකක ප්‍රායෝගිකව නොහැකි තරම් මන්දගාමී ය. ඒ වෙනුවට cloud GPU එකක් කුලියට ගන්න හෝ hosted සේවාවක් භාවිතා කරන්න.

Is an RTX 3060 12 GB enough?RTX 3060 12 GB ප්‍රමාණවත්ද?

Yes for learning with quantized models and short low-resolution clips. For video LoRA training, use a rented card.

Quantized models සහ කෙටි අඩු-resolution වීඩියෝ සමඟ ඉගෙනීමට ප්‍රමාණවත් ය. වීඩියෝ LoRA පුහුණුවට කුලියට ගත් කාඩ්පතක් භාවිතා කරන්න.

How many clips do I need?මට clips කීයක් අවශ්‍යද?

A character LoRA often works from a few dozen clean, varied clips. Add more only if the results are weak.

චරිත LoRA එකක් බොහෝ විට පිරිසිදු, විවිධාකාර clips දස කිහිපයකින් ක්‍රියා කරයි. ප්‍රතිඵල දුර්වල නම් පමණක් තව එක් කරන්න.

I get an out-of-memory error. What should I try?මට out-of-memory දෝෂයක් එනවා. කුමක් උත්සාහ කළ යුතුද?

Lower the resolution, shorten the clip, use an 8-bit or 4-bit model, close other GPU programs, and enable block swapping in the trainer.

Resolution අඩු කරන්න, clip එක කෙටි කරන්න, 8-bit හෝ 4-bit model එකක් භාවිතා කරන්න, වෙනත් GPU වැඩසටහන් වසන්න, සහ trainer හි block swapping සක්‍රිය කරන්න.

Should I buy a PC or rent a GPU?PC එකක් මිලදී ගන්නවාද GPU එකක් කුලියට ගන්නවාද?

Occasional use favors renting. Daily use, or privacy needs, favor owning a 24 GB card. Estimate your hours with the cost tool in tab 4.

ඉඳහිට භාවිතයට කුලියට ගැනීම වඩා සුදුසුයි. දිනපතා භාවිතය හෝ පෞද්ගලිකත්ව අවශ්‍යතා සඳහා 24 GB කාඩ්පතක් හිමිකර ගැනීම වඩා සුදුසුයි. Tab 4 හි වියදම් මෙවලමෙන් ඔබේ පැය ගණන ඇස්තමේන්තු කරන්න.

Can I train on a laptop?Laptop එකක පුහුණු කළ හැකිද?

Rarely. Laptop GPUs have less VRAM than desktop cards with the same name, and they throttle under long loads.

කලාතුරකින් පමණි. Laptop GPU වල එකම නම ඇති desktop කාඩ්පත් වලට වඩා VRAM අඩු වන අතර, දිගු බරක් යටතේ ඒවා throttle වේ.

Is it legal to publish my AI video generation work on YouTube?මගේ වීඩියෝ YouTube හි භාවිතා කිරීම නීත්‍යානුකූලද?

It depends on your training data, the model license and local law. Use footage you own, label AI content, and read tab 7.

එය රඳා පවතින්නේ ඔබේ පුහුණු දත්ත, model බලපත්‍රය සහ ප්‍රාදේශීය නීතිය මතය. ඔබටම අයිති footage භාවිතා කර, AI අන්තර්ගතය ලේබල් කර, tab 7 කියවන්න.

Last updated: October 2026. Models, prices and licenses in this field change quickly; confirm current details on each project’s own page.

අවසන් යාවත්කාලීනය: 2026 ඔක්තෝබර්. මෙම ක්ෂේත්‍රයේ models, මිල සහ බලපත්‍ර ඉක්මනින් වෙනස් වේ; වත්මන් විස්තර එක් එක් ව්‍යාපෘතියේ පිටුවෙන් තහවුරු කරගන්න.

Copied to clipboardපිටපත් කළා

Be the first to comment

Leave a Reply

Your email address will not be published.


*