[refactor]: decide every config value before the config freezes, and drop the from_pretrained keywords

VideoGenerator.from_pretrained(model_path, config) takes the same nested
settings as from_config; the 24 flat keywords, from_pretrained_kwargs_to_config,
FROM_PRETRAINED_KWARGS, and every flat_field in the schema are deleted.
nvfp4_fa4 is the typed field engine.attention.nvfp4_fa4, applied by a
resolution step. 65 call sites and the docs use the nested form; the three
kwargs golden cases are config cases with byte-identical results.

Every value is decided during resolution; no runtime code calls
with_override. The device offload policy (unified memory, MPS, layerwise
conflicts, lazy module load) runs as resolution steps in the main process
(fastvideo/api/device_policy.py), and the worker runs on the config it
receives. The LTX-2 refine defaults from model_index.json and the MiniMax-H3
schedule from fastvideo_inference.json are resolution steps
(fastvideo/api/checkpoint_defaults.py) that read local checkpoints or download
only those files; the H3 pipeline validates the schedule against the loaded
schedulers but no longer writes it. The preprocessing entry point passes the
downloaded local path as run state instead of a config override. Teacher and
critic models load with override_transformer_cls_name as a load argument.
The test isolation turns the device policy off, as it blocks downloads, so
that the goldens do not depend on the machine.

