IICSM AI Development

LINUX WORKSTATION · PRACTICAL REFERENCE

Your own AI agent.
Models, movies & robots.

Build a companion you can talk to, with local hearing, speech and memory. Explore vision, logic and cognition. Make a movie or follow a complete small walking humanoid robot plan on Linux.

Updated 1 November 2026 · Conversational AI brain · Five AI capabilities · Movie workflow · Walking robot under $3,000

START HERE

The complete path from an existing LLM to a movie

Start with a model that already knows language. Use it to write and plan. Generate footage with a separate video model, add sound, then edit and export the movie.

This guide assumes an Ubuntu 24.04 LTS desktop, an NVIDIA GPU, Python, and local generation. Other Linux distributions and AMD/Intel GPUs need different driver and PyTorch instructions. No Linux computer or GPU specifications were supplied in the conversation.

Idea & story bible→LLM script & shot list→Reference images & video→Voices & sound→Edit, review & export
ComponentWhat it doesWhat it does not imply
Existing LLM, such as QwenProduces text: scripts, plans, structured tool requestsInstalling it does not train a new model
OllamaLoads and serves the LLM on your computerIt is not the video-generation model
Your Python agentMaintains state and calls approved toolsAn agent needs explicit tools and error handling
ComfyUI + Wan/LTX video modelRenders shots through a saved workflowIt does not guarantee continuity across a complete film
Piper, recorded audio, FFmpeg, KdenliveProduce speech and assemble the filmA finished film still needs editorial review

First milestone: one good five-second shot. Then a 30-second pilot, then a one-minute scene, then the full film. The guide page is documentation; generation happens on your Linux workstation.

LOCAL CONVERSATIONAL AI

Build an AI brain that can communicate with you

Start with your Linux computer and build a local companion for typed and spoken conversation, with facts you explicitly choose to remember.

The new step-by-step guide covers everything to buy, every program to install, Ollama + Qwen, Whisper hearing, Piper speech, controlled SQLite memory, troubleshooting, backup, acceptance checks and official references. A downloadable Python companion connects the components.

Open the complete AI brain setup guide →

Shopping list and two budget scenarios · Linux installation steps · Download companion starter

This CPU-first conversation setup does not require the GPU workstation specified below for movie generation. Use your existing computer first; the full guide labels hardware allowances and untested machine-dependent steps.

MODEL DIRECTORY

AI model families: vision, hearing, speech, logic, and cognition

Choose a model by its inputs and outputs. A language model, a vision-language model, a speech recognizer, and a robot controller have different jobs. One multimodal model can cover several jobs, but its runtime must support the required modalities.

CapabilityExample models / toolsInput → outputUse in your agent
VisionQwen3-VL 2B/4B; image-processing toolsImage + question → text / structured observationsDescribe a frame, read visible text, compare reference images
HearingWhisper via faster-whisper; LAION CLAPAudio → transcript or sound/text similarityHear spoken commands; distinguish speech, music, footsteps, and other sounds
SpeechPiper voice models; Kokoro-82MText → spoken audioNarration, dialogue drafts, and the robot’s voice
Logic / reasoningQwen3; DeepSeek-R1; Z3 for explicit constraintsFacts + question → proposed answer; formal constraints → solver resultCheck a timeline, propose a plan, validate constraints
Cognition / planning / memoryQwen3 with tools; EmbeddingGemma with retrieval; persistent stateGoal + observations + memory → bounded next actionMaintain task progress, recall facts, choose and review tools

Start with one capability and a small test set. Keep resource-heavy models sequential until memory and response time have been measured. The examples below use local files you deliberately supply; this website does not activate your camera or microphone.

Vision AI: understand images and inspect movie frames

Qwen3-VL 4B is a concrete local starting model; a 2B variant is also available. A current compatible Ollama installation is required. Use a vision-capable model rather than expecting a text-only model to understand an image filename.

Sources: [26], [27]
bash · Linux terminal
ollama pull qwen3-vl:4b
cd ~/ai-movie
source .venv/bin/activate
python -m pip install ollama

# After putting an image at references/robot.png:
python - <<'PY'
from ollama import chat
reply = chat(model="qwen3-vl:4b", messages=[{
    "role": "user",
    "content": "Describe the robot, its visible objects, and any uncertainty.",
    "images": ["references/robot.png"]
}])
print(reply.message.content)
PY

For a movie, extract representative frames with FFmpeg and compare them with approved character references. For robotics, add a calibrated depth camera and a detector/tracker when position estimates are needed; text descriptions alone do not provide reliable metric coordinates or collision avoidance.

Check: test known images, small text, lighting changes, and absent objects. Record errors. A description of a few frames does not verify every frame or the physical safety of a scene. Image resolution, image count, and context length affect memory.

Hearing AI: recognize speech and understand non-speech sounds

