Instructions to use Pika-Labs/Pika-H3-Flex with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Pika H3 Flex
How to use Pika-Labs/Pika-H3-Flex with Pika H3 Flex:
# pip install -r examples/requirements-diffusers.txt (see the examples/ folder of this repo) import torch from diffusers import ComponentsManager, ModularPipeline from diffusers.utils.export_utils import encode_video from PIL import Image workflow = "fl2va" # "fl2va" (first-frame to video+audio) or "ref2va" (reference images/video to video+audio) manager = ComponentsManager() manager.enable_auto_cpu_offload(device="cuda:0") pipe = ModularPipeline.from_pretrained("Pika-Labs/Pika-H3-Flex", workflow=workflow, components_manager=manager) pipe.load_components( pretrained_model_name_or_path="Pika-Labs/Pika-H3-Flex", dtype={"vae": torch.float32, "audio_vae": torch.float32, "default": torch.bfloat16}, ) # The bundled base components are not Pika-adapted weights: load the matching adapter. pipe.load_lora_weights("Pika-Labs/Pika-H3-Flex", weight_name=f"{workflow}/adapter.safetensors") result = pipe( prompt="A cat walks through a sunlit cafe and jumps onto the counter", image=Image.open("first_frame.png").convert("RGB"), height=480, width=832, num_frames=121, generator=torch.Generator("cuda:0").manual_seed(0), output=["videos", "audio", "sampling_rate"], ) encode_video( result["videos"][0], fps=24, output_path="output.mp4", audio=result["audio"][0].float().cpu(), audio_sample_rate=result["sampling_rate"], ) - Diffusers
How to use Pika-Labs/Pika-H3-Flex with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image, export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("MiniMaxAI/MiniMax-H3", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("Pika-Labs/Pika-H3-Flex") prompt = "Image 1 is the exact two players, outfits, frog mask, table-tennis table and drained pool: keep them exactly as in Image 1.\nA fast table-tennis rally, shot with exactly these camera moves:\n00:00–00:03 — top-down from directly overhead, as in Image 1, as the rally begins and the ball flicks back and forth.\n00:03–00:06 — a smooth crane straight down from overhead to table height, ending right beside the net as the ball zips across.\n00:06–00:09 — fast whip pans left and right following the ball across the net, from one player to the other.\n00:09–00:12 — a 180-degree orbit around the frog-masked player as she leaps and smashes the ball.\n00:12–00:15 — a low-angle dolly backward along the pool floor as the woman in the red tracksuit dives and misses; the frog raises both arms and does a little victory dance; the camera settles and holds.\nThe players, table and pool stay consistent and in the same place throughout. Photoreal 35mm film look, true colour, light natural grain, matching Image 1. SPEED IS CRITICAL: everything moves at normal real-time speed, like 24fps footage played back at 24fps - natural motion, NO slow motion.\nSound: the quick tock-tock of the ball, sneakers squeaking on concrete, the smash, a thud as she dives, echo in the empty pool, the frog's muffled cheer. Music: a funky, upbeat drum-and-bass groove." input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png") output = pipe(image=input_image, prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Inference
- Notebooks
- Google Colab
- Kaggle
Request: Any plans to release full / standalone merged weights for Ref2VA?
Hi Pika team,
First off, thank you for open-sourcing Pika H3 Flex—the 6-step distillation and Ref2VA quality are awesome to see in the open-source ecosystem!
I wanted to ask if there are any plans to release full standalone weights (or a pre-merged BF16 checkpoint) for Ref2VA, in addition to the rank-128 LoRA adapters currently provided for ComfyUI.
Having full / pre-merged weights would be super helpful for the community for a few reasons:
Cleaner Quantisation: Loading a rank-128 BF16 LoRA on top of an already quantised base model (like INT8 / FP8 / GGUF MiniMax H3) can introduce extra precision loss and runtime overhead. Having full weights—or merging in full BF16 precision before quantising—allows the community to produce much higher-quality FP8, INT8, and GGUF builds.
Broader Compatibility & Simpler Workflows: Standalone checkpoints are much easier to integrate across different ComfyUI setups, custom inference backends, and downstream pipelines without needing extra LoRA patching logic at runtime.
Clarification on Training: If the model was originally full fine-tuned and then distilled/extracted into a rank-128 LoRA, releasing the original un-truncated full weights would also be great for users who have the VRAM/compute to run it at maximum fidelity.
Totally understand if keeping the download size lightweight (or licensing around the base weights) is the reason for shipping LoRAs only, so even just clarifying whether full weights are possible or planned would be really appreciated.
Thanks again for the great release!
We're all wondering the same thing.