Update app.py
Browse files44 unmodified lines45464748495011 unmodified lines626364656667258 unmodified lines32632732832933033133244 unmodified linesMIN_DURATION = round(MIN_FRAMES_MODEL / FIXED_FPS, 1)MAX_DURATION = round(MAX_FRAMES_MODEL / FIXED_FPS, 1)SCHEDULER_MAP = {"FlowMatchEulerDiscrete": FlowMatchEulerDiscreteScheduler,"SASolver": SASolverScheduler,11 unmodified linesoriginal_scheduler = copy.deepcopy(pipe.scheduler)print(original_scheduler)quantize_(pipe.text_encoder, Int8WeightOnlyConfig())quantize_(pipe.transformer, Float8DynamicActivationFloat8WeightConfig())quantize_(pipe.transformer_2, Float8DynamicActivationFloat8WeightConfig())258 unmodified linesdef generate_interpolate(generated_video, multiplier, request: gr.Request):return interpolate_video(generated_video, multiplier, request)with gr.Blocks() as demo:gr.Markdown("# WAMU - Wan 2.2 I2V (14B)")gr.Markdown("## ℹ️ **A Note on Performance:** This version prioritizes a straightforward setup over maximum speed, so performance may vary.")gr.Markdown("run Wan 2.2 in just 4-8 steps, fp8 quantization & AoT compilation - compatible with 🧨 diffusers and ZeroGPU⚡️")44 unmodified lines454647484950515211 unmodified lines646566676869707172737475258 unmodified lines33433533633733833934034144 unmodified linesMIN_DURATION = round(MIN_FRAMES_MODEL / FIXED_FPS, 1)MAX_DURATION = round(MAX_FRAMES_MODEL / FIXED_FPS, 1)CACHE_DIR = os.path.expanduser("~/.cache/huggingface/")SCHEDULER_MAP = {"FlowMatchEulerDiscrete": FlowMatchEulerDiscreteScheduler,"SASolver": SASolverScheduler,11 unmodified linesoriginal_scheduler = copy.deepcopy(pipe.scheduler)print(original_scheduler)if os.path.exists(CACHE_DIR):shutil.rmtree(CACHE_DIR)print("Deleted Hugging Face cache.")else:print("No hub cache found.")quantize_(pipe.text_encoder, Int8WeightOnlyConfig())quantize_(pipe.transformer, Float8DynamicActivationFloat8WeightConfig())quantize_(pipe.transformer_2, Float8DynamicActivationFloat8WeightConfig())258 unmodified linesdef generate_interpolate(generated_video, multiplier, request: gr.Request):return interpolate_video(generated_video, multiplier, request)with gr.Blocks(delete_cache=(3600, 10800)) as demo:gr.Markdown("# WAMU - Wan 2.2 I2V (14B)")gr.Markdown("## ℹ️ **A Note on Performance:** This version prioritizes a straightforward setup over maximum speed, so performance may vary.")gr.Markdown("run Wan 2.2 in just 4-8 steps, fp8 quantization & AoT compilation - compatible with 🧨 diffusers and ZeroGPU⚡️")
app.py+10-1