Speech recognition: Whisper models run through faster-whisper. Start with base on CPU, then compare small or larger models if needed. This produces text and timestamps; it is not a general alarm detector or a guarantee of correct transcription.

Sources: [28]
bash · Linux terminal
mkdir -p ~/ai-tools
python3 -m venv ~/ai-tools/hearing-env
source ~/ai-tools/hearing-env/bin/activate
python -m pip install faster-whisper
cd ~/ai-movie

# Supply your own recording at audio/command.wav.
python - <<'PY'
from faster_whisper import WhisperModel
model = WhisperModel("base", device="cpu", compute_type="int8")
segments, info = model.transcribe("audio/command.wav", vad_filter=True)
for segment in segments:
    print(f"{segment.start:.2f}–{segment.end:.2f}: {segment.text}")
PY

Environmental hearing: LAION clap-htsat-unfused compares an audio clip with candidate sound descriptions. It can help label recorded ambience or route an observation such as possible footsteps to an agent. Scores depend on the candidate set; they are not calibrated probabilities that an event really occurred.

Sources: [29], [35]
bash · Linux terminal
# In a separate environment; CPU example to avoid GPU-wheel conflicts.
python3 -m venv ~/ai-tools/sound-env
source ~/ai-tools/sound-env/bin/activate
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
python -m pip install transformers soundfile
cd ~/ai-movie
ffmpeg -n -i audio/recording.wav -t 10 -ac 1 -ar 48000 audio/hearing-48k.wav
python - <<'PY'
import soundfile as sf
import torch
from transformers import ClapModel, ClapProcessor
name = "laion/clap-htsat-unfused"
processor = ClapProcessor.from_pretrained(name)
model = ClapModel.from_pretrained(name).eval()
audio, sr = sf.read("audio/hearing-48k.wav", dtype="float32")
assert sr == 48000 and audio.ndim == 1 and len(audio) > 0
labels = ["the sound of speech", "the sound of music",
          "the sound of footsteps", "the sound of a ringing alarm"]
inputs = processor(text=labels, audio=audio, sampling_rate=sr,
                   return_tensors="pt", padding=True)
with torch.no_grad():
    scores = model(**inputs).logits_per_audio.softmax(dim=-1)[0].tolist()
for label, score in sorted(zip(labels, scores), key=lambda item: -item[1]):
    print(f"{score:.3f} {label}")
PY

The first run downloads model files. Follow the linked processor documentation if a library update changes an argument. For continuous listening, add explicit microphone control, buffering, voice activity detection, echo handling, and bounded recording retention. For films, compare recognized words with the approved script before making subtitles.

Check: use quiet/noisy speech, silence, music, and overlapping sounds. Measure missed and false events and test after the speaker starts playing. A safety-critical alarm must retain its independent certified detector; these examples are exploratory audio models.

Speech AI: give your agent a voice

Piper uses downloadable voice models; the en_US-lessac-medium example and complete commands appear in step 10: voices and audio. Kokoro-82M is another local text-to-speech option with an official model card and implementation. Choose a voice and language based on listening tests and applicable voice/model terms.

Sources: [21], [30]
  1. Prepare the final text and pronunciation notes.
  2. Generate one utterance per file and keep the text, voice ID, sample rate, and settings with it.
  3. Check intelligibility, names, timing, clicks, and clipping.
  4. For a robot, queue utterances and allow interruption. Prevent its own speaker from being mistaken for a fresh human command.
  5. For a film, align each utterance with the edit and export the approved mix.

A TTS model produces speech; it does not automatically understand microphone input, clone any requested voice, or synchronize a character’s lips. Start with push-to-talk and half-duplex interaction; add full-duplex echo cancellation only after testing.

Logic AI: reason about plans and verify explicit constraints

Qwen3 and DeepSeek-R1 8B can propose solutions to reasoning problems. The smaller R1 tag is a distilled model rather than the full-size R1. Generated reasoning can still be wrong; test conclusions with calculations, code, or a solver.

Sources: [5], [31]
bash · Linux terminal
ollama pull deepseek-r1:8b
ollama run deepseek-r1:8b "A film has 240 shots of 5 seconds. Check the runtime and describe the arithmetic."

# Optional symbolic checking: install in the agent environment.
cd ~/ai-movie
source .venv/bin/activate
python -m pip install z3-solver
python - <<'PY'
from z3 import Int, Solver, sat
shots = Int("shots")
solver = Solver()
solver.add(shots > 0, shots * 5 == 20 * 60)
assert solver.check() == sat
print("Five-second shots required:", solver.model()[shots])
PY

Z3 is a symbolic solver, not an LLM. It checks the constraints you encode. In the example it should return 240; this verifies the timing equation, not the story quality. For a robot, deterministic code must enforce workspace, velocity, joint, power, and command limits after the language model proposes an action.