Against the 3f6893a0 goldens, every field still matches except boundary_ratio
and ltx2_vae_tiling (DESIGN section 9) and the fields that no longer exist.
The launcher and trainer YAML verifications report 0 unexplained differences.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Davids048
2026-10-04 07:14:31 +00:00
co-authored by Claude Fable 5.1
parent 0bcd15d5e2
commit a5aa64ab6b
261 changed files with 2955 additions and 1805 deletions
+1 -1
View File
@@ -177,7 +177,7 @@ from fastvideo import VideoGenerator
def main():
generator = VideoGenerator.from_pretrained(
"Wan-AI/Wan2.1-T2V-1.3B-Diffusers",
num_gpus=1,
{"engine": {"num_gpus": 1}},
)
prompt = ("A curious raccoon peers through a vibrant field of yellow sunflowers, its eyes "
+13 -7
View File
@@ -11,13 +11,19 @@ def main():
generator = VideoGenerator.from_pretrained(
"Wan-AI/Wan2.1-T2V-1.3B-Diffusers",
# FastVideo will automatically handle distributed setup
num_gpus=1,
use_fsdp_inference=False, # set to True if GPU is out of memory
dit_cpu_offload=False,
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
pin_cpu_memory=True, # set to false if low CPU RAM or hit obscure "CUDA error: Invalid argument"
# image_encoder_cpu_offload=False,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False, # set to True if GPU is out of memory
"offload": {
"dit": False,
"vae": False,
"text_encoder": True,
"pin_cpu_memory": True, # set to false if low CPU RAM or hit obscure "CUDA error: Invalid argument"
# "image_encoder": False,
},
},
},
)
# Generate videos with the same simple API, regardless of GPU count
@@ -8,12 +8,18 @@ def main():
generator = VideoGenerator.from_pretrained(
model_path,
num_gpus=1,
use_fsdp_inference=False, # set True if GPU is out of memory
dit_cpu_offload=False,
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
pin_cpu_memory=True,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False, # set True if GPU is out of memory
"offload": {
"dit": False,
"vae": False,
"text_encoder": True,
"pin_cpu_memory": True,
},
},
},
)
# image2world example from official repo
@@ -7,12 +7,18 @@ def main():
generator = VideoGenerator.from_pretrained(
model_path,
num_gpus=1,
use_fsdp_inference=False, # set True if GPU is out of memory
dit_cpu_offload=False,
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
pin_cpu_memory=True,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False, # set True if GPU is out of memory
"offload": {
"dit": False,
"vae": False,
"text_encoder": True,
"pin_cpu_memory": True,
},
},
},
)
prompt = (
@@ -8,12 +8,18 @@ def main():
generator = VideoGenerator.from_pretrained(
model_path,
num_gpus=1,
use_fsdp_inference=False, # set True if GPU is out of memory
dit_cpu_offload=False,
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
pin_cpu_memory=True,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False, # set True if GPU is out of memory
"offload": {
"dit": False,
"vae": False,
"text_encoder": True,
"pin_cpu_memory": True,
},
},
},
)
# video2world example from official repo
+12 -6
View File
@@ -56,12 +56,18 @@ def main():
# FastVideo will automatically download weights from HuggingFace
generator = VideoGenerator.from_pretrained(
MODEL_PATH,
num_gpus=1,
use_fsdp_inference=True,
dit_cpu_offload=True,
vae_cpu_offload=True,
text_encoder_cpu_offload=True,
pin_cpu_memory=True,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": True,
"offload": {
"dit": True,
"vae": True,
"text_encoder": True,
"pin_cpu_memory": True,
},
},
},
)
# Video parameters
+12 -6
View File
@@ -60,12 +60,18 @@ def main():
generator = VideoGenerator.from_pretrained(
args.model_path,
num_gpus=1,
use_fsdp_inference=False,
dit_cpu_offload=False,
vae_cpu_offload=True,
text_encoder_cpu_offload=True,
pin_cpu_memory=True,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False,
"offload": {
"dit": False,
"vae": True,
"text_encoder": True,
"pin_cpu_memory": True,
},
},
},
)
video = generator.generate({
+13 -7
View File
@@ -13,13 +13,19 @@ def main():
generator = VideoGenerator.from_pretrained(
"hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-480p_t2v",
# FastVideo will automatically handle distributed setup
num_gpus=1,
use_fsdp_inference=False, # set to True if GPU is out of memory
dit_cpu_offload=True,
vae_cpu_offload=True,
text_encoder_cpu_offload=True,
pin_cpu_memory=True, # set to false if low CPU RAM or hit obscure "CUDA error: Invalid argument"
# image_encoder_cpu_offload=False,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False, # set to True if GPU is out of memory
"offload": {
"dit": True,
"vae": True,
"text_encoder": True,
"pin_cpu_memory": True, # set to false if low CPU RAM or hit obscure "CUDA error: Invalid argument"
# "image_encoder": False,
},
},
},
)
prompt = ("A curious raccoon peers through a vibrant field of yellow sunflowers, its eyes "
+13 -7
View File
@@ -14,13 +14,19 @@ def main():
"weizhou03/HunyuanVideo-1.5-Diffusers-1080p-2SR", # 480p -> 720p -> 1080p
# or "weizhou03/HunyuanVideo-1.5-Diffusers-1080p" # 720p -> 1080p
# FastVideo will automatically handle distributed setup
num_gpus=1,
use_fsdp_inference=False, # set to True if GPU is out of memory
dit_cpu_offload=True,
vae_cpu_offload=True,
text_encoder_cpu_offload=True,
pin_cpu_memory=True, # set to false if low CPU RAM or hit obscure "CUDA error: Invalid argument"
# image_encoder_cpu_offload=False,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False, # set to True if GPU is out of memory
"offload": {
"dit": True,
"vae": True,
"text_encoder": True,
"pin_cpu_memory": True, # set to false if low CPU RAM or hit obscure "CUDA error: Invalid argument"
# "image_encoder": False,
},
},
},
)
prompt = ("A curious raccoon peers through a vibrant field of yellow sunflowers, its eyes "
+13 -7
View File
@@ -35,13 +35,19 @@ def main():
print("\nInitializing VideoGenerator for HYWorld...")
generator = VideoGenerator.from_pretrained(
"FastVideo/HY-WorldPlay-Bidirectional-Diffusers",
num_gpus=1,
use_fsdp_inference=True,
dit_cpu_offload=True,
vae_cpu_offload=True,
text_encoder_cpu_offload=True,
pin_cpu_memory=True,
image_encoder_cpu_offload=True,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": True,
"offload": {
"dit": True,
"vae": True,
"text_encoder": True,
"pin_cpu_memory": True,
"image_encoder": True,
},
},
},
)
# Generate video
@@ -10,13 +10,19 @@ def main():
"kandinskylab/Kandinsky-5.0-I2V-Pro-distilled-5s-Diffusers",
# "kandinskylab/Kandinsky-5.0-I2V-Pro-sft-5s-Diffusers"
# "kandinskylab/Kandinsky-5.0-I2V-Lite-5s-Diffusers"
num_gpus=1,
use_fsdp_inference=False,
dit_cpu_offload=False,
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
pin_cpu_memory=True,
# image_encoder_cpu_offload=False,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False,
"offload": {
"dit": False,
"vae": False,
"text_encoder": True,
"pin_cpu_memory": True,
# "image_encoder": False,
},
},
},
)
prompt = ("A woman stands up and walks away")
@@ -9,13 +9,19 @@ def main():
# "kandinskylab/Kandinsky-5.0-T2V-Pro-sft-5s-Diffusers"
# "kandinskylab/Kandinsky-5.0-T2V-Lite-distilled16steps-5s-Diffusers"
# "kandinskylab/Kandinsky-5.0-T2V-Pro-distilled-5s-Diffusers"
num_gpus=1,
use_fsdp_inference=False,
dit_cpu_offload=False,
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
pin_cpu_memory=True,
# image_encoder_cpu_offload=False,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False,
"offload": {
"dit": False,
"vae": False,
"text_encoder": True,
"pin_cpu_memory": True,
# "image_encoder": False,
},
},
},
)
prompt = ("A curious raccoon peers through a vibrant field of yellow sunflowers, its eyes "
@@ -29,11 +29,17 @@ def main() -> None:
args = parse_args()
generator = VideoGenerator.from_pretrained(
str(args.model_path),
num_gpus=1,
use_fsdp_inference=False,
text_encoder_cpu_offload=True,
vae_cpu_offload=False,
pin_cpu_memory=True,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False,
"offload": {
"text_encoder": True,
"vae": False,
"pin_cpu_memory": True,
},
},
},
)
try:
generator.generate({
@@ -13,14 +13,20 @@ def main():
generator = VideoGenerator.from_pretrained(
"FastVideo/LingBot-World-Base-Cam-Diffusers",
# FastVideo will automatically handle distributed setup
num_gpus=1,
use_fsdp_inference=False, # set to True if GPU is out of memory
dit_cpu_offload=True, # DiT need to be offloaded for MoE
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
# Set pin_cpu_memory to false if CPU RAM is limited and there're no frequent CPU-GPU transfer
pin_cpu_memory=True,
# image_encoder_cpu_offload=False,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False, # set to True if GPU is out of memory
"offload": {
"dit": True, # DiT need to be offloaded for MoE
"vae": False,
"text_encoder": True,
# Set pin_cpu_memory to false if CPU RAM is limited and there're no frequent CPU-GPU transfer
"pin_cpu_memory": True,
# "image_encoder": False,
},
},
},
)
num_frames = 81
+5 -1
View File
@@ -17,7 +17,11 @@ def main() -> None:
# Uses FastVideo default sampling settings for LTX2 base.
generator = VideoGenerator.from_pretrained(
"Davids048/LTX2-Base-Diffusers",
num_gpus=1,
{
"engine": {
"num_gpus": 1,
},
},
)
output_path = "outputs_video/ltx2_basic/output_ltx2_base_t2v_1088_1920_1.1.mp4"
@@ -19,7 +19,11 @@ os.environ["FASTVIDEO_ATTENTION_BACKEND"] = "FLASH_ATTN"
def main() -> None:
generator = VideoGenerator.from_pretrained(
"FastVideo/LTX2-Distilled-Diffusers",
num_gpus=4,
{
"engine": {
"num_gpus": 4,
},
},
)
output_path = "outputs_video/ltx2_basic/output_ltx2_distilled_t2v.mp4"
+12 -6
View File
@@ -6,12 +6,18 @@ OUTPUT_PATH = "video_samples_lucy_edit"
def main():
generator = VideoGenerator.from_pretrained(
"decart-ai/Lucy-Edit-Dev",
num_gpus=1,
use_fsdp_inference=False,
dit_cpu_offload=True,
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
pin_cpu_memory=True,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False,
"offload": {
"dit": True,
"vae": False,
"text_encoder": True,
"pin_cpu_memory": True,
},
},
},
)
prompt = ("Change the apron and blouse to a classic clown costume: satin "
+14 -8
View File
@@ -51,14 +51,20 @@ def main():
generator = VideoGenerator.from_pretrained(
config["model_path"],
# FastVideo will automatically handle distributed setup
num_gpus=1,
use_fsdp_inference=False, # set to True if GPU is out of memory
dit_cpu_offload=True, # DiT need to be offloaded for MoE
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
# Set pin_cpu_memory to false if CPU RAM is limited and there're no frequent CPU-GPU transfer
pin_cpu_memory=True,
# image_encoder_cpu_offload=False,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False, # set to True if GPU is out of memory
"offload": {
"dit": True, # DiT need to be offloaded for MoE
"vae": False,
"text_encoder": True,
# Set pin_cpu_memory to false if CPU RAM is limited and there're no frequent CPU-GPU transfer
"pin_cpu_memory": True,
# "image_encoder": False,
},
},
},
)
num_frames = 597
@@ -58,14 +58,20 @@ async def main():
generator = StreamingVideoGenerator.from_pretrained(
config["model_path"],
# FastVideo will automatically handle distributed setup
num_gpus=1,
use_fsdp_inference=False, # set to True if GPU is out of memory
dit_cpu_offload=True, # DiT need to be offloaded for MoE
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
# Set pin_cpu_memory to false if CPU RAM is limited and there're no frequent CPU-GPU transfer
pin_cpu_memory=True,
# image_encoder_cpu_offload=False,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False, # set to True if GPU is out of memory
"offload": {
"dit": True, # DiT need to be offloaded for MoE
"vae": False,
"text_encoder": True,
# Set pin_cpu_memory to false if CPU RAM is limited and there're no frequent CPU-GPU transfer
"pin_cpu_memory": True,
# "image_encoder": False,
},
},
},
)
max_blocks = 50
+12 -6
View File
@@ -9,12 +9,18 @@ OUTPUT_PATH = "video_samples_matrixgame3"
def main():
generator = VideoGenerator.from_pretrained(
MODEL_PATH,
num_gpus=1,
use_fsdp_inference=False,
dit_cpu_offload=False,
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
pin_cpu_memory=True,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False,
"offload": {
"dit": False,
"vae": False,
"text_encoder": True,
"pin_cpu_memory": True,
},
},
},
)
generator.generate({
+14 -8
View File
@@ -13,14 +13,20 @@ def main():
generator = VideoGenerator.from_pretrained(
"Wan-AI/Wan2.1-T2V-1.3B-Diffusers",
# FastVideo will automatically handle distributed setup
num_gpus=2,
use_fsdp_inference=True,
dit_cpu_offload=False,
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
pin_cpu_memory=True, # set to false if low CPU RAM or hit obscure "CUDA error: Invalid argument"
distributed_executor_backend="ray",
# image_encoder_cpu_offload=False,
{
"engine": {
"num_gpus": 2,
"use_fsdp_inference": True,
"offload": {
"dit": False,
"vae": False,
"text_encoder": True,
"pin_cpu_memory": True, # set to false if low CPU RAM or hit obscure "CUDA error: Invalid argument"
# "image_encoder": False,
},
"execution_backend": "ray",
},
},
)
# Generate videos with the same simple API, regardless of GPU count
@@ -14,10 +14,16 @@ def main():
generator = VideoGenerator.from_pretrained(
model_name,
# FastVideo will automatically handle distributed setup
num_gpus=1,
use_fsdp_inference=False, # set to True if GPU is out of memory
text_encoder_cpu_offload=False,
dit_cpu_offload=False,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False, # set to True if GPU is out of memory
"offload": {
"text_encoder": False,
"dit": False,
},
},
},
)
prompt = ("A curious raccoon peers through a vibrant field of yellow sunflowers, its eyes "
@@ -58,7 +58,11 @@ PROMPT = "Lo-fi hip hop instrumental with vinyl crackle and gentle piano."
def main() -> None:
generator = VideoGenerator.from_pretrained(
"FastVideo/stable-audio-open-1.0-Diffusers",
num_gpus=1,
{
"engine": {
"num_gpus": 1,
},
},
)
output_path = "outputs_audio/stable_audio_basic/output_stable_audio.wav"
generator.generate({
@@ -60,7 +60,11 @@ INIT_AUDIO_STRENGTH = 0.6
def main() -> None:
generator = VideoGenerator.from_pretrained(
"FastVideo/stable-audio-open-1.0-Diffusers",
num_gpus=1,
{
"engine": {
"num_gpus": 1,
},
},
)
generator.generate({
"prompt": PROMPT,
@@ -65,7 +65,11 @@ def main() -> None:
"m4a/flac) before running.")
generator = VideoGenerator.from_pretrained(
"FastVideo/stable-audio-open-1.0-Diffusers",
num_gpus=1,
{
"engine": {
"num_gpus": 1,
},
},
)
generator.generate({
"prompt": PROMPT,
@@ -35,7 +35,11 @@ PROMPT = "Lo-fi hip hop instrumental with vinyl crackle and gentle piano."
def main() -> None:
generator = VideoGenerator.from_pretrained(
"FastVideo/stable-audio-open-small-Diffusers",
num_gpus=1,
{
"engine": {
"num_gpus": 1,
},
},
)
output_path = "outputs_audio/stable_audio_small/output_stable_audio_small.wav"
generator.generate({
@@ -14,11 +14,16 @@ def main() -> None:
generator = VideoGenerator.from_pretrained(
"loayrashid/TurboWan2.1-T2V-1.3B-Diffusers",
# FastVideo will automatically handle distributed setup
num_gpus=1,
use_fsdp_inference=False, # set to True if GPU is out of memory
# set to false if using RTX 4090
# pin_cpu_memory=False,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False, # set to True if GPU is out of memory
"offload": {
# set to false if using RTX 4090
# "pin_cpu_memory": False,
},
},
},
)
# Generate videos with the same simple API, regardless of GPU count
@@ -14,7 +14,11 @@ def main() -> None:
generator = VideoGenerator.from_pretrained(
"loayrashid/TurboWan2.1-T2V-14B-Diffusers",
# 14B model needs more GPUs
num_gpus=2,
{
"engine": {
"num_gpus": 2,
},
},
)
prompt = ("A curious raccoon peers through a vibrant field of yellow sunflowers, its eyes "
@@ -14,7 +14,11 @@ def main() -> None:
# TurboDiffusion I2V: 1-4 step image-to-video generation
generator = VideoGenerator.from_pretrained(
MODEL_PATH,
num_gpus=2,
{
"engine": {
"num_gpus": 2,
},
},
)
# Example prompt and image for I2V
+14 -8
View File
@@ -11,14 +11,20 @@ def main():
generator = VideoGenerator.from_pretrained(
"Wan-AI/Wan2.2-T2V-A14B-Diffusers",
# FastVideo will automatically handle distributed setup
num_gpus=2,
use_fsdp_inference=False, # set to True if GPU is out of memory
dit_cpu_offload=True, # DiT need to be offloaded for MoE
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
# Set pin_cpu_memory to false if CPU RAM is limited and there're no frequent CPU-GPU transfer
pin_cpu_memory=True,
# image_encoder_cpu_offload=False,
{
"engine": {
"num_gpus": 2,
"use_fsdp_inference": False, # set to True if GPU is out of memory
"offload": {
"dit": True, # DiT need to be offloaded for MoE
"vae": False,
"text_encoder": True,
# Set pin_cpu_memory to false if CPU RAM is limited and there're no frequent CPU-GPU transfer
"pin_cpu_memory": True,
# "image_encoder": False,
},
},
},
)
# Generate videos with the same simple API, regardless of GPU count
+14 -8
View File
@@ -15,14 +15,20 @@ def main():
"IRMChen/Wan2.1-Fun-1.3B-Control-Diffusers",
# "alibaba-pai/Wan2.2-Fun-A14B-Control",
# FastVideo will automatically handle distributed setup
num_gpus=1,
use_fsdp_inference=False, # set to True if GPU is out of memory
dit_cpu_offload=True, # DiT need to be offloaded for MoE
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
# Set pin_cpu_memory to false if CPU RAM is limited and there're no frequent CPU-GPU transfer
pin_cpu_memory=True,
# image_encoder_cpu_offload=False,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False, # set to True if GPU is out of memory
"offload": {
"dit": True, # DiT need to be offloaded for MoE
"vae": False,
"text_encoder": True,
# Set pin_cpu_memory to false if CPU RAM is limited and there're no frequent CPU-GPU transfer
"pin_cpu_memory": True,
# "image_encoder": False,
},
},
},
)
prompt = "一位年轻女性穿着一件粉色的连衣裙,裙子上有白色的装饰和粉色的纽扣。她的头发是紫色的,头上戴着一个红色的大蝴蝶结,显得非常可爱和精致。她还戴着一个红色的领结,整体造型充满了少女感和活力。她的表情温柔,双手轻轻交叉放在身前,姿态优雅。背景是简单的灰色,没有任何多余的装饰,使得人物更加突出。她的妆容清淡自然,突显了她的清新气质。整体画面给人一种甜美、梦幻的感觉,仿佛置身于童话世界中。"
+14 -8
View File
@@ -13,14 +13,20 @@ def main():
generator = VideoGenerator.from_pretrained(
"Wan-AI/Wan2.2-I2V-A14B-Diffusers",
# FastVideo will automatically handle distributed setup
num_gpus=1,
use_fsdp_inference=False, # set to True if GPU is out of memory
dit_cpu_offload=True, # DiT need to be offloaded for MoE
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
# Set pin_cpu_memory to false if CPU RAM is limited and there're no frequent CPU-GPU transfer
pin_cpu_memory=True,
# image_encoder_cpu_offload=False,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False, # set to True if GPU is out of memory
"offload": {
"dit": True, # DiT need to be offloaded for MoE
"vae": False,
"text_encoder": True,
# Set pin_cpu_memory to false if CPU RAM is limited and there're no frequent CPU-GPU transfer
"pin_cpu_memory": True,
# "image_encoder": False,
},
},
},
)
prompt = "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with white clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's intricate details and the refreshing atmosphere of the seaside."
+13 -7
View File
@@ -12,13 +12,19 @@ def main():
generator = VideoGenerator.from_pretrained(
model_name,
# FastVideo will automatically handle distributed setup
num_gpus=1,
use_fsdp_inference=False, # set to True if GPU is out of memory
dit_cpu_offload=True,
vae_cpu_offload=False,
text_encoder_cpu_offload=True,
pin_cpu_memory=True, # set to false if low CPU RAM or hit obscure "CUDA error: Invalid argument"
# image_encoder_cpu_offload=False,
{
"engine": {
"num_gpus": 1,
"use_fsdp_inference": False, # set to True if GPU is out of memory
"offload": {
"dit": True,
"vae": False,
"text_encoder": True,
"pin_cpu_memory": True, # set to false if low CPU RAM or hit obscure "CUDA error: Invalid argument"
# "image_encoder": False,
},
},
},
)
# I2V is triggered just by passing in an image_path argument