Skip to content
← All guides

H3 FLEX · OPEN WEIGHTS / 9 MIN READ / UPDATED

Run Pika H3 Flex Locally from GitHub: Requirements, Install and Commands

What you need to run the open Pika H3 Flex weights from GitHub: GPU memory, disk space, install steps, the five CLI tasks, limits, and when the Pika web app is the better choice.

Pika-Labs/Pika-H3-Flex GitHub repository file list

You can run Pika H3 Flex on your own machine, but the public package is built for data-centre GPUs. The Pika-H3-Flex GitHub repository documents its tests on one NVIDIA H100 with 80 GB of memory, and the model files take about 216 GB of disk.

This guide turns the repository’s README and documentation into a practical checklist. It covers the hardware, the install routes, the five generation commands, the input limits and the features that stay on Pika’s hosted service. It describes the published package; it is not a benchmark from our own GPU.

If you do not have that kind of GPU, the Pika web app runs the same model family in a browser, and our multi-shot recipes show what it produces.

Pika-Labs/Pika-H3-Flex repository with docs, examples/prompts, src/pika_h3 and tools folders
The repository holds the inference code, prompt examples and documentation. The model weights come separately from Hugging Face. Open the image for full size.

What is in the repository?

H3 Flex is Pika’s post-trained version of MiniMax-H3. The repository ships an inference package and two adapters that load on top of the MiniMax-H3 base model:

  • FL2VA handles text-only prompts and first or last frames.
  • Ref2VA handles image, video and audio references.

Both generate video with synchronized stereo sound in six sampling steps. The package fetches the pinned base model and the adapter you choose, checks their hashes, and writes an MP4 with a JSON file of generation details.

Useful files in the repo:

  • README.md: specifications, install, commands and limits.
  • docs/prompt-guidance.md: the field-based prompt format. We tested it in the web app in our GitHub prompt format guide.
  • docs/hardware.md: tested configurations and memory figures.
  • docs/showcases.md: six example clips with their prompts and inputs.
  • examples/prompts/: one ready prompt file for each task.
  • release.json: the exact model and base revisions the package expects.

Check your hardware first

Requirement What the repository states
GPU NVIDIA GPU with a compatible driver; representative cases tested on one H100 80GB
Untested GPUs H200 and B300 not yet qualified; an AMD MI350X port lives on a separate contributor branch
GPUs per request One. Extra GPUs can run separate requests but do not speed up a single one
GPU memory, 480p · 5s About 66–69 GiB during sampling with default settings
GPU memory, 768p · 15s Exceeds H100 memory by default; about 29–32 GiB with --cpu-offload
System memory with offload About 94 GiB observed, including page cache
Disk At least 211 GB for base files plus about 5.5 GB for both adapters, plus room for dependencies
Python 3.12

The memory figures cover the sampling stage only. The text encoder and video decoders need their own memory, so treat these numbers as a floor rather than a minimum specification. A typical consumer graphics card does not reach the tested memory level.

Install the package

The command and the Python distribution are both called pika-h3-pro. Start by cloning the repository:

git clone https://github.com/Pika-Labs/Pika-H3-Flex.git
cd Pika-H3-Flex
README section listing hosted extensions for 1080p to 4K, audio stems and prompt enhancement, followed by the Install instructions
The README lists the hosted-only extensions just above the install steps. Open the image for full size.

Then choose one of three routes.

Pip

Install git, patch, ffmpeg and a C compiler with development headers first. On Debian or Ubuntu, that compiler comes from build-essential. Triton needs it at run time.

python -m pip install -r requirements.txt
python tools/apply_diffusers_patches.py
python -m pip install --no-deps -e .
pika-h3-pro --help

Conda

conda env create -f environment.yml
conda activate pika-h3-pro
python tools/apply_diffusers_patches.py
python -m pip install --no-deps -e .

Docker

docker build -t pika-h3-pro .
docker run --rm --gpus 'device=0' pika-h3-pro --help

All three routes share the same requirements.txt. If fetching the files needs Hugging Face authentication, pass HF_TOKEN when the container runs. Never bake a token into an image.

Generate your first clip

Pin the release from release.json, then run the bundled text example at the smallest tested size:

export MODEL_REPO=Pika-Labs/Pika-H3-Flex
export MODEL_REVISION=0ddf55ad7067ca1e76812253bd7b4600df87f759
pika-h3-pro --task t2va --prompt-file examples/prompts/t2va.txt \
  --model-repo "$MODEL_REPO" --revision "$MODEL_REVISION" \
  --resolution 480p --aspect 16:9 --duration 5 --seed 42 \
  --output outputs/sample.mp4

The first run fetches the base model and adapter, so expect a long wait before sampling begins. The repository recommends qualifying your machine at 480p and 5 seconds before trying longer clips.

Choose a task