Sources: [32]

Check: build cases with known valid and invalid answers, contradictory constraints, and missing facts. Require the system to report uncertainty instead of fabricating inputs. Keep a validated controller between a reasoning model and actuators.

Cognition AI: planning, memory, feedback, and action selection

There is no single agreed model type called “human cognition AI.” A practical cognitive agent combines a planning LLM such as Qwen3, persistent task state, retrieval, tools, and feedback. EmbeddingGemma supplies text embeddings for memory search; it does not generate dialogue or become the planning model.

Sources: [25], [33], [34]
bash · Linux terminal
ollama pull qwen3:4b
ollama pull embeddinggemma
curl http://127.0.0.1:11434/api/embed -d '{
  "model": "embeddinggemma",
  "input": ["Rook has a blue chest light.", "The greenhouse is at dawn."],
  "truncate": false
}'

Split reference material into short attributed chunks. Embed and store the chunks with their IDs and source text; embed a query with the same model, retrieve relevant chunks, then pass the text to the planner. Persist accepted facts and task states in SQLite or JSON. An embeddings response alone is not a complete memory system or a trained personality.

Goal + memory→Vision + hearing observations→Plan→Validate + execute tool→Observe + update state

Give each observation a timestamp, source, and uncertainty. A movie agent can remember which take was accepted; a robot can remember a validated named location. The model requests an allowed action, the controller checks it, and the executor reports success or failure. Replan from the result rather than assuming success.

Check: test an interrupted task, stale observation, conflicting memory, missing sensor, rejected action, and failed tool. Limit steps and retries. Keep memory writes explicit and correctable. The original movie starter remains a small text-planning/workflow example; these added sections describe extensions, not already-connected robot functions.

All models here are optional components. CPU audio examples can share a machine with sequential GPU jobs. Measure latency and memory on your actual Linux system before installing every model or buying more hardware.

ROBOTICS DEVELOPMENT

Develop a walking humanoid robot under $3,000

Your selected target is a two-legged walking humanoid with a hardware budget below $3,000. The detailed plan uses a small TonyPi Pro robot and your existing Linux computer for local AI. It covers all five model capabilities, the complete system architecture, a twelve-week development schedule, procurement, stop/recovery controls, and acceptance tests.

Open the complete robot development and purchasing plan →

Detailed components and purchase websites · Cost breakdown · Download shopping list · Structured bill of materials

All quoted and estimated amounts are labeled. No robot has been bought or tested. The original movie workflow continues below.

1. Choose the workload and check hardware

A 20-minute project is normally assembled from many short shots. More total minutes means more rendering and storage; the memory required for one shot depends on model size, precision, resolution, frame count, and offloading.

ComponentWorkable planning targetMore comfortable target
GPU memory (VRAM)24 GB NVIDIA GPU for selected local workflows32 GB or more; exact workflow still determines fit
System RAM64 GB128 GB for more offloading and concurrent applications
CPUModern 8-core processorModern 12–16-core processor
Project SSD2 TB NVMe4 TB NVMe plus independent backup
System64-bit Ubuntu 24.04 LTSGPU-compatible NVIDIA driver and adequate cooling

These are workstation recommendations, not universal minimums or a promise of native 4K. Wan2.2’s own 5B example lists at least 24 GB VRAM with memory-saving options. ComfyUI documents its native-offloading 5B workflow as fitting 8 GB VRAM; lower memory can mean more offloading and different performance. LTX Desktop lists 24 GB VRAM, 32 GB recommended, for Linux. System RAM and VRAM are different resources.

Sources: [1], [2], [3]
bash · Linux terminal
cat /etc/os-release
uname -m
free -h
df -h "$HOME"
nvidia-smi

Checkpoint: record the distribution, GPU model, driver version, free VRAM, RAM, and free SSD space. If nvidia-smi fails, install the distribution-recommended NVIDIA driver, reboot when prompted, and repeat the check before installing GPU workloads. Do not copy an old CUDA installer over a working driver.

For a mostly narrated slideshow, much lighter hardware can work. This guide targets generated moving footage.

2. Prepare Linux and separate project environments

bash · Linux terminal
sudo apt update
sudo apt install -y git curl python3 python3-venv python3-pip ffmpeg unzip

mkdir -p ~/ai-movie/{scenes,references,renders,accepted,normalized,audio,subtitles,exports,logs,models}
cd ~/ai-movie
python3 -m venv .venv
source .venv/bin/activate
python --version
ffmpeg -version
ffprobe -version

Use Python 3.11 or newer for the starter. Ubuntu 24.04 normally provides Python 3.12. Keep the small agent, ComfyUI, speech, and training packages in separate virtual environments so their dependencies do not conflict.

