Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/maxdiffusion/configs/base_wan_14b.yml
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ use_cfg_cache: False
# Batch positive and negative prompts in text encoder to save compute.
use_batched_text_encoder: False

use_kv_cache: False
use_magcache: False
magcache_thresh: 0.12
magcache_K: 2
Expand Down
1 change: 1 addition & 0 deletions src/maxdiffusion/configs/base_wan_1_3b.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ flow_shift: 3.0

# Diffusion CFG cache (FasterCache-style, WAN 2.1 T2V only)
use_cfg_cache: False
use_kv_cache: False

# Batch positive and negative prompts in text encoder to save compute.
use_batched_text_encoder: False
Expand Down
2 changes: 1 addition & 1 deletion src/maxdiffusion/configs/base_wan_27b.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ use_cfg_cache: False
# Batch positive and negative prompts in text encoder to save compute.
use_batched_text_encoder: False


use_kv_cache: False
# SenCache: Sensitivity-Aware Caching (arXiv:2602.24208) — skip forward pass
# when predicted output change (based on accumulated latent/timestep drift) is small
use_sen_cache: False
Expand Down
4 changes: 2 additions & 2 deletions src/maxdiffusion/configs/base_wan_i2v_14b.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ profiler_steps: 10
enable_jax_named_scopes: False

# Generation parameters
prompt: "An astronaut hatching from an egg, on the surface of the moon, the darkness and depth of space realised in the background. High quality, ultrarealistic detail and breath-taking movie-like camera shot." #LoRA prompt "An astronaut hatching from an egg, on the surface of the moon, the darkness and depth of space realised in the background. Appearing behind him is a giant, translucent, pink spiritual manifestation (faxiang) that is synchronized with the man's action and pose."
prompt: "An astronaut hatching from an egg, on the surface of the moon, the darkness and depth of space realised in the background. They are raising their left arm for a thumbs up. High quality, ultrarealistic detail and breath-taking movie-like camera shot." #LoRA prompt "An astronaut hatching from an egg, on the surface of the moon, the darkness and depth of space realised in the background. Appearing behind him is a giant, translucent, pink spiritual manifestation (faxiang) that is synchronized with the man's action and pose."
prompt_2: "An astronaut hatching from an egg, on the surface of the moon, the darkness and depth of space realised in the background. High quality, ultrarealistic detail and breath-taking movie-like camera shot." #LoRA prompt "An astronaut hatching from an egg, on the surface of the moon, the darkness and depth of space realised in the background. Appearing behind him is a giant, translucent, pink spiritual manifestation (faxiang) that is synchronized with the man's action and pose."
negative_prompt: "Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards"
do_classifier_free_guidance: True
Expand All @@ -318,7 +318,7 @@ use_cfg_cache: False
# Batch positive and negative prompts in text encoder to save compute.
use_batched_text_encoder: False


use_kv_cache: False
# SenCache: Sensitivity-Aware Caching (arXiv:2602.24208)
use_sen_cache: False
use_magcache: False
Expand Down
4 changes: 2 additions & 2 deletions src/maxdiffusion/configs/base_wan_i2v_27b.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ profiler_steps: 10
enable_jax_named_scopes: False

# Generation parameters
prompt: "An astronaut hatching from an egg, on the surface of the moon, the darkness and depth of space realised in the background. High quality, ultrarealistic detail and breath-taking movie-like camera shot." #LoRA prompt "orbit 180 around an astronaut on the moon, the darkness and depth of space realised in the background. High quality, ultrarealistic detail and breath-taking movie-like camera shot."
prompt: "An astronaut hatching from an egg, on the surface of the moon, the darkness and depth of space realised in the background. They are raising their left arm for a thumbs up. High quality, ultrarealistic detail and breath-taking movie-like camera shot." #LoRA prompt "orbit 180 around an astronaut on the moon, the darkness and depth of space realised in the background. High quality, ultrarealistic detail and breath-taking movie-like camera shot."
prompt_2: "An astronaut hatching from an egg, on the surface of the moon, the darkness and depth of space realised in the background. High quality, ultrarealistic detail and breath-taking movie-like camera shot." #LoRA prompt "orbit 180 around an astronaut on the moon, the darkness and depth of space realised in the background. High quality, ultrarealistic detail and breath-taking movie-like camera shot."
negative_prompt: "Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards"
do_classifier_free_guidance: True
Expand All @@ -330,7 +330,7 @@ use_cfg_cache: False
# Batch positive and negative prompts in text encoder to save compute.
use_batched_text_encoder: False


use_kv_cache: False
# SenCache: Sensitivity-Aware Caching (arXiv:2602.24208)
use_sen_cache: False

Expand Down
6 changes: 5 additions & 1 deletion src/maxdiffusion/generate_wan.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def call_pipeline(config, pipeline, prompt, negative_prompt):
magcache_thresh=config.magcache_thresh,
magcache_K=config.magcache_K,
retention_ratio=config.retention_ratio,
use_kv_cache=config.use_kv_cache,
)
elif model_key == WAN2_2:
return pipeline(
Expand All @@ -118,6 +119,7 @@ def call_pipeline(config, pipeline, prompt, negative_prompt):
guidance_scale_high=config.guidance_scale_high,
use_cfg_cache=config.use_cfg_cache,
use_sen_cache=config.use_sen_cache,
use_kv_cache=config.use_kv_cache,
)
else:
raise ValueError(f"Unsupported model_name for I2V in config: {model_key}")
Expand All @@ -136,6 +138,7 @@ def call_pipeline(config, pipeline, prompt, negative_prompt):
magcache_thresh=config.magcache_thresh,
magcache_K=config.magcache_K,
retention_ratio=config.retention_ratio,
use_kv_cache=config.use_kv_cache,
)
elif model_key == WAN2_2:
return pipeline(
Expand All @@ -149,9 +152,10 @@ def call_pipeline(config, pipeline, prompt, negative_prompt):
guidance_scale_high=config.guidance_scale_high,
use_cfg_cache=config.use_cfg_cache,
use_sen_cache=config.use_sen_cache,
use_kv_cache=config.use_kv_cache,
)
else:
raise ValueError(f"Unsupported model_name for T2Vin config: {model_key}")
raise ValueError(f"Unsupported model_name for T2V in config: {model_key}")
Comment thread
Perseus14 marked this conversation as resolved.


def inference_generate_video(config, pipeline, filename_prefix=""):
Expand Down
Loading
Loading