From f5338a4aa754940a3663a3fbaf200bf721046144 Mon Sep 17 00:00:00 2001 From: bubbliiiing <3323290568@qq.com> Date: Sun, 27 Sep 2026 15:27:00 +0800 Subject: [PATCH] Update comments --- examples/cogvideox_fun/predict_i2v.py | 6 +++--- examples/cogvideox_fun/predict_t2v.py | 6 +++--- examples/cogvideox_fun/predict_v2v.py | 6 +++--- examples/cogvideox_fun/predict_v2v_control.py | 6 +++--- examples/ernie_image/predict_t2i.py | 6 +++--- examples/fantasytalking/predict_s2v.py | 6 +++--- examples/flashhead/predict_s2v.py | 6 +++--- examples/flux/predict_t2i.py | 6 +++--- examples/flux2/predict_t2i.py | 6 +++--- examples/flux2_fun/predict_i2i_inpaint.py | 6 +++--- examples/flux2_fun/predict_t2i_control.py | 6 +++--- examples/flux2_fun/predict_t2i_control_ref.py | 6 +++--- examples/hunyuanvideo/predict_i2v.py | 6 +++--- examples/hunyuanvideo/predict_t2v.py | 6 +++--- examples/infinitetalk/predict_s2v.py | 6 +++--- examples/lens/predict_t2i.py | 6 +++--- examples/lingbot_video/predict_i2v.py | 4 ++-- examples/lingbot_video/predict_t2v.py | 4 ++-- examples/lingbot_video/predict_t2v_refine.py | 4 ++-- examples/lingbot_world/predict_i2v.py | 4 ++-- examples/lingbot_world/predict_i2v_fast.py | 4 ++-- examples/longcatvideo/predict_i2v.py | 6 +++--- examples/longcatvideo/predict_s2v_avatar.py | 6 +++--- examples/longcatvideo/predict_t2v.py | 6 +++--- examples/ltx2.3/predict_i2v.py | 4 ++-- examples/ltx2.3/predict_t2v.py | 4 ++-- examples/ltx2/predict_i2v.py | 4 ++-- examples/ltx2/predict_i2v_upsample.py | 4 ++-- examples/ltx2/predict_t2v.py | 4 ++-- examples/minimax_h3/predict_i2v.py | 2 +- examples/minimax_h3_fun/predict_v2v_control.py | 2 +- examples/minimax_h3_fun/predict_v2v_control_inpaint.py | 2 +- examples/mova/predict_i2v.py | 2 +- examples/phantom/predict_s2v.py | 4 ++-- examples/qwenimage/predict_i2i_layered.py | 6 +++--- examples/qwenimage/predict_t2i.py | 6 +++--- examples/qwenimage/predict_t2i_edit.py | 6 +++--- examples/qwenimage/predict_t2i_edit_plus.py | 6 +++--- examples/qwenimage_fun/predict_i2i_inpaint.py | 6 +++--- examples/qwenimage_fun/predict_t2i_control.py | 6 +++--- examples/qwenimage_instantx/predict_t2i_control.py | 6 +++--- examples/turbodiffusion/predict_i2v_wan2.2.py | 4 ++-- examples/turbodiffusion/predict_t2v_wan2.1.py | 4 ++-- examples/wan2.1/predict_i2v.py | 4 ++-- examples/wan2.1/predict_i2v_tae.py | 4 ++-- examples/wan2.1/predict_t2v.py | 4 ++-- examples/wan2.1/predict_t2v_tae.py | 4 ++-- examples/wan2.1_causal_forcing/predict_t2v.py | 2 +- examples/wan2.1_causal_forcing/predict_t2v_stream.py | 2 +- examples/wan2.1_flex_forcing/predict_t2v.py | 2 +- examples/wan2.1_flex_forcing/predict_t2v_edit.py | 2 +- examples/wan2.1_fun/predict_i2v.py | 4 ++-- examples/wan2.1_fun/predict_t2v.py | 4 ++-- examples/wan2.1_fun/predict_v2v_control.py | 4 ++-- examples/wan2.1_fun/predict_v2v_control_camera.py | 4 ++-- examples/wan2.1_fun/predict_v2v_control_ref.py | 4 ++-- examples/wan2.1_self_forcing/predict_t2v.py | 4 ++-- examples/wan2.1_self_forcing/predict_t2v_forcing_kv.py | 4 ++-- examples/wan2.1_self_forcing/predict_t2v_stream.py | 4 ++-- examples/wan2.1_vace/predict_i2v.py | 4 ++-- examples/wan2.1_vace/predict_s2v.py | 4 ++-- examples/wan2.1_vace/predict_v2v_control.py | 4 ++-- examples/wan2.2/predict_animate.py | 4 ++-- examples/wan2.2/predict_i2v.py | 4 ++-- examples/wan2.2/predict_s2v.py | 4 ++-- examples/wan2.2/predict_t2v.py | 4 ++-- examples/wan2.2/predict_ti2v.py | 4 ++-- examples/wan2.2/predict_ti2v_tae.py | 4 ++-- examples/wan2.2_fun/predict_i2v.py | 4 ++-- examples/wan2.2_fun/predict_i2v_2.2vae.py | 4 ++-- examples/wan2.2_fun/predict_i2v_2.2vae_tae.py | 4 ++-- examples/wan2.2_fun/predict_i2v_5b.py | 4 ++-- examples/wan2.2_fun/predict_t2v.py | 4 ++-- examples/wan2.2_fun/predict_t2v_2.2vae.py | 4 ++-- examples/wan2.2_fun/predict_t2v_2.2vae_tae.py | 4 ++-- examples/wan2.2_fun/predict_t2v_5b.py | 4 ++-- examples/wan2.2_fun/predict_v2v_control.py | 4 ++-- examples/wan2.2_fun/predict_v2v_control_5b.py | 4 ++-- examples/wan2.2_fun/predict_v2v_control_camera.py | 4 ++-- examples/wan2.2_fun/predict_v2v_control_camera_5b.py | 4 ++-- examples/wan2.2_fun/predict_v2v_control_ref.py | 4 ++-- examples/wan2.2_fun/predict_v2v_control_ref_5b.py | 4 ++-- examples/wan2.2_vace_fun/predict_i2v.py | 4 ++-- examples/wan2.2_vace_fun/predict_s2v.py | 4 ++-- examples/wan2.2_vace_fun/predict_v2v_control.py | 4 ++-- examples/wan2.2_vace_fun/predict_v2v_control_ref.py | 4 ++-- examples/wan2.2_vace_fun/predict_v2v_mask.py | 4 ++-- examples/z_image/predict_t2i.py | 6 +++--- examples/z_image/predict_turbo_t2i.py | 6 +++--- examples/z_image_fun/predict_i2i_inpaint_2.1.py | 6 +++--- examples/z_image_fun/predict_i2i_inpaint_2.1_lite.py | 6 +++--- examples/z_image_fun/predict_i2i_tile_2.1.py | 6 +++--- examples/z_image_fun/predict_i2i_tile_2.1_lite.py | 6 +++--- examples/z_image_fun/predict_t2i_control_2.1.py | 6 +++--- examples/z_image_fun/predict_t2i_control_2.1_lite.py | 6 +++--- examples/z_image_fun/predict_turbo_i2i_inpaint_2.0.py | 6 +++--- examples/z_image_fun/predict_turbo_i2i_inpaint_2.1.py | 6 +++--- examples/z_image_fun/predict_turbo_i2i_inpaint_2.1_lite.py | 6 +++--- examples/z_image_fun/predict_turbo_i2i_tile_2.1.py | 6 +++--- examples/z_image_fun/predict_turbo_i2i_tile_2.1_lite.py | 6 +++--- examples/z_image_fun/predict_turbo_t2i_control.py | 6 +++--- examples/z_image_fun/predict_turbo_t2i_control_2.0.py | 6 +++--- examples/z_image_fun/predict_turbo_t2i_control_2.1.py | 6 +++--- examples/z_image_fun/predict_turbo_t2i_control_2.1_lite.py | 6 +++--- 104 files changed, 243 insertions(+), 243 deletions(-) diff --git a/examples/cogvideox_fun/predict_i2v.py b/examples/cogvideox_fun/predict_i2v.py index 92a62a7..4dcee56 100755 --- a/examples/cogvideox_fun/predict_i2v.py +++ b/examples/cogvideox_fun/predict_i2v.py @@ -23,7 +23,7 @@ from videox_fun.pipeline import (CogVideoXFunInpaintPipeline, from videox_fun.utils import (apply_gpu_memory_mode, get_image_to_video_latent, merge_lora, save_videos_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -76,7 +76,7 @@ partial_video_length = None overlap_video_length = 4 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" @@ -139,7 +139,7 @@ text_encoder = T5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Euler": EulerDiscreteScheduler, "Euler A": EulerAncestralDiscreteScheduler, "DPM++": DPMSolverMultistepScheduler, diff --git a/examples/cogvideox_fun/predict_t2v.py b/examples/cogvideox_fun/predict_t2v.py index 2af2c9e..cb86011 100755 --- a/examples/cogvideox_fun/predict_t2v.py +++ b/examples/cogvideox_fun/predict_t2v.py @@ -24,7 +24,7 @@ from videox_fun.pipeline import (CogVideoXFunInpaintPipeline, from videox_fun.utils import (apply_gpu_memory_mode, get_image_to_video_latent, merge_lora, save_videos_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -73,7 +73,7 @@ video_length = 49 fps = 8 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompt = "A young woman with beautiful and clear eyes and blonde hair standing and white dress in a forest wearing a crown. She seems to be lost in thought, and the camera focuses on her face. The video is of high quality, and the view is very clear. High quality, masterpiece, best quality, highres, ultra-detailed, fantastic." negative_prompt = "The video is not of a high quality, it has a low resolution. Watermark present in each frame. The background is solid. Strange body and strange trajectory. Distortion. " @@ -131,7 +131,7 @@ text_encoder = T5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Euler": EulerDiscreteScheduler, "Euler A": EulerAncestralDiscreteScheduler, "DPM++": DPMSolverMultistepScheduler, diff --git a/examples/cogvideox_fun/predict_v2v.py b/examples/cogvideox_fun/predict_v2v.py index 2e96f51..29b19ee 100755 --- a/examples/cogvideox_fun/predict_v2v.py +++ b/examples/cogvideox_fun/predict_v2v.py @@ -23,7 +23,7 @@ from videox_fun.pipeline import (CogVideoXFunInpaintPipeline, from videox_fun.utils import (apply_gpu_memory_mode, get_video_to_video_latent, merge_lora, save_videos_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -71,7 +71,7 @@ video_length = 49 fps = 8 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you are preparing to redraw the reference video, set validation_video and validation_video_mask. # If you do not use validation_video_mask, the entire video will be redrawn; @@ -138,7 +138,7 @@ text_encoder = T5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Euler": EulerDiscreteScheduler, "Euler A": EulerAncestralDiscreteScheduler, "DPM++": DPMSolverMultistepScheduler, diff --git a/examples/cogvideox_fun/predict_v2v_control.py b/examples/cogvideox_fun/predict_v2v_control.py index 3eb9be6..b063f18 100755 --- a/examples/cogvideox_fun/predict_v2v_control.py +++ b/examples/cogvideox_fun/predict_v2v_control.py @@ -23,7 +23,7 @@ from videox_fun.pipeline import CogVideoXFunControlPipeline from videox_fun.utils import (apply_gpu_memory_mode, get_video_to_video_latent, merge_lora, save_videos_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -71,7 +71,7 @@ video_length = 49 fps = 8 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = "asset/pose.mp4" @@ -132,7 +132,7 @@ text_encoder = T5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Euler": EulerDiscreteScheduler, "Euler A": EulerAncestralDiscreteScheduler, "DPM++": DPMSolverMultistepScheduler, diff --git a/examples/ernie_image/predict_t2i.py b/examples/ernie_image/predict_t2i.py index 30ba6b0..6c5ad07 100644 --- a/examples/ernie_image/predict_t2i.py +++ b/examples/ernie_image/predict_t2i.py @@ -17,7 +17,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, FlowUniPCMultistepScheduler, apply_gpu_memory_mode, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -62,7 +62,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompt = "1girl, black_hair, brown_eyes, earrings, freckles, grey_background, jewelry, lips, long_hair, looking_at_viewer, nose, piercing, realistic, red_lips, solo, upper_body" negative_prompt = "低分辨率,低画质,肢体畸形,手指畸形,画面过饱和,蜡像感,人脸无细节,过度光滑,画面具有AI感。构图混乱。文字模糊,扭曲。" @@ -120,7 +120,7 @@ text_encoder = Mistral3Model.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/fantasytalking/predict_s2v.py b/examples/fantasytalking/predict_s2v.py index bb582a1..1dc7f2f 100644 --- a/examples/fantasytalking/predict_s2v.py +++ b/examples/fantasytalking/predict_s2v.py @@ -27,7 +27,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, merge_video_audio, save_videos_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -106,7 +106,7 @@ video_length = 81 fps = 23 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None validation_image_start = "asset/8.png" @@ -201,7 +201,7 @@ audio_encoder_path = model_name_audio if model_name_audio is not None else os.pa audio_encoder = FantasyTalkingAudioEncoder(audio_encoder_path) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/flashhead/predict_s2v.py b/examples/flashhead/predict_s2v.py index 8e53e53..3231c11 100644 --- a/examples/flashhead/predict_s2v.py +++ b/examples/flashhead/predict_s2v.py @@ -22,7 +22,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, get_image_latent, merge_lora, merge_video_audio, save_videos_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -71,7 +71,7 @@ segment_frame_length = 33 fps = 25 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # The path of the reference image ref_image = "asset/9.png" @@ -140,7 +140,7 @@ audio_encoder = FlashHeadAudioEncoder( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/flux/predict_t2i.py b/examples/flux/predict_t2i.py index 7b0359a..32657e7 100644 --- a/examples/flux/predict_t2i.py +++ b/examples/flux/predict_t2i.py @@ -18,7 +18,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, FlowUniPCMultistepScheduler, apply_gpu_memory_mode, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -63,7 +63,7 @@ lora_path = None sample_size = [1344, 768] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompt = "1girl, black_hair, brown_eyes, earrings, freckles, grey_background, jewelry, lips, long_hair, looking_at_viewer, nose, piercing, realistic, red_lips, solo, upper_body" negative_prompt = " " @@ -128,7 +128,7 @@ text_encoder_2 = T5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/flux2/predict_t2i.py b/examples/flux2/predict_t2i.py index 35cf531..f4be58e 100644 --- a/examples/flux2/predict_t2i.py +++ b/examples/flux2/predict_t2i.py @@ -18,7 +18,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, FlowUniPCMultistepScheduler, apply_gpu_memory_mode, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -63,7 +63,7 @@ lora_path = None sample_size = [1344, 768] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # Please use as detailed a prompt as possible to describe the object that needs to be generated. prompt = "1girl, black_hair, brown_eyes, earrings, freckles, grey_background, jewelry, lips, long_hair, looking_at_viewer, nose, piercing, realistic, red_lips, solo, upper_body" @@ -123,7 +123,7 @@ text_encoder = Mistral3ForConditionalGeneration.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/flux2_fun/predict_i2i_inpaint.py b/examples/flux2_fun/predict_i2i_inpaint.py index 4a85a7e..b97fd3b 100644 --- a/examples/flux2_fun/predict_i2i_inpaint.py +++ b/examples/flux2_fun/predict_i2i_inpaint.py @@ -21,7 +21,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -68,7 +68,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 image = None control_image = None @@ -136,7 +136,7 @@ text_encoder = Mistral3ForConditionalGeneration.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/flux2_fun/predict_t2i_control.py b/examples/flux2_fun/predict_t2i_control.py index 6413a6b..d522ae1 100644 --- a/examples/flux2_fun/predict_t2i_control.py +++ b/examples/flux2_fun/predict_t2i_control.py @@ -21,7 +21,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -68,7 +68,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 image = None control_image = "asset/pose.jpg" @@ -136,7 +136,7 @@ text_encoder = Mistral3ForConditionalGeneration.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/flux2_fun/predict_t2i_control_ref.py b/examples/flux2_fun/predict_t2i_control_ref.py index 1d08417..eb5f6c8 100644 --- a/examples/flux2_fun/predict_t2i_control_ref.py +++ b/examples/flux2_fun/predict_t2i_control_ref.py @@ -21,7 +21,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -68,7 +68,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 image = "asset/8.png" control_image = "asset/pose.jpg" @@ -136,7 +136,7 @@ text_encoder = Mistral3ForConditionalGeneration.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/hunyuanvideo/predict_i2v.py b/examples/hunyuanvideo/predict_i2v.py index 8872304..acbd1c7 100644 --- a/examples/hunyuanvideo/predict_i2v.py +++ b/examples/hunyuanvideo/predict_i2v.py @@ -24,7 +24,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image, merge_lora, save_videos_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -71,7 +71,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" @@ -152,7 +152,7 @@ image_processor = CLIPImageProcessor.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/hunyuanvideo/predict_t2v.py b/examples/hunyuanvideo/predict_t2v.py index d7384d8..e288b26 100644 --- a/examples/hunyuanvideo/predict_t2v.py +++ b/examples/hunyuanvideo/predict_t2v.py @@ -22,7 +22,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, merge_lora, save_videos_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -69,7 +69,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompt = "1girl, black_hair, brown_eyes, earrings, freckles, grey_background, jewelry, lips, long_hair, looking_at_viewer, nose, piercing, realistic, red_lips, solo, upper_body" negative_prompt = "The video is not of a high quality, it has a low resolution. Watermark present in each frame. The background is solid. Strange body and strange trajectory. Distortion. " @@ -141,7 +141,7 @@ text_encoder_2 = CLIPTextModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/infinitetalk/predict_s2v.py b/examples/infinitetalk/predict_s2v.py index f4bfadf..ad47ffe 100644 --- a/examples/infinitetalk/predict_s2v.py +++ b/examples/infinitetalk/predict_s2v.py @@ -25,7 +25,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, get_image_latent, merge_lora, merge_video_audio, save_videos_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -89,7 +89,7 @@ segment_frame_length = 81 fps = 25 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # The path of the reference image ref_image = "asset/8.png" @@ -180,7 +180,7 @@ clip_image_encoder = CLIPModel.from_pretrained( clip_image_encoder = clip_image_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/lens/predict_t2i.py b/examples/lens/predict_t2i.py index 2c0fcd5..98b1b48 100644 --- a/examples/lens/predict_t2i.py +++ b/examples/lens/predict_t2i.py @@ -17,7 +17,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, FlowUniPCMultistepScheduler, apply_gpu_memory_mode, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -62,7 +62,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # Set to True on A100/V100 to dequantize MXFP4 GPT-OSS weights. dequantize_mxfp4 = False @@ -132,7 +132,7 @@ text_encoder = LensGptOssEncoder.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/lingbot_video/predict_i2v.py b/examples/lingbot_video/predict_i2v.py index 747445c..5a1bfbb 100644 --- a/examples/lingbot_video/predict_i2v.py +++ b/examples/lingbot_video/predict_i2v.py @@ -72,7 +72,7 @@ video_length = 81 fps = 24 # Use torch.float16 if GPU does not support torch.bfloat16 -# some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # The condition image is used twice: as Qwen3-VL visual input and as a clean # first-frame latent injected into the diffusion latent (ti2v). @@ -155,7 +155,7 @@ text_encoder = Qwen3VLForConditionalGeneration.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow_Unipc": FlowUniPCMultistepScheduler, }[sampler_name] scheduler = Chosen_Scheduler.from_pretrained( diff --git a/examples/lingbot_video/predict_t2v.py b/examples/lingbot_video/predict_t2v.py index 3c3b3d6..ed46e4f 100644 --- a/examples/lingbot_video/predict_t2v.py +++ b/examples/lingbot_video/predict_t2v.py @@ -73,7 +73,7 @@ video_length = 81 fps = 24 # Use torch.float16 if GPU does not support torch.bfloat16 -# some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # prompts # Write a plain natural-language prompt: it is ALWAYS rewritten into the @@ -157,7 +157,7 @@ text_encoder = Qwen3VLForConditionalGeneration.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow_Unipc": FlowUniPCMultistepScheduler, }[sampler_name] scheduler = Chosen_Scheduler.from_pretrained( diff --git a/examples/lingbot_video/predict_t2v_refine.py b/examples/lingbot_video/predict_t2v_refine.py index 72a5500..b6d9391 100644 --- a/examples/lingbot_video/predict_t2v_refine.py +++ b/examples/lingbot_video/predict_t2v_refine.py @@ -84,7 +84,7 @@ video_length = 81 fps = 24 # Use torch.float16 if GPU does not support torch.bfloat16 -# some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # prompts # Write a plain natural-language prompt: it is ALWAYS rewritten into the @@ -187,7 +187,7 @@ processor = AutoProcessor.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow_Unipc": FlowUniPCMultistepScheduler, }[sampler_name] scheduler = Chosen_Scheduler.from_pretrained( diff --git a/examples/lingbot_world/predict_i2v.py b/examples/lingbot_world/predict_i2v.py index 0b5a58e..f91d33d 100644 --- a/examples/lingbot_world/predict_i2v.py +++ b/examples/lingbot_world/predict_i2v.py @@ -92,7 +92,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # Camera trajectory (poses.npy / intrinsics.npy) + reference image + prompt. @@ -191,7 +191,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/lingbot_world/predict_i2v_fast.py b/examples/lingbot_world/predict_i2v_fast.py index 5733f18..09de33a 100644 --- a/examples/lingbot_world/predict_i2v_fast.py +++ b/examples/lingbot_world/predict_i2v_fast.py @@ -108,7 +108,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # Camera trajectory (poses.npy / intrinsics.npy) + reference image + prompt. @@ -190,7 +190,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/longcatvideo/predict_i2v.py b/examples/longcatvideo/predict_i2v.py index 28fac18..9bf5a91 100644 --- a/examples/longcatvideo/predict_i2v.py +++ b/examples/longcatvideo/predict_i2v.py @@ -21,7 +21,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_to_video_latent, merge_lora, save_videos_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -68,7 +68,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 validation_image_start = "asset/1.png" @@ -131,7 +131,7 @@ text_encoder = UMT5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/longcatvideo/predict_s2v_avatar.py b/examples/longcatvideo/predict_s2v_avatar.py index 50b9053..33b8442 100644 --- a/examples/longcatvideo/predict_s2v_avatar.py +++ b/examples/longcatvideo/predict_s2v_avatar.py @@ -25,7 +25,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, merge_lora, merge_video_audio, save_videos_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -80,7 +80,7 @@ audio_path = "asset/talk.wav" use_audio_vocal_separator = False # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # Prompt prompt = "A young woman with long flowing purple hair stands by the seaside on a sunny day, singing. Wearing a white sleeveless dress with a navy blue bow at the collar, her hair gently sways in the ocean breeze. The sparkling sea, blue sky with white clouds, and pink wildflowers along the shore create a beautiful and vibrant scene." @@ -147,7 +147,7 @@ audio_encoder = LongCatVideoAudioEncoder( audio_encoder.audio_encoder.feature_extractor._freeze_parameters() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/longcatvideo/predict_t2v.py b/examples/longcatvideo/predict_t2v.py index 7b3148a..1a4da22 100644 --- a/examples/longcatvideo/predict_t2v.py +++ b/examples/longcatvideo/predict_t2v.py @@ -21,7 +21,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, merge_lora, save_videos_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -68,7 +68,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # Prompt prompt = "1girl, black_hair, brown_eyes, earrings, freckles, grey_background, jewelry, lips, long_hair, looking_at_viewer, nose, piercing, realistic, red_lips, solo, upper_body" @@ -129,7 +129,7 @@ text_encoder = UMT5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/ltx2.3/predict_i2v.py b/examples/ltx2.3/predict_i2v.py index 9c01295..65b9450 100644 --- a/examples/ltx2.3/predict_i2v.py +++ b/examples/ltx2.3/predict_i2v.py @@ -22,7 +22,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, merge_lora, save_videos_with_audio_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -68,7 +68,7 @@ video_length = 121 fps = 24 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" diff --git a/examples/ltx2.3/predict_t2v.py b/examples/ltx2.3/predict_t2v.py index 6a082d3..33f79d9 100644 --- a/examples/ltx2.3/predict_t2v.py +++ b/examples/ltx2.3/predict_t2v.py @@ -22,7 +22,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, merge_lora, save_videos_with_audio_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -68,7 +68,7 @@ video_length = 121 fps = 24 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompt = "A brown dog barks on a sofa, sitting on a light-colored couch in a cozy room. Behind the dog, there is a framed painting on a shelf, surrounded by pink flowers. " negative_prompt = "worst quality, inconsistent motion, blurry, jittery, distorted, static, low quality, artifacts" diff --git a/examples/ltx2/predict_i2v.py b/examples/ltx2/predict_i2v.py index d8fa5b9..9ccc876 100644 --- a/examples/ltx2/predict_i2v.py +++ b/examples/ltx2/predict_i2v.py @@ -22,7 +22,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, merge_lora, save_videos_with_audio_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -68,7 +68,7 @@ video_length = 121 fps = 24 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" diff --git a/examples/ltx2/predict_i2v_upsample.py b/examples/ltx2/predict_i2v_upsample.py index b2b187c..28f97f8 100644 --- a/examples/ltx2/predict_i2v_upsample.py +++ b/examples/ltx2/predict_i2v_upsample.py @@ -23,7 +23,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, merge_lora, save_videos_with_audio_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -72,7 +72,7 @@ fps = 24 enable_latent_upsample = True # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" diff --git a/examples/ltx2/predict_t2v.py b/examples/ltx2/predict_t2v.py index b02d164..d3a3ff5 100644 --- a/examples/ltx2/predict_t2v.py +++ b/examples/ltx2/predict_t2v.py @@ -22,7 +22,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, merge_lora, save_videos_with_audio_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -68,7 +68,7 @@ video_length = 121 fps = 24 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompt = "A brown dog barks on a sofa, sitting on a light-colored couch in a cozy room. Behind the dog, there is a framed painting on a shelf, surrounded by pink flowers. " negative_prompt = "worst quality, inconsistent motion, blurry, jittery, distorted, static, low quality, artifacts" diff --git a/examples/minimax_h3/predict_i2v.py b/examples/minimax_h3/predict_i2v.py index c11cab8..a0223fb 100644 --- a/examples/minimax_h3/predict_i2v.py +++ b/examples/minimax_h3/predict_i2v.py @@ -80,7 +80,7 @@ validation_image_start = "asset/1.png" validation_image_end = None # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompt = "一只棕色的狗摇着头,坐在舒适房间里的浅色沙发上。在狗的后面,架子上有一幅镶框的画,周围是粉红色的花朵。房间里柔和温暖的灯光营造出舒适的氛围。" seed = 43 diff --git a/examples/minimax_h3_fun/predict_v2v_control.py b/examples/minimax_h3_fun/predict_v2v_control.py index 25c661b..93c2033 100644 --- a/examples/minimax_h3_fun/predict_v2v_control.py +++ b/examples/minimax_h3_fun/predict_v2v_control.py @@ -86,7 +86,7 @@ fps = 24 control_context_scale = 1.00 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = "asset/pose.mp4" # Inpaint inputs, only read by checkpoints trained with `--enable_inpaint` (control_in_dim widened, e.g. 49): diff --git a/examples/minimax_h3_fun/predict_v2v_control_inpaint.py b/examples/minimax_h3_fun/predict_v2v_control_inpaint.py index c14d938..0b25281 100644 --- a/examples/minimax_h3_fun/predict_v2v_control_inpaint.py +++ b/examples/minimax_h3_fun/predict_v2v_control_inpaint.py @@ -86,7 +86,7 @@ fps = 24 control_context_scale = 1.00 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # Path of the control (e.g. pose) video; leaving it None zeroes the control channels of the side branch. With # inpaint inputs given the mask then guides the run on its own (the layout training reaches when it drops the diff --git a/examples/mova/predict_i2v.py b/examples/mova/predict_i2v.py index c38c7cd..8b2fec7 100644 --- a/examples/mova/predict_i2v.py +++ b/examples/mova/predict_i2v.py @@ -22,7 +22,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, merge_lora, save_videos_with_audio_grid, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, diff --git a/examples/phantom/predict_s2v.py b/examples/phantom/predict_s2v.py index ea5dd4e..5e0bf21 100644 --- a/examples/phantom/predict_s2v.py +++ b/examples/phantom/predict_s2v.py @@ -103,7 +103,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 subject_ref_images = ["asset/ref_1.png", "asset/ref_2.png"] @@ -177,7 +177,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/qwenimage/predict_i2i_layered.py b/examples/qwenimage/predict_i2i_layered.py index e12e64c..be6ec54 100644 --- a/examples/qwenimage/predict_i2i_layered.py +++ b/examples/qwenimage/predict_i2i_layered.py @@ -21,7 +21,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, FlowUniPCMultistepScheduler, apply_gpu_memory_mode, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -81,7 +81,7 @@ lora_path = None resolution = 640 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 image = "asset/yarn-art-pikachu.png" @@ -148,7 +148,7 @@ processor = Qwen2VLProcessor.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/qwenimage/predict_t2i.py b/examples/qwenimage/predict_t2i.py index 8e10e2e..26f9d3b 100644 --- a/examples/qwenimage/predict_t2i.py +++ b/examples/qwenimage/predict_t2i.py @@ -19,7 +19,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, FlowUniPCMultistepScheduler, apply_gpu_memory_mode, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -79,7 +79,7 @@ lora_path = None sample_size = [1344, 768] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # Please use as detailed a prompt as possible to describe the object that needs to be generated. prompt = "1girl, black_hair, brown_eyes, earrings, freckles, grey_background, jewelry, lips, long_hair, looking_at_viewer, nose, piercing, realistic, red_lips, solo, upper_body" @@ -138,7 +138,7 @@ text_encoder = Qwen2_5_VLForConditionalGeneration.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/qwenimage/predict_t2i_edit.py b/examples/qwenimage/predict_t2i_edit.py index 11be830..23bc983 100644 --- a/examples/qwenimage/predict_t2i_edit.py +++ b/examples/qwenimage/predict_t2i_edit.py @@ -21,7 +21,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -81,7 +81,7 @@ lora_path = None sample_size = [1344, 768] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 image = "asset/8.png" # Please use as detailed a prompt as possible to describe the object that needs to be generated. @@ -147,7 +147,7 @@ processor = Qwen2VLProcessor.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/qwenimage/predict_t2i_edit_plus.py b/examples/qwenimage/predict_t2i_edit_plus.py index 7b82255..edbe72b 100644 --- a/examples/qwenimage/predict_t2i_edit_plus.py +++ b/examples/qwenimage/predict_t2i_edit_plus.py @@ -21,7 +21,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -81,7 +81,7 @@ lora_path = None sample_size = [1344, 768] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 image = ["asset/8.png", "asset/ref_1.png"] # Please use as detailed a prompt as possible to describe the object that needs to be generated. @@ -147,7 +147,7 @@ processor = Qwen2VLProcessor.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/qwenimage_fun/predict_i2i_inpaint.py b/examples/qwenimage_fun/predict_i2i_inpaint.py index 9f4f77f..f990886 100644 --- a/examples/qwenimage_fun/predict_i2i_inpaint.py +++ b/examples/qwenimage_fun/predict_i2i_inpaint.py @@ -22,7 +22,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -84,7 +84,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/pose.jpg" inpaint_image = "asset/8.png" @@ -151,7 +151,7 @@ text_encoder = Qwen2_5_VLForConditionalGeneration.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/qwenimage_fun/predict_t2i_control.py b/examples/qwenimage_fun/predict_t2i_control.py index 40bdda9..efa93e5 100644 --- a/examples/qwenimage_fun/predict_t2i_control.py +++ b/examples/qwenimage_fun/predict_t2i_control.py @@ -22,7 +22,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -84,7 +84,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/pose.jpg" inpaint_image = None @@ -151,7 +151,7 @@ text_encoder = Qwen2_5_VLForConditionalGeneration.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/qwenimage_instantx/predict_t2i_control.py b/examples/qwenimage_instantx/predict_t2i_control.py index bdb6771..0a51af2 100644 --- a/examples/qwenimage_instantx/predict_t2i_control.py +++ b/examples/qwenimage_instantx/predict_t2i_control.py @@ -22,7 +22,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -85,7 +85,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/pose.jpg" controlnet_conditioning_scale = 0.80 @@ -166,7 +166,7 @@ text_encoder = Qwen2_5_VLForConditionalGeneration.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/turbodiffusion/predict_i2v_wan2.2.py b/examples/turbodiffusion/predict_i2v_wan2.2.py index 1c16336..984290c 100644 --- a/examples/turbodiffusion/predict_i2v_wan2.2.py +++ b/examples/turbodiffusion/predict_i2v_wan2.2.py @@ -85,7 +85,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" @@ -192,7 +192,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/turbodiffusion/predict_t2v_wan2.1.py b/examples/turbodiffusion/predict_t2v_wan2.1.py index 6b84d6e..c8a1615 100644 --- a/examples/turbodiffusion/predict_t2v_wan2.1.py +++ b/examples/turbodiffusion/predict_t2v_wan2.1.py @@ -81,7 +81,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompt = "A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse. She wears sunglasses and red lipstick. She walks confidently and casually. The street is damp and reflective, creating a mirror effect of the colorful lights. Many pedestrians walk about." negative_prompt = "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走" @@ -152,7 +152,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1/predict_i2v.py b/examples/wan2.1/predict_i2v.py index efc4e46..50c3671 100755 --- a/examples/wan2.1/predict_i2v.py +++ b/examples/wan2.1/predict_i2v.py @@ -103,7 +103,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" @@ -178,7 +178,7 @@ clip_image_encoder = CLIPModel.from_pretrained( clip_image_encoder = clip_image_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1/predict_i2v_tae.py b/examples/wan2.1/predict_i2v_tae.py index 9828291..300e34d 100644 --- a/examples/wan2.1/predict_i2v_tae.py +++ b/examples/wan2.1/predict_i2v_tae.py @@ -114,7 +114,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" @@ -203,7 +203,7 @@ clip_image_encoder = CLIPModel.from_pretrained( clip_image_encoder = clip_image_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1/predict_t2v.py b/examples/wan2.1/predict_t2v.py index 0a14a76..1fa0bd7 100755 --- a/examples/wan2.1/predict_t2v.py +++ b/examples/wan2.1/predict_t2v.py @@ -101,7 +101,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompt = "一只棕色的狗摇着头,坐在舒适房间里的浅色沙发上。在狗的后面,架子上有一幅镶框的画,周围是粉红色的花朵。房间里柔和温暖的灯光营造出舒适的氛围。" negative_prompt = "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走" @@ -165,7 +165,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1/predict_t2v_tae.py b/examples/wan2.1/predict_t2v_tae.py index a394618..dd12afe 100644 --- a/examples/wan2.1/predict_t2v_tae.py +++ b/examples/wan2.1/predict_t2v_tae.py @@ -112,7 +112,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompt = "一只棕色的狗摇着头,坐在舒适房间里的浅色沙发上。在狗的后面,架子上有一幅镶框的画,周围是粉红色的花朵。房间里柔和温暖的灯光营造出舒适的氛围。" negative_prompt = "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走" @@ -190,7 +190,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1_causal_forcing/predict_t2v.py b/examples/wan2.1_causal_forcing/predict_t2v.py index c2631c6..6c82578 100644 --- a/examples/wan2.1_causal_forcing/predict_t2v.py +++ b/examples/wan2.1_causal_forcing/predict_t2v.py @@ -211,7 +211,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1_causal_forcing/predict_t2v_stream.py b/examples/wan2.1_causal_forcing/predict_t2v_stream.py index 61b17ea..6a57586 100644 --- a/examples/wan2.1_causal_forcing/predict_t2v_stream.py +++ b/examples/wan2.1_causal_forcing/predict_t2v_stream.py @@ -224,7 +224,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1_flex_forcing/predict_t2v.py b/examples/wan2.1_flex_forcing/predict_t2v.py index db8f1f6..b6115e8 100644 --- a/examples/wan2.1_flex_forcing/predict_t2v.py +++ b/examples/wan2.1_flex_forcing/predict_t2v.py @@ -207,7 +207,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1_flex_forcing/predict_t2v_edit.py b/examples/wan2.1_flex_forcing/predict_t2v_edit.py index 8272477..270dbf8 100644 --- a/examples/wan2.1_flex_forcing/predict_t2v_edit.py +++ b/examples/wan2.1_flex_forcing/predict_t2v_edit.py @@ -211,7 +211,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1_fun/predict_i2v.py b/examples/wan2.1_fun/predict_i2v.py index abb5e24..246710c 100755 --- a/examples/wan2.1_fun/predict_i2v.py +++ b/examples/wan2.1_fun/predict_i2v.py @@ -103,7 +103,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" @@ -179,7 +179,7 @@ clip_image_encoder = CLIPModel.from_pretrained( clip_image_encoder = clip_image_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1_fun/predict_t2v.py b/examples/wan2.1_fun/predict_t2v.py index f069856..5418ac3 100755 --- a/examples/wan2.1_fun/predict_t2v.py +++ b/examples/wan2.1_fun/predict_t2v.py @@ -103,7 +103,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompt = "一只棕色的狗摇着头,坐在舒适房间里的浅色沙发上。在狗的后面,架子上有一幅镶框的画,周围是粉红色的花朵。房间里柔和温暖的灯光营造出舒适的氛围。" negative_prompt = "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走" @@ -178,7 +178,7 @@ else: clip_image_processor = None # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1_fun/predict_v2v_control.py b/examples/wan2.1_fun/predict_v2v_control.py index 1fe1ef8..0ef6118 100755 --- a/examples/wan2.1_fun/predict_v2v_control.py +++ b/examples/wan2.1_fun/predict_v2v_control.py @@ -104,7 +104,7 @@ video_length = 49 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = "asset/pose.mp4" control_camera_txt = None @@ -187,7 +187,7 @@ clip_image_encoder = CLIPModel.from_pretrained( clip_image_encoder = clip_image_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1_fun/predict_v2v_control_camera.py b/examples/wan2.1_fun/predict_v2v_control_camera.py index 2114823..d968cdd 100755 --- a/examples/wan2.1_fun/predict_v2v_control_camera.py +++ b/examples/wan2.1_fun/predict_v2v_control_camera.py @@ -104,7 +104,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = None control_camera_txt = "asset/Pan_Left.txt" @@ -187,7 +187,7 @@ clip_image_encoder = CLIPModel.from_pretrained( clip_image_encoder = clip_image_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1_fun/predict_v2v_control_ref.py b/examples/wan2.1_fun/predict_v2v_control_ref.py index 31beecb..1f2a141 100755 --- a/examples/wan2.1_fun/predict_v2v_control_ref.py +++ b/examples/wan2.1_fun/predict_v2v_control_ref.py @@ -104,7 +104,7 @@ video_length = 49 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = "asset/pose.mp4" control_camera_txt = None @@ -187,7 +187,7 @@ clip_image_encoder = CLIPModel.from_pretrained( clip_image_encoder = clip_image_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1_self_forcing/predict_t2v.py b/examples/wan2.1_self_forcing/predict_t2v.py index 8015e0d..a05789f 100644 --- a/examples/wan2.1_self_forcing/predict_t2v.py +++ b/examples/wan2.1_self_forcing/predict_t2v.py @@ -84,7 +84,7 @@ independent_first_frame = False context_noise = 0.0 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompt = "A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse. She wears sunglasses and red lipstick. She walks confidently and casually. The street is damp and reflective, creating a mirror effect of the colorful lights. Many pedestrians walk about." negative_prompt = "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走" @@ -157,7 +157,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1_self_forcing/predict_t2v_forcing_kv.py b/examples/wan2.1_self_forcing/predict_t2v_forcing_kv.py index 06f4cb6..574b687 100644 --- a/examples/wan2.1_self_forcing/predict_t2v_forcing_kv.py +++ b/examples/wan2.1_self_forcing/predict_t2v_forcing_kv.py @@ -109,7 +109,7 @@ forcing_kv_num_frame_patch = 6 # token segments per latent frame forcing_kv_sim_retention_ratio = 0.33 # fraction of candidate segments kept # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompts = [ "A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse. She wears sunglasses and red lipstick. She walks confidently and casually. The street is damp and reflective, creating a mirror effect of the colorful lights. Many pedestrians walk about.", @@ -187,7 +187,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1_self_forcing/predict_t2v_stream.py b/examples/wan2.1_self_forcing/predict_t2v_stream.py index 79e2712..ada7d7b 100644 --- a/examples/wan2.1_self_forcing/predict_t2v_stream.py +++ b/examples/wan2.1_self_forcing/predict_t2v_stream.py @@ -97,7 +97,7 @@ streaming = True save_mode = "segments" # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompt = "A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse. She wears sunglasses and red lipstick. She walks confidently and casually. The street is damp and reflective, creating a mirror effect of the colorful lights. Many pedestrians walk about." negative_prompt = "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走" @@ -170,7 +170,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1_vace/predict_i2v.py b/examples/wan2.1_vace/predict_i2v.py index f404d90..488dc6d 100644 --- a/examples/wan2.1_vace/predict_i2v.py +++ b/examples/wan2.1_vace/predict_i2v.py @@ -101,7 +101,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = None start_image = "asset/1.png" @@ -179,7 +179,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1_vace/predict_s2v.py b/examples/wan2.1_vace/predict_s2v.py index 6da3667..d55dc93 100644 --- a/examples/wan2.1_vace/predict_s2v.py +++ b/examples/wan2.1_vace/predict_s2v.py @@ -102,7 +102,7 @@ fps = 16 vace_context_scale = 1.00 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = None start_image = None @@ -179,7 +179,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.1_vace/predict_v2v_control.py b/examples/wan2.1_vace/predict_v2v_control.py index 8121f4a..cc4d909 100644 --- a/examples/wan2.1_vace/predict_v2v_control.py +++ b/examples/wan2.1_vace/predict_v2v_control.py @@ -102,7 +102,7 @@ fps = 16 vace_context_scale = 1.00 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = "asset/pose.mp4" start_image = None @@ -179,7 +179,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2/predict_animate.py b/examples/wan2.2/predict_animate.py index 5200f3c..e2852aa 100644 --- a/examples/wan2.2/predict_animate.py +++ b/examples/wan2.2/predict_animate.py @@ -112,7 +112,7 @@ segment_frame_length = 77 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompt = "视频中的人在做动作" negative_prompt = "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走" @@ -212,7 +212,7 @@ clip_image_encoder = CLIPModel.from_pretrained( clip_image_encoder = clip_image_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2/predict_i2v.py b/examples/wan2.2/predict_i2v.py index ffc6160..9715810 100644 --- a/examples/wan2.2/predict_i2v.py +++ b/examples/wan2.2/predict_i2v.py @@ -105,7 +105,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" @@ -203,7 +203,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2/predict_s2v.py b/examples/wan2.2/predict_s2v.py index af3f44f..39d4713 100644 --- a/examples/wan2.2/predict_s2v.py +++ b/examples/wan2.2/predict_s2v.py @@ -107,7 +107,7 @@ segment_frame_length = 80 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # The path of the pose control video control_video = "asset/pose.mp4" @@ -216,7 +216,7 @@ audio_encoder = WanAudioEncoder( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2/predict_t2v.py b/examples/wan2.2/predict_t2v.py index b0945e6..3cbd155 100755 --- a/examples/wan2.2/predict_t2v.py +++ b/examples/wan2.2/predict_t2v.py @@ -104,7 +104,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 prompt = "一只棕色的狗摇着头,坐在舒适房间里的浅色沙发上。在狗的后面,架子上有一幅镶框的画,周围是粉红色的花朵。房间里柔和温暖的灯光营造出舒适的氛围。" negative_prompt = "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走" @@ -192,7 +192,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( torch_dtype=weight_dtype) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2/predict_ti2v.py b/examples/wan2.2/predict_ti2v.py index 5fee4e1..e0be637 100755 --- a/examples/wan2.2/predict_ti2v.py +++ b/examples/wan2.2/predict_ti2v.py @@ -107,7 +107,7 @@ video_length = 121 fps = 24 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" @@ -204,7 +204,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2/predict_ti2v_tae.py b/examples/wan2.2/predict_ti2v_tae.py index 652b30f..c0e7788 100644 --- a/examples/wan2.2/predict_ti2v_tae.py +++ b/examples/wan2.2/predict_ti2v_tae.py @@ -111,7 +111,7 @@ video_length = 81 fps = 24 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" @@ -221,7 +221,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_fun/predict_i2v.py b/examples/wan2.2_fun/predict_i2v.py index d2019fe..d338ed4 100644 --- a/examples/wan2.2_fun/predict_i2v.py +++ b/examples/wan2.2_fun/predict_i2v.py @@ -106,7 +106,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" @@ -206,7 +206,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_fun/predict_i2v_2.2vae.py b/examples/wan2.2_fun/predict_i2v_2.2vae.py index 3a211d9..d28ea44 100644 --- a/examples/wan2.2_fun/predict_i2v_2.2vae.py +++ b/examples/wan2.2_fun/predict_i2v_2.2vae.py @@ -109,7 +109,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" @@ -209,7 +209,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_fun/predict_i2v_2.2vae_tae.py b/examples/wan2.2_fun/predict_i2v_2.2vae_tae.py index f5a91cc..94f6247 100644 --- a/examples/wan2.2_fun/predict_i2v_2.2vae_tae.py +++ b/examples/wan2.2_fun/predict_i2v_2.2vae_tae.py @@ -113,7 +113,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" @@ -224,7 +224,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_fun/predict_i2v_5b.py b/examples/wan2.2_fun/predict_i2v_5b.py index 27c9d01..b92f99f 100644 --- a/examples/wan2.2_fun/predict_i2v_5b.py +++ b/examples/wan2.2_fun/predict_i2v_5b.py @@ -108,7 +108,7 @@ video_length = 121 fps = 24 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # If you want to generate from text, please set the validation_image_start = None and validation_image_end = None validation_image_start = "asset/1.png" @@ -208,7 +208,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_fun/predict_t2v.py b/examples/wan2.2_fun/predict_t2v.py index 3749e21..111ef77 100644 --- a/examples/wan2.2_fun/predict_t2v.py +++ b/examples/wan2.2_fun/predict_t2v.py @@ -106,7 +106,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # 使用更长的neg prompt如"模糊,突变,变形,失真,画面暗,文本字幕,画面固定,连环画,漫画,线稿,没有主体。",可以增加稳定性 # 在neg prompt中添加"安静,固定"等词语可以增加动态性。 @@ -202,7 +202,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_fun/predict_t2v_2.2vae.py b/examples/wan2.2_fun/predict_t2v_2.2vae.py index a358da8..4cea9b7 100644 --- a/examples/wan2.2_fun/predict_t2v_2.2vae.py +++ b/examples/wan2.2_fun/predict_t2v_2.2vae.py @@ -107,7 +107,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # 使用更长的neg prompt如"模糊,突变,变形,失真,画面暗,文本字幕,画面固定,连环画,漫画,线稿,没有主体。",可以增加稳定性 # 在neg prompt中添加"安静,固定"等词语可以增加动态性。 @@ -203,7 +203,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_fun/predict_t2v_2.2vae_tae.py b/examples/wan2.2_fun/predict_t2v_2.2vae_tae.py index ea12dbf..26dbb1f 100644 --- a/examples/wan2.2_fun/predict_t2v_2.2vae_tae.py +++ b/examples/wan2.2_fun/predict_t2v_2.2vae_tae.py @@ -112,7 +112,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # 使用更长的neg prompt如"模糊,突变,变形,失真,画面暗,文本字幕,画面固定,连环画,漫画,线稿,没有主体。",可以增加稳定性 # 在neg prompt中添加"安静,固定"等词语可以增加动态性。 @@ -219,7 +219,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_fun/predict_t2v_5b.py b/examples/wan2.2_fun/predict_t2v_5b.py index 345f6c8..73d740a 100644 --- a/examples/wan2.2_fun/predict_t2v_5b.py +++ b/examples/wan2.2_fun/predict_t2v_5b.py @@ -106,7 +106,7 @@ video_length = 121 fps = 21 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # 使用更长的neg prompt如"模糊,突变,变形,失真,画面暗,文本字幕,画面固定,连环画,漫画,线稿,没有主体。",可以增加稳定性 # 在neg prompt中添加"安静,固定"等词语可以增加动态性。 @@ -202,7 +202,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_fun/predict_v2v_control.py b/examples/wan2.2_fun/predict_v2v_control.py index 1c8f806..b79294a 100644 --- a/examples/wan2.2_fun/predict_v2v_control.py +++ b/examples/wan2.2_fun/predict_v2v_control.py @@ -111,7 +111,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = "asset/pose.mp4" control_camera_txt = None @@ -218,7 +218,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_fun/predict_v2v_control_5b.py b/examples/wan2.2_fun/predict_v2v_control_5b.py index f698b2c..701d418 100644 --- a/examples/wan2.2_fun/predict_v2v_control_5b.py +++ b/examples/wan2.2_fun/predict_v2v_control_5b.py @@ -111,7 +111,7 @@ video_length = 121 fps = 24 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = "asset/pose.mp4" control_camera_txt = None @@ -218,7 +218,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_fun/predict_v2v_control_camera.py b/examples/wan2.2_fun/predict_v2v_control_camera.py index 81658fd..a270638 100644 --- a/examples/wan2.2_fun/predict_v2v_control_camera.py +++ b/examples/wan2.2_fun/predict_v2v_control_camera.py @@ -111,7 +111,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = None control_camera_txt = "asset/Zoom_In.txt" @@ -218,7 +218,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_fun/predict_v2v_control_camera_5b.py b/examples/wan2.2_fun/predict_v2v_control_camera_5b.py index 433b889..62cc056 100644 --- a/examples/wan2.2_fun/predict_v2v_control_camera_5b.py +++ b/examples/wan2.2_fun/predict_v2v_control_camera_5b.py @@ -111,7 +111,7 @@ video_length = 81 fps = 24 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = None control_camera_txt = "asset/Zoom_In.txt" @@ -218,7 +218,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_fun/predict_v2v_control_ref.py b/examples/wan2.2_fun/predict_v2v_control_ref.py index 928911a..9634861 100644 --- a/examples/wan2.2_fun/predict_v2v_control_ref.py +++ b/examples/wan2.2_fun/predict_v2v_control_ref.py @@ -111,7 +111,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = "asset/pose.mp4" control_camera_txt = None @@ -218,7 +218,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_fun/predict_v2v_control_ref_5b.py b/examples/wan2.2_fun/predict_v2v_control_ref_5b.py index 4c2bae1..343dc37 100644 --- a/examples/wan2.2_fun/predict_v2v_control_ref_5b.py +++ b/examples/wan2.2_fun/predict_v2v_control_ref_5b.py @@ -111,7 +111,7 @@ video_length = 121 fps = 24 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = "asset/pose.mp4" control_camera_txt = None @@ -218,7 +218,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_vace_fun/predict_i2v.py b/examples/wan2.2_vace_fun/predict_i2v.py index e428c89..263506b 100644 --- a/examples/wan2.2_vace_fun/predict_i2v.py +++ b/examples/wan2.2_vace_fun/predict_i2v.py @@ -107,7 +107,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = None start_image = "asset/1.png" @@ -221,7 +221,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_vace_fun/predict_s2v.py b/examples/wan2.2_vace_fun/predict_s2v.py index 0eb4824..613ab7e 100644 --- a/examples/wan2.2_vace_fun/predict_s2v.py +++ b/examples/wan2.2_vace_fun/predict_s2v.py @@ -107,7 +107,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = None start_image = None @@ -221,7 +221,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_vace_fun/predict_v2v_control.py b/examples/wan2.2_vace_fun/predict_v2v_control.py index 598d3a3..f345a6b 100644 --- a/examples/wan2.2_vace_fun/predict_v2v_control.py +++ b/examples/wan2.2_vace_fun/predict_v2v_control.py @@ -107,7 +107,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = "asset/pose.mp4" start_image = None @@ -221,7 +221,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_vace_fun/predict_v2v_control_ref.py b/examples/wan2.2_vace_fun/predict_v2v_control_ref.py index f04bfb6..039f7bd 100644 --- a/examples/wan2.2_vace_fun/predict_v2v_control_ref.py +++ b/examples/wan2.2_vace_fun/predict_v2v_control_ref.py @@ -107,7 +107,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = "asset/pose.mp4" start_image = None @@ -221,7 +221,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/wan2.2_vace_fun/predict_v2v_mask.py b/examples/wan2.2_vace_fun/predict_v2v_mask.py index 409a783..1500d26 100644 --- a/examples/wan2.2_vace_fun/predict_v2v_mask.py +++ b/examples/wan2.2_vace_fun/predict_v2v_mask.py @@ -107,7 +107,7 @@ video_length = 81 fps = 16 # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_video = None start_image = None @@ -221,7 +221,7 @@ text_encoder = WanT5EncoderModel.from_pretrained( text_encoder = text_encoder.eval() # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image/predict_t2i.py b/examples/z_image/predict_t2i.py index f3a850c..cfd5dea 100644 --- a/examples/z_image/predict_t2i.py +++ b/examples/z_image/predict_t2i.py @@ -17,7 +17,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, FlowUniPCMultistepScheduler, apply_gpu_memory_mode, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -62,7 +62,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # Please use as detailed a prompt as possible to describe the object that needs to be generated. prompt = "一位年轻女子站在阳光明媚的海岸线上,白裙在轻拂的海风中微微飘动。她拥有一头鲜艳的紫色长发,在风中轻盈舞动,发间系着一个精致的黑色蝴蝶结,与身后柔和的蔚蓝天空形成鲜明对比。她面容清秀,眉目精致,透着一股甜美的青春气息;神情柔和,略带羞涩,目光静静地凝望着远方的地平线,双手自然交叠于身前,仿佛沉浸在思绪之中。在她身后,是辽阔无垠、波光粼粼的大海,阳光洒在海面上,映出温暖的金色光晕。" @@ -122,7 +122,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image/predict_turbo_t2i.py b/examples/z_image/predict_turbo_t2i.py index cd60555..13414d0 100644 --- a/examples/z_image/predict_turbo_t2i.py +++ b/examples/z_image/predict_turbo_t2i.py @@ -17,7 +17,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, FlowUniPCMultistepScheduler, apply_gpu_memory_mode, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -62,7 +62,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 # Please use as detailed a prompt as possible to describe the object that needs to be generated. prompt = "一位年轻女子站在阳光明媚的海岸线上,白裙在轻拂的海风中微微飘动。她拥有一头鲜艳的紫色长发,在风中轻盈舞动,发间系着一个精致的黑色蝴蝶结,与身后柔和的蔚蓝天空形成鲜明对比。她面容清秀,眉目精致,透着一股甜美的青春气息;神情柔和,略带羞涩,目光静静地凝望着远方的地平线,双手自然交叠于身前,仿佛沉浸在思绪之中。在她身后,是辽阔无垠、波光粼粼的大海,阳光洒在海面上,映出温暖的金色光晕。" @@ -122,7 +122,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image_fun/predict_i2i_inpaint_2.1.py b/examples/z_image_fun/predict_i2i_inpaint_2.1.py index 5934ed6..8bbf3e1 100644 --- a/examples/z_image_fun/predict_i2i_inpaint_2.1.py +++ b/examples/z_image_fun/predict_i2i_inpaint_2.1.py @@ -19,7 +19,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -66,7 +66,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/pose.jpg" inpaint_image = "asset/8.png" @@ -133,7 +133,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image_fun/predict_i2i_inpaint_2.1_lite.py b/examples/z_image_fun/predict_i2i_inpaint_2.1_lite.py index f3c7bd4..e33402b 100644 --- a/examples/z_image_fun/predict_i2i_inpaint_2.1_lite.py +++ b/examples/z_image_fun/predict_i2i_inpaint_2.1_lite.py @@ -19,7 +19,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -66,7 +66,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/pose.jpg" inpaint_image = "asset/8.png" @@ -133,7 +133,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image_fun/predict_i2i_tile_2.1.py b/examples/z_image_fun/predict_i2i_tile_2.1.py index f21305c..d481d94 100644 --- a/examples/z_image_fun/predict_i2i_tile_2.1.py +++ b/examples/z_image_fun/predict_i2i_tile_2.1.py @@ -19,7 +19,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -66,7 +66,7 @@ lora_path = None sample_size = [2048, 2048] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/low_res.png" # The inpaint_image and mask_image is useless in tile model, just set them to None. @@ -134,7 +134,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image_fun/predict_i2i_tile_2.1_lite.py b/examples/z_image_fun/predict_i2i_tile_2.1_lite.py index 243c8e7..a1fc63e 100644 --- a/examples/z_image_fun/predict_i2i_tile_2.1_lite.py +++ b/examples/z_image_fun/predict_i2i_tile_2.1_lite.py @@ -19,7 +19,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -66,7 +66,7 @@ lora_path = None sample_size = [2048, 2048] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/low_res.png" # The inpaint_image and mask_image is useless in tile model, just set them to None. @@ -134,7 +134,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image_fun/predict_t2i_control_2.1.py b/examples/z_image_fun/predict_t2i_control_2.1.py index 1327657..fb83476 100644 --- a/examples/z_image_fun/predict_t2i_control_2.1.py +++ b/examples/z_image_fun/predict_t2i_control_2.1.py @@ -21,7 +21,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -68,7 +68,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/pose.jpg" inpaint_image = None @@ -141,7 +141,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image_fun/predict_t2i_control_2.1_lite.py b/examples/z_image_fun/predict_t2i_control_2.1_lite.py index 87ca773..cd666cf 100644 --- a/examples/z_image_fun/predict_t2i_control_2.1_lite.py +++ b/examples/z_image_fun/predict_t2i_control_2.1_lite.py @@ -21,7 +21,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -68,7 +68,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/pose.jpg" inpaint_image = None @@ -141,7 +141,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image_fun/predict_turbo_i2i_inpaint_2.0.py b/examples/z_image_fun/predict_turbo_i2i_inpaint_2.0.py index e13be01..02cfd18 100644 --- a/examples/z_image_fun/predict_turbo_i2i_inpaint_2.0.py +++ b/examples/z_image_fun/predict_turbo_i2i_inpaint_2.0.py @@ -19,7 +19,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -66,7 +66,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/pose.jpg" inpaint_image = "asset/8.png" @@ -133,7 +133,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image_fun/predict_turbo_i2i_inpaint_2.1.py b/examples/z_image_fun/predict_turbo_i2i_inpaint_2.1.py index 0c01c7f..59bcb9a 100644 --- a/examples/z_image_fun/predict_turbo_i2i_inpaint_2.1.py +++ b/examples/z_image_fun/predict_turbo_i2i_inpaint_2.1.py @@ -19,7 +19,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -66,7 +66,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/pose.jpg" inpaint_image = "asset/8.png" @@ -133,7 +133,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image_fun/predict_turbo_i2i_inpaint_2.1_lite.py b/examples/z_image_fun/predict_turbo_i2i_inpaint_2.1_lite.py index f309f5f..7c93908 100644 --- a/examples/z_image_fun/predict_turbo_i2i_inpaint_2.1_lite.py +++ b/examples/z_image_fun/predict_turbo_i2i_inpaint_2.1_lite.py @@ -19,7 +19,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -66,7 +66,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/pose.jpg" inpaint_image = "asset/8.png" @@ -133,7 +133,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image_fun/predict_turbo_i2i_tile_2.1.py b/examples/z_image_fun/predict_turbo_i2i_tile_2.1.py index b9d3916..270a825 100644 --- a/examples/z_image_fun/predict_turbo_i2i_tile_2.1.py +++ b/examples/z_image_fun/predict_turbo_i2i_tile_2.1.py @@ -19,7 +19,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -66,7 +66,7 @@ lora_path = None sample_size = [1328, 1328] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/low_res.png" # The inpaint_image and mask_image is useless in tile model, just set them to None. @@ -134,7 +134,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image_fun/predict_turbo_i2i_tile_2.1_lite.py b/examples/z_image_fun/predict_turbo_i2i_tile_2.1_lite.py index 8e5a31b..fe32454 100644 --- a/examples/z_image_fun/predict_turbo_i2i_tile_2.1_lite.py +++ b/examples/z_image_fun/predict_turbo_i2i_tile_2.1_lite.py @@ -19,7 +19,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -66,7 +66,7 @@ lora_path = None sample_size = [1328, 1328] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/low_res.png" # The inpaint_image and mask_image is useless in tile model, just set them to None. @@ -134,7 +134,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image_fun/predict_turbo_t2i_control.py b/examples/z_image_fun/predict_turbo_t2i_control.py index cdce64b..959a7bf 100644 --- a/examples/z_image_fun/predict_turbo_t2i_control.py +++ b/examples/z_image_fun/predict_turbo_t2i_control.py @@ -19,7 +19,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -66,7 +66,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/pose.jpg" control_context_scale = 0.75 @@ -131,7 +131,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image_fun/predict_turbo_t2i_control_2.0.py b/examples/z_image_fun/predict_turbo_t2i_control_2.0.py index 89165e6..82c2290 100644 --- a/examples/z_image_fun/predict_turbo_t2i_control_2.0.py +++ b/examples/z_image_fun/predict_turbo_t2i_control_2.0.py @@ -19,7 +19,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -66,7 +66,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/pose.jpg" inpaint_image = None @@ -133,7 +133,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image_fun/predict_turbo_t2i_control_2.1.py b/examples/z_image_fun/predict_turbo_t2i_control_2.1.py index 07c0cf0..85d8b5e 100644 --- a/examples/z_image_fun/predict_turbo_t2i_control_2.1.py +++ b/examples/z_image_fun/predict_turbo_t2i_control_2.1.py @@ -21,7 +21,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -68,7 +68,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/pose.jpg" inpaint_image = None @@ -141,7 +141,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler, diff --git a/examples/z_image_fun/predict_turbo_t2i_control_2.1_lite.py b/examples/z_image_fun/predict_turbo_t2i_control_2.1_lite.py index a110715..4b26d6f 100644 --- a/examples/z_image_fun/predict_turbo_t2i_control_2.1_lite.py +++ b/examples/z_image_fun/predict_turbo_t2i_control_2.1_lite.py @@ -19,7 +19,7 @@ from videox_fun.utils import (FlowDPMSolverMultistepScheduler, apply_gpu_memory_mode, get_image_latent, merge_lora, unmerge_lora) -# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, sequential_cpu_offload]. +# GPU memory mode, which can be chosen in [model_full_load, model_full_load_and_qfloat8, model_cpu_offload, model_cpu_offload_and_qfloat8, model_group_offload, sequential_cpu_offload]. # model_full_load means that the entire model will be moved to the GPU. # # model_full_load_and_qfloat8 means that the entire model will be moved to the GPU, @@ -66,7 +66,7 @@ lora_path = None sample_size = [1728, 992] # Use torch.float16 if GPU does not support torch.bfloat16 -# ome graphics cards, such as v100, 2080ti, do not support torch.bfloat16 +# Some graphics cards, such as v100, 2080ti, do not support torch.bfloat16 weight_dtype = torch.bfloat16 control_image = "asset/pose.jpg" inpaint_image = None @@ -133,7 +133,7 @@ text_encoder = Qwen3ForCausalLM.from_pretrained( ) # Get Scheduler -Chosen_Scheduler = scheduler_dict = { +Chosen_Scheduler = { "Flow": FlowMatchEulerDiscreteScheduler, "Flow_Unipc": FlowUniPCMultistepScheduler, "Flow_DPM++": FlowDPMSolverMultistepScheduler,