Download movie-starter.zip, extract it into ~/ai-movie/, and review README.txt. It contains a small planner and ComfyUI bridge, a story-bible example, and editable binding instructions. Model weights and a working video workflow are separate downloads.

bash · Linux terminal
# If your browser saved the archive in ~/Downloads:
unzip -n ~/Downloads/movie-starter.zip -d ~/ai-movie/
cd ~/ai-movie
python movie_agent.py --help

Checkpoint: Python, FFmpeg, and the starter help command run. Keep project files on a volume with enough free space; back up scripts, reference materials, and accepted takes separately.

3. Install Ollama and run an existing LLM

bash · Linux terminal
curl -fsSL https://ollama.com/install.sh -o /tmp/ollama-install.sh
less /tmp/ollama-install.sh
sh /tmp/ollama-install.sh
ollama --version
ollama run qwen3:4b

Review the installer before running it; it may request administrator access. qwen3:4b is a small example model, approximately 2.5 GB to download; runtime memory is higher and grows with context. Use a larger or different supported model if your quality tests justify it. Type /bye to exit chat.

Sources: [4], [5]
bash · Linux terminal
# If Ollama reports a connection error, start it in another terminal:
ollama serve

# Verify the local service:
curl http://127.0.0.1:11434/api/tags
ollama list
ollama ps

Do not start a second server if the installer already started its service. Try: “Write six five-second shots about a silver robot finding a flower. Describe appearance, location, action, camera, and narration.”

Checkpoint: the model responds locally. This tests text generation, not footage generation. Record the exact model identity with ollama show qwen3:4b.

4. Write the creative brief and story bible

Before automation, decide the audience, genre, visual style, target runtime, resolution, frame rate, narration language, and whether there is spoken dialogue. For the first pilot, use one character, one location, gentle motion, and narration without visible lip-synced speech.

Edit the supplied story-bible.txt. Include fixed character descriptions, wardrobe/props, location layout, visual palette, plot chronology, pronunciation notes, and reference-image filenames. Keep one approved version and supply relevant excerpts to each planning request.

Ask the LLM for a synopsis, a scene outline, then one scene at a time. Read and revise these before rendering. Keep an overall runtime budget; a 20-minute film includes credits, titles, transitions, and silence as well as generated shots.

Checkpoint: approve the outline and character descriptions. Reference documents supplied in prompts are context, not weight training. If the collection grows too large for context, retrieve relevant passages rather than stuffing every document into every request.

5. Generate and validate a structured shot list

bash · Linux terminal
cd ~/ai-movie
source .venv/bin/activate
python movie_agent.py plan \
  --scene-id scene01 \
  --idea "Rook discovers a yellow flower in the abandoned greenhouse" \
  --bible story-bible.txt \
  --shots 6 \
  --output scenes/scene01.json
python -m json.tool scenes/scene01.json

The starter calls Ollama’s local API with a JSON schema and validates shot IDs, counts, and durations. It plans six shots of five seconds each: a 30-second pilot. It does not mark its own output approved. Structured output helps formatting; it does not prove that the story or timing is good.

Sources: [6]
JSON example · Linux terminal
{
  "id": "scene01-001",
  "duration_seconds": 5,
  "prompt": "A small rounded silver robot with a blue circular chest light and scratched left shoulder kneels beside one yellow flower. Abandoned greenhouse at dawn, amber light, slow close-up, one gentle movement.",
  "narration": "In the silence, something was still growing."
}

For each shot, also track reference-image identity, seed, workflow version, model hashes, expected audio, take number, and review status. The starter records the plan, workflow hash, seed, prompt ID, and downloaded clip checksum; you maintain reference provenance and acceptance decisions.

Checkpoint: verify that each shot is achievable, character descriptions are repeated, narration fits its allotted time, and scene durations add up. Build a whole-film manifest in editorial order. Do not ask a small model to produce 240 fully detailed shots in a single response.

6. Optional: customize or fine-tune the LLM

First try clear instructions and a few approved examples. If you need access to character facts, retrieve the story bible. If you need a repeated output style or behavior that prompts do not reliably deliver, consider fine-tuning.

ChoiceRoleWhere it fits
LlamaFactoryTraining/evaluation/export WebUIA first supervised LoRA experiment
UnslothGuided, memory-efficient fine-tuningA Python-based single-GPU workflow
AxolotlConfiguration-driven trainingRepeatable experiments
Transformers + TRL + PEFTModel loading, training loops, adaptersCustom Python training code
DeepSpeed / Megatron CoreDistributed training infrastructureLarger jobs and pretraining; optional here
Sources: [7], [8], [9], [10], [11], [12], [13]
  1. Choose a training-compatible checkpoint and supported chat template. It should match the intended base model; do not assume Ollama’s quantized download is the training source.
  2. Create reviewed prompt/response pairs from scripts and shot lists you are entitled to use. Save complete conversational records. Deduplicate and separate whole stories into training, validation, and held-out test sets.
  3. Use a separate environment and install a training tool using its current hardware-specific instructions. GPU architecture, driver, Python, and CUDA-wheel compatibility must match.
  4. Run a small supervised LoRA/QLoRA pilot. A possible starting experiment is rank 16, batch size 1, sequence length 1024, one epoch, and learning rate 0.0002; these are tunable example settings, not model-independent defaults. Log loss, validation results, time, and peak GPU memory.
  5. Compare the tuned model with the original on the same unseen prompts: valid schema, useful shots, character consistency, and general writing. Reject a change that merely memorizes examples or harms needed skills.
  6. Save the adapter and exact base revision. Merge/export only through a supported path, test the exported model again, and use it in the planner.

QLoRA trains adapters over a low-bit base model to reduce memory needs. Whether a training job fits depends on model, sequence length, batch size, optimizer, and implementation; fitting inference is not proof that training will fit.

Sources: [11], [14]
bash · Linux terminal
# After following the LlamaFactory installation guide in a separate environment:
llamafactory-cli webui

# After exporting a supported merged model to GGUF:
cat > Modelfile <<'EOF'
FROM ./movie-writer.gguf
EOF
ollama create movie-writer -f Modelfile
ollama run movie-writer

The commands above assume installation and a real compatible export already exist. Adapter-only checkpoints need the matching base model; not every architecture or export format is supported by every runtime. A Modelfile with a system prompt alone does not perform fine-tuning.

Sources: [15], [16]

Checkpoint: keep your original model available and proceed without fine-tuning if it already passes the writing tests. Training the LLM does not train the video model or teach a character’s visual identity to it.

7. Install ComfyUI and verify GPU access

bash · Linux terminal
mkdir -p ~/ai-tools
cd ~/ai-tools
git clone https://github.com/Comfy-Org/ComfyUI.git
cd ComfyUI
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip

Install a stable PyTorch GPU build compatible with your GPU and NVIDIA driver using the official selector. Do this before installing ComfyUI’s requirements. The current ComfyUI instructions show a CUDA 13.0 wheel example; use it only when your selected hardware and driver support that build. Older cards or AMD/Intel systems need their corresponding supported instructions.

Sources: [17], [18]
bash · Linux terminal
# EXAMPLE ONLY: CUDA 13.0-compatible NVIDIA system.
# Otherwise substitute the compatible command from the official PyTorch selector.
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130

python -m pip install -r requirements.txt
python -c "import torch; print(torch.cuda.is_available()); print(torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'GPU NOT READY')"
git rev-parse HEAD > ~/ai-movie/logs/comfyui-commit.txt
python -m pip freeze > ~/ai-movie/logs/comfyui-packages.txt
python main.py --listen 127.0.0.1 --port 8188

Open http://127.0.0.1:8188 in the Linux browser. Keep that terminal open. Bind the service to localhost; remote access should use an authenticated tunnel rather than an exposed unauthenticated port.

Checkpoint: the NVIDIA check prints True and the expected GPU, ComfyUI starts without missing dependencies, and its page loads. An AMD/Intel installation uses its own device checks instead.

8. Download a video model and render one shot manually

Use the official Wan2.2 5B template for a concrete starting workflow. Its text-to-video path can make the first shot without a reference image. For controlled character appearance, create, draw, photograph, or generate approved reference images, then test image-to-video with the same character, lighting, and wardrobe.

  1. In ComfyUI, open the template library and choose the Wan2.2 5B video workflow linked in the official tutorial.
  2. Download its matching diffusion model, VAE, and text encoder from the linked official/repackaged model repository. Retain model cards, licenses, versions, and file hashes.
  3. Place the files in the folders below; select the actual downloaded filenames in their loader nodes.
  4. Start with the template’s supported dimensions and frame count. For the roughly-720p example, 1280×704 is not the same as 1280×720. Add padding during editing if you want a 16:9 720p final canvas.
  5. Paste one approved shot prompt. Fix its seed. If using image-to-video, load the approved reference image and enable the corresponding path.
  6. Run the workflow, save an MP4, and measure time, VRAM, RAM, duration, and visual quality.
Sources: [1], [2]
Model locations · Linux terminal
ComfyUI/models/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors
ComfyUI/models/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors
ComfyUI/models/vae/wan2.2_vae.safetensors

Use the official tutorial if filenames or templates change. Wan workflows commonly constrain frame counts; a 121-frame clip at 24 fps is about 5.04 seconds. The final five-second timeline segment can be trimmed to 120 frames. Respect the selected model’s dimensions and temporal constraints instead of entering arbitrary numbers.

Checkpoint: one real clip plays and contains usable motion. Render a second take to test repeatability. Matching seeds do not guarantee matching characters. LTX is an alternative with joint audio/video capabilities, but its own workflow, models, requirements, and audio controls must be used.