README table mapping text, first-frame, last-frame, first-and-last-frame and multimodal reference modes to t2va, i2va, l2va, fl2va and ref2va
Each mode maps to one adapter and one CLI task name. Open the image for full size.
You want Task Add these options Web app equivalent
Text to video and sound t2va --prompt-file Omni Reference, no attachments
Animate an opening image i2va --first-image first.png Frames, first frame
Arrive at an ending image l2va --last-image last.png Frames, last frame
Connect two images fl2va --first-image and --last-image Frames, both slots
Use references ref2va --ref image:subject.png, --ref video:clip.mp4, --ref audio:sound.wav Omni Reference with attachments

A reference request looks like this:

pika-h3-pro --task ref2va --prompt-file examples/prompts/ref2va.txt \
  --ref image:subject.png --model-repo "$MODEL_REPO" --revision "$MODEL_REVISION" \
  --resolution 480p --duration 5 --output outputs/reference.mp4

Repeat --ref for each file. The order you pass them sets the labels: the first image is Picture 1, the first video is Video 1. A video with sound also takes an audio label, which shifts the numbering of any separate audio file.

Run a 15-second clip at 768p

The repo’s tested long configuration adds CPU offload:

pika-h3-pro --model-repo "$MODEL_REPO" --revision "$MODEL_REVISION" \
  --task t2va --prompt-file examples/prompts/t2va.txt --resolution 768p \
  --duration 15 --seed 42 --cpu-offload --output outputs/long-768p.mp4

Offload keeps the main model weights in system memory and streams blocks to the GPU. It lowers GPU memory during sampling at the cost of extra time and a large amount of system memory.

Know the limits before you plan a project

  • Resolution: native 480p or 768p only, in 11 aspect ratios from 21:9 to 9:21.
  • Duration: whole seconds from 5 to 15. Clips land on a frame grid, so 5 seconds becomes 124 frames (about 5.17 s) and 15 seconds becomes 362 frames (about 15.08 s).
  • Output: 24 fps H.264 video with 32 kHz stereo AAC sound mixed in.
  • Prompt: 1 to 8,000 characters, read exactly as written. No rewriting service runs locally.
  • References: up to 9 images, 3 videos and 3 separate audio clips, 12 files in total. Include at least one image or video. Each video or audio clip must last 2–15 seconds, and each type may total no more than 15 seconds.

The repository notes that maximum reference counts have not been confirmed to fit in GPU memory. Mixed image, video and audio input has passed only at 480p and 5 seconds.

What stays on Pika’s hosted service

Three features are not in the open package. The README lists them as separate hosted endpoints:

In the Pika web app, these appear as the Render menu, the Split Audio Stems switch and AI Enhance. Our multi-shot guide shows a 4K finish and a set of stems from a 15-second draft.

Same seed, different result?

Both adapters use a fixed six-step schedule, and the JSON file records the seed, prompt and settings of every run. Even so, the repository warns that output can differ across GPUs, attention kernels, library versions and offload modes. Keep your environment pinned if you need to reproduce a shot.

The showcase clips are creative examples. Their seeds and service settings are unspecified, so do not expect the package to recreate them frame for frame.

Check the licence

The inference code is released under Apache-2.0. The adapters are derivatives of MiniMax-H3 and follow the MiniMax H3 Community License Agreement, which the repository includes in its licenses folder. Read it before you use local outputs in a product. Pika also asks for a credit and a citation of its technical write-up when the adapters are used in research or products.

Local package, web app or API?

Route Best for You need
Local package Research, private data, custom pipelines An 80 GB-class NVIDIA GPU, about 216 GB of disk, Python 3.12
Pika web app Making and reviewing clips by hand, 4K finishing, stems A Pika account and credits
Pika API Automated batches inside your own product An API account and server-side key handling
ComfyUI Node-based local workflows The official templates and about 42 GB of model files; follow our ComfyUI setup guide

Whichever route you pick, start with one five-second clip, inspect the file, and only then scale up to longer clips or batches.

Frequently asked questions

Can I run Pika H3 Flex on a consumer graphics card?

The repository documents tests on one H100 80GB, and default 480p sampling used about 66–69 GiB of GPU memory. It does not qualify consumer cards, so plan for a data-centre GPU or use the hosted service.

How much disk space does Pika H3 Flex need?

About 211 GB for the base model files plus about 5.5 GB for both adapters. Add space for Python packages and temporary files.

Can the local package make 4K video?

No. Local generation is native 480p or 768p. The 1080p, 2K and 4K finishing step is a separate Pika-hosted service.

Does the local package create separate audio stems?

No. Local output has one mixed stereo soundtrack. Separate stems come from Pika’s hosted audio-stems service or the Split Audio Stems switch in the web app.

Is Pika H3 Flex open source?

The inference code is Apache-2.0. The model adapters follow the MiniMax H3 Community License Agreement, so check its terms before commercial use.

YOUR NEXT STEP

Put it into practice.

Learn Pika H3 Flex in the web appUse the GitHub prompt format in PikaCopy five multi-shot recipesExplore the Pika API Club