Image-to-Video
Diffusers
Safetensors
MiniMax H3
Pika H3 Flex
video-generation
text-to-audio-video
reference-to-video
fastvideo
nvfp4
qad
Instructions to use FastVideo/Pika-H3-Flex-NVFP4-QAD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use FastVideo/Pika-H3-Flex-NVFP4-QAD 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("FastVideo/Pika-H3-Flex-NVFP4-QAD", dtype=torch.bfloat16, device_map="cuda") pipe.to("cuda") prompt = "A man with short gray hair plays a red electric guitar." image = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png" ) output = pipe(image=image, prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Pika H3 Flex
How to use FastVideo/Pika-H3-Flex-NVFP4-QAD 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("FastVideo/Pika-H3-Flex-NVFP4-QAD", workflow=workflow, components_manager=manager) pipe.load_components( pretrained_model_name_or_path="FastVideo/Pika-H3-Flex-NVFP4-QAD", 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("FastVideo/Pika-H3-Flex-NVFP4-QAD", 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"], ) - Notebooks
- Google Colab
- Kaggle
Add files using upload-large-folder tool
Browse files- text_encoder/model-00001-of-00004.safetensors +3 -0
- text_encoder/model-00002-of-00004.safetensors +3 -0
- transformer/diffusion_pytorch_model-00002-of-00006.safetensors +3 -0
- transformer/diffusion_pytorch_model-00003-of-00006.safetensors +3 -0
- transformer/diffusion_pytorch_model-00004-of-00006.safetensors +3 -0
- transformer/diffusion_pytorch_model-00005-of-00006.safetensors +3 -0
- transformer/diffusion_pytorch_model-00006-of-00006.safetensors +3 -0
- transformer/nvfp4_weights.safetensors +3 -0
- transformer_ref/diffusion_pytorch_model-00001-of-00006.safetensors +3 -0
- transformer_ref/diffusion_pytorch_model-00002-of-00006.safetensors +3 -0
- transformer_ref/diffusion_pytorch_model-00003-of-00006.safetensors +3 -0
- transformer_ref/diffusion_pytorch_model-00004-of-00006.safetensors +3 -0
- transformer_ref/diffusion_pytorch_model-00005-of-00006.safetensors +3 -0
- transformer_ref/diffusion_pytorch_model-00006-of-00006.safetensors +3 -0
- transformer_ref/nvfp4_weights.safetensors +3 -0
- vae/diffusion_pytorch_model-00001-of-00003.safetensors +3 -0
- vae/diffusion_pytorch_model-00002-of-00003.safetensors +3 -0
text_encoder/model-00001-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:969e7d251a873d16d3f487d9a5e82f8901132cfac9344530aa4e25ba9338e9e7
|
| 3 |
+
size 4290567132
|
text_encoder/model-00002-of-00004.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ff092cd64c489ce4609a08ba5d9f8548591bf835cd98fa4154a7eccd0ea16dfd
|
| 3 |
+
size 4270035088
|
transformer/diffusion_pytorch_model-00002-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:72298d28f2f96929982a02c4f47d7875b2a958858510035597813a3cf42fae4c
|
| 3 |
+
size 5204410056
|
transformer/diffusion_pytorch_model-00003-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b78e321f85882b8c4cab1a2315206a2c319fdd94b5d69709119ba69534605dbc
|
| 3 |
+
size 5204410048
|
transformer/diffusion_pytorch_model-00004-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87dfc5baceb4be94bc069c0668f15933577d96c8257d02fc7f7fbcfe39f3fd12
|
| 3 |
+
size 5204410048
|
transformer/diffusion_pytorch_model-00005-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2b6ea3ec7c1d847ed697a1d9b155af92c69a04aa2d467340123beddde2728ec7
|
| 3 |
+
size 5030615552
|
transformer/diffusion_pytorch_model-00006-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:07839ec185182ed77575762b0ce08eca9068de08017a0b6b8f92f259e497ee7c
|
| 3 |
+
size 1715441360
|
transformer/nvfp4_weights.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:08798bbcf5d716a7f1e8409a55eb09389b43778c3bde3d90dab18c03cf9d045f
|
| 3 |
+
size 10838167104
|
transformer_ref/diffusion_pytorch_model-00001-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a42c2efa8daecc9fc5ba2c267488c5db414b49acab03958479989c9a548ec287
|
| 3 |
+
size 5386013312
|
transformer_ref/diffusion_pytorch_model-00002-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e8edcf1766ebe6a40964d2ba851542068f62d86a9bc214660bdedc1093d2bec9
|
| 3 |
+
size 5204410056
|
transformer_ref/diffusion_pytorch_model-00003-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:08e68b09a491d9595b841faac53c0c6d4f6f033080c847a14dd5ed412fb546eb
|
| 3 |
+
size 5204410048
|
transformer_ref/diffusion_pytorch_model-00004-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fcf3d720d29e83e0b0a764fe7d6a347c997bea1a1bc663d5d4fbf3213094dae5
|
| 3 |
+
size 5204410048
|
transformer_ref/diffusion_pytorch_model-00005-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:473fe94602edada3ee3b7d8fa0707631689f3f4a8c14a787d65d4ff1fa7fd3fe
|
| 3 |
+
size 5030615552
|
transformer_ref/diffusion_pytorch_model-00006-of-00006.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f6f0c3ff0966d528d1f4c04004843fe369f6aad0e910b88e00c02cfafa43a327
|
| 3 |
+
size 1715441360
|
transformer_ref/nvfp4_weights.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0a48be8ed8072fca16a1fb6ae4c177d3348a1459ff3448c4da0c6663f1fc484e
|
| 3 |
+
size 10838167104
|
vae/diffusion_pytorch_model-00001-of-00003.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:72f4c6be84ac0674f27398cde991dd9d719762f3952c4921aa66b2ce542f6374
|
| 3 |
+
size 5061033024
|
vae/diffusion_pytorch_model-00002-of-00003.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2e05e8bc23fa4071043e17fd242be8acd0685e781a43987432b2eae925be4198
|
| 3 |
+
size 4955986528
|