Sources: [19]

9. Connect your agent to the working video workflow

Automation comes after a manual shot works. Export the workflow in API format as ~/ai-movie/workflow-api.json; enable developer/API-export options if the current UI requires it. An editor canvas JSON is a different format.

bash · Linux terminal
cd ~/ai-movie
source .venv/bin/activate
python movie_agent.py inspect workflow-api.json
cp -n bindings.example.json bindings.json

Edit bindings.json to point to the actual node IDs and input names shown by inspect. Bind the positive text input and literal seed input. A seed field may be named noise_seed. The example placeholders are deliberately not claimed as universal node IDs. Do not bind a connection array; select the node that owns the actual literal value.

bash · Linux terminal
# After replacing the placeholders in bindings.json:
python movie_agent.py render \
  --plan scenes/scene01.json \
  --shot scene01-001 \
  --seed 42 \
  --submit

The bridge submits to /prompt, records the job ID, polls /history/{prompt_id}, and retrieves the saved MP4 through /view. Your workflow must expose exactly one saved MP4. It preserves the manually tested dimensions, fps, frame count, and reference image; change and validate those for a different shot type. Nested subgraph exports may require flattening or a more capable bridge.

Sources: [20]

renders/scene01-001/take-42/ receives the workflow, job record, history, and downloaded clip. Repeat the same command to resume polling an existing recorded job after a timeout. Use a new seed for a new take. If the initial submission loses its connection before the job ID is recorded, inspect ComfyUI’s queue/history before trying again; an unknown outcome can otherwise produce duplicate renders.

Agent controls: allow only named tools, validate arguments, cap time and retry count, log each result, and require review before accepting footage. Avoid giving a beginner agent unrestricted shell access. The starter is an example orchestrator; it does not independently judge continuity, generate reference images, mix audio, or approve a movie.

Checkpoint: the same shot can be submitted and its output recovered through the API. Keep ComfyUI history and output files until recovery is no longer needed. Run one GPU-heavy task at a time initially; unload the LLM if video generation needs its memory.

10. Create voices, narration, music, and sound

For the first pilot, record narration yourself or use a local speech engine. Piper provides a concrete local text-to-speech option. Install it in a separate environment and select a voice after checking its model card and usage terms.

Sources: [21]
bash · Linux terminal
python3 -m venv ~/ai-tools/piper-env
source ~/ai-tools/piper-env/bin/activate
python -m pip install piper-tts
mkdir -p ~/ai-movie/models/piper
cd ~/ai-movie/models/piper
python -m piper.download_voices en_US-lessac-medium
python -m piper -m en_US-lessac-medium \
  -f ~/ai-movie/audio/scene01-001.wav \
  -- "In the silence, something was still growing."
ffprobe -v error -show_entries format=duration \
  -of default=noprint_wrappers=1:nokey=1 ~/ai-movie/audio/scene01-001.wav

If narration exceeds five seconds, shorten the wording or revise the edit; do not silently cut it off. Keep dialogue per character and per shot in separate WAV files. Add music and ambience from your own recordings or suitably licensed sources. Music generation is optional and would require another model or service.

Place speech, effects, ambience, and music on separate tracks in the editor. Lower music beneath speech, add room tone, and listen for clipped peaks. Export the approved full-length mix as audio/mix.wav. Joint audio/video models still need listening and synchronization checks.

Checkpoint: narration is understandable and fits the edit. Subtitles are timed to the actual spoken audio. Lip-sync dialogue is an additional workflow; the narrated starter does not implement it.

11. Select takes, assemble, and export the movie

Review every take for identity, hands/objects, motion, framing, continuity, camera direction, text artifacts, and timing. Copy only accepted clips into editorial order: accepted/shot001.mp4, shot002.mp4, and so on. Store a manifest mapping those names back to shot IDs, seeds, and source files.

Use Kdenlive for a visual timeline: create a 1280×720, 24 fps project; import accepted footage and audio; arrange clips; trim; add titles, subtitles, transitions, and credits; mix sound; export H.264/AAC. Its official Linux distributions include AppImage and Flatpak.

Sources: [22]

For a simple sequence of five-second silent shots, the following FFmpeg example normalizes each accepted clip before concatenation. It scales and pads to 1280×720, uses 24 fps, and trims to five seconds. It does not lengthen a shorter source; replace or explicitly extend short footage before assembly. Keep all inputs at least five seconds and check the results.

bash · Linux terminal
cd ~/ai-movie
mkdir -p normalized exports
# Example for the first accepted shot; repeat with distinct filenames for every shot.
ffmpeg -n -i accepted/shot001.mp4 -an \
  -vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fps=24,format=yuv420p" \
  -t 5 -c:v libx264 -crf 18 -preset medium normalized/shot001.mp4

# Create normalized/shot002.mp4, etc. using the same settings.
# Write the approved editorial order; this two-shot list is only an example.
cat > normalized/shots.txt <<'EOF'
file 'shot001.mp4'
file 'shot002.mp4'
EOF
ffmpeg -n -f concat -safe 1 -i normalized/shots.txt \
  -c copy exports/picture.mp4

Use the same dimensions, codec, fps, and stream configuration for all normalized clips. The concat demuxer reads relative paths from the list file’s directory. The example list produces ten seconds; expand it to your complete approved timeline. -n preserves existing outputs; use new output names for revisions.

Sources: [23], [24]
bash · Linux terminal
# Combine the picture edit with your approved full-length audio mix.
# Replace 1200 with the measured approved picture duration for a shorter pilot.
# apad preserves the picture length if the audio ends early.
ffmpeg -n -i exports/picture.mp4 -i audio/mix.wav \
  -map 0:v:0 -map 1:a:0 -c:v copy \
  -af apad -t 1200 -c:a aac -b:a 192k \
  -movflags +faststart exports/movie.mp4

# Optional: add timed SRT subtitles as a selectable MP4 subtitle track.
ffmpeg -n -i exports/movie.mp4 -i subtitles/movie.srt \
  -map 0:v:0 -map 0:a:0 -map 1:0 \
  -c:v copy -c:a copy -c:s mov_text \
  -movflags +faststart exports/movie-subtitled.mp4

Those commands assume the specified inputs exist and the audio is an already approved mix. They do not create music, perform automatic dialogue alignment, or replace an editor. Export a 30-second pilot first using -t 30. Upscaling can increase output dimensions, but does not recreate details absent from generated footage.

Checkpoint: a complete MP4 plays with correct order, sound, titles, and subtitles. Preserve the editable timeline project and source assets.

12. Verify, archive, and only then scale up

bash · Linux terminal
cd ~/ai-movie
ffprobe -v error -show_entries \
  format=duration,size:stream=codec_type,codec_name,width,height,avg_frame_rate \
  -of json exports/movie.mp4
ffmpeg -v error -i exports/movie.mp4 -f null -
sha256sum exports/movie.mp4 > exports/movie.mp4.sha256
sha256sum -c exports/movie.mp4.sha256

Inspect runtime, video dimensions, audio presence, decoding errors, and lip/dialogue timing. Watch the entire film and listen with headphones; a clean decoder run cannot establish visual or narrative quality. Test playback on another device.

Archive the story bible, scripts, prompts, approved shot manifest, source/model license notes, workflow exports, model versions/checksums, dependency snapshots, reference images, audio stems, subtitles, timeline, final MP4, and checksums. Keep an independent backup. Preserve accepted work when updating tools; retest a short shot after updates.

Completion means: the intended runtime is achieved, all clips are accepted, narration and subtitles are synchronized, credits are present, the file decodes and plays, and the source project can be recovered.

Check rights and consent for training material, voices, reference images, music, and likenesses before distribution. Model and asset licenses differ; this page does not grant permissions.

Planning a 20-minute production

At five seconds per accepted shot, 20 minutes contains 1,200 ÷ 5 = 240 shots. With three attempts per accepted shot, that is 720 generated clips. A storyboard might instead use longer shots, stills, held frames, and titles; count the actual timeline rather than assuming every second is newly generated motion.

Estimate your measured rendering workload

Use a benchmark from your own selected workflow. This calculator is arithmetic, not a GPU performance forecast.

240 accepted shots × 3 attempts = 720 renders; at 5 minutes each, 60 GPU-hours on one GPU.

Illustrative time per five-second render720 sequential renders
2 minutes24 hours
5 minutes60 hours
10 minutes120 hours

These calculations exclude model loading, reference preparation, audio, upscaling, failed jobs, editorial revisions, and human review. For genuinely independent GPU workers, parallelism can improve throughput, but GPUs do not automatically combine their VRAM and scaling is not guaranteed.

As a storage example, a 1,200-second final movie at 10 Mb/s video plus 192 kb/s audio is about 1.53 GB in decimal units, before container overhead. That is only the delivery file. Model weights, rejected takes, high-quality intermediate files, uncompressed frames, audio, caches, and backups can dominate the project. The suggested 2–4 TB working SSD is headroom, not a calculated minimum.

Troubleshooting and restart points

SymptomWhat to check next
Ollama connection refusedCheck its service or start ollama serve once; verify /api/tags.
CUDA unavailableVerify nvidia-smi, the active virtual environment, GPU architecture support, and the selected PyTorch GPU wheel.
Out of GPU memoryUnload other models; use supported offloading; reduce frame count/resolution within model constraints; benchmark again.
Missing ComfyUI nodes or modelsUse the matching official template and documented dependencies; verify loader paths and supported node versions.
Invalid shot JSONValidate the schema, shorten the request, reduce shots per request, and inspect the raw model response.
ComfyUI API rejects workflowExport API format, inspect node IDs, preserve connection arrays, and check returned node_errors.
Polling times outKeep the job ID; inspect the queue/history; rerun the same recorded take without creating a new render.
Character changes between shotsUse approved image references, consistent descriptions and wardrobe, simpler motion, and manual selection; seeds alone are insufficient.
Wrong duration or silent exportInspect streams with ffprobe; verify actual frame rate, approved clip lengths, audio maps, and timeline mix.
Training fits poorly or makes writing worseCheck data quality/leakage and chat template; compare held-out cases; restore the original model if necessary.

Conversation captured for later reference

The nine earlier questions and answers are preserved in the captured conversation and plain-text transcript. The current request is included. Only user messages and final assistant answers are captured; internal instructions, tools, credentials, and unrelated chats are excluded.

The transcript preserves the earlier answers as written. The guide above provides the consolidated workflow and clarifies workflow-dependent memory requirements. The recap below is edited for quick reference, not a verbatim transcript.

Installing AI on Linux

Install a runtime such as Ollama, download an existing model, and test local text generation. Hardware selection follows the intended workload.

Building your own agent

Write a controller that gives the model instructions, provides named tools, validates requests, executes permitted actions, and records results.

Generating a movie

Coordinate scriptwriting, shot planning, visual generation, sound, and editing. Existing models can supply each capability.

Hardware for 20 minutes

Choose hardware for an individual shot, then estimate total rendering time and storage. The workstation targets and workflow-specific memory distinctions appear above.

What Ollama is

Ollama loads and serves supported models. For this project it can run the text model that helps write and plan.

Starting with an LLM

Yes. First make the existing model respond; then connect it to a small planning program before video automation.

Ollama versus the LLM

The LLM is the model; Ollama is a runtime; your agent is the coordinating program; the video model creates footage.

Training your LLM

Fine-tune an existing model when evaluation justifies it. Prompts and retrieval do not update weights. Ollama is primarily used to run the result.

Training tools

LlamaFactory, Unsloth, Axolotl, Transformers/TRL/PEFT, and larger-scale tools such as DeepSpeed and Megatron Core serve different needs.

References and verification status

Official project documentation reviewed on 1 November 2026 (UTC). Commands, supported hardware, models, and licenses can change; follow the linked project documentation when installing. Hardware recommendations, story examples, and workload arithmetic are this guide’s planning guidance.

  1. Wan2.2 official repository — models, requirements, and examples
  2. ComfyUI — Wan2.2 workflows, model placement, and offloading
  3. LTX Desktop — local Linux system requirements
  4. Ollama — Linux installation
  5. Qwen3 4B — Ollama model entry
  6. Ollama — structured outputs and JSON schemas
  7. LlamaFactory — training, evaluation, chat, and export WebUI
  8. Unsloth — fine-tuning for beginners
  9. Axolotl — first LoRA/QLoRA training workflow
  10. Hugging Face TRL — supervised fine-tuning trainer and dataset formats
  11. Hugging Face PEFT — parameter-efficient fine-tuning
  12. DeepSpeed — distributed training and memory optimization
  13. NVIDIA Megatron Core — large-scale training
  14. Hugging Face PEFT — quantization and QLoRA
  15. Ollama — importing supported model formats
  16. Ollama — Modelfile reference
  17. ComfyUI — manual Linux installation
  18. PyTorch — current local-installation selector
  19. LTX-2 — official audio/video inference repository
  20. ComfyUI — HTTP/WebSocket server routes
  21. Piper — local speech installation, voices, and CLI
  22. Kdenlive — official installation and Linux packages
  23. FFmpeg — official command-line documentation source
  24. FFmpeg — concat demuxer documentation source
  25. Ollama — tool calling and agent loops
  26. Qwen3-VL 4B — vision-language model and Ollama compatibility
  27. Ollama — image inputs and vision API examples
  28. faster-whisper — local speech recognition with Whisper models
  29. Transformers — CLAP audio/text model documentation
  30. Kokoro-82M — text-to-speech model card
  31. DeepSeek-R1 8B — local reasoning model
  32. Z3 — symbolic constraint solver and Python installation
  33. EmbeddingGemma — text embeddings for retrieval
  34. Ollama — generate embeddings endpoint
  35. LAION CLAP HTSAT unfused — audio model card

What this release verifies

The page, downloads, starter syntax, simulated API behavior, and shell-command syntax are checked in the authoring environment. Actual Linux installation, GPU inference, speech synthesis, fine-tuning, FFmpeg encoding, and production of a 20-minute movie have not been performed for this documentation release. Model-dependent steps require testing on your own machine.