cbensimon HF Staff commited on
Commit
0729c7e
·
1 Parent(s): 490fdda

pipeline -> pipe

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -48,29 +48,29 @@ pipe = WanImageToVideoPipeline.from_pretrained(MODEL_ID,
48
  torch_dtype=torch.bfloat16,
49
  ).to('cuda')
50
 
51
- pipeline.load_lora_weights(
52
  "Kijai/WanVideo_comfy",
53
  weight_name="Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank128_bf16.safetensors",
54
  adapter_name="lightx2v"
55
  )
56
  kwargs_lora = {}
57
  kwargs_lora["load_into_transformer_2"] = True
58
- pipeline.load_lora_weights(
59
  "Kijai/WanVideo_comfy",
60
  weight_name="Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank128_bf16.safetensors",
61
  adapter_name="lightx2v_2", **kwargs_lora
62
  )
63
- pipeline.set_adapters(["lightx2v", "lightx2v_2"], adapter_weights=[1., 1.])
64
- pipeline.fuse_lora(adapter_names=["lightx2v"], lora_scale=3., components=["transformer"])
65
- pipeline.fuse_lora(adapter_names=["lightx2v_2"], lora_scale=1., components=["transformer_2"])
66
- pipeline.unload_lora_weights()
67
 
68
- quantize_(pipeline.text_encoder, Int8WeightOnlyConfig())
69
- quantize_(pipeline.transformer, Float8DynamicActivationFloat8WeightConfig())
70
- quantize_(pipeline.transformer_2, Float8DynamicActivationFloat8WeightConfig())
71
 
72
- aoti.aoti_blocks_load(pipeline.transformer, 'zerogpu-aoti/Wan2', variant='fp8da')
73
- aoti.aoti_blocks_load(pipeline.transformer_2, 'zerogpu-aoti/Wan2', variant='fp8da')
74
 
75
 
76
  default_prompt_i2v = "make this image come alive, cinematic motion, smooth animation"
 
48
  torch_dtype=torch.bfloat16,
49
  ).to('cuda')
50
 
51
+ pipe.load_lora_weights(
52
  "Kijai/WanVideo_comfy",
53
  weight_name="Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank128_bf16.safetensors",
54
  adapter_name="lightx2v"
55
  )
56
  kwargs_lora = {}
57
  kwargs_lora["load_into_transformer_2"] = True
58
+ pipe.load_lora_weights(
59
  "Kijai/WanVideo_comfy",
60
  weight_name="Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank128_bf16.safetensors",
61
  adapter_name="lightx2v_2", **kwargs_lora
62
  )
63
+ pipe.set_adapters(["lightx2v", "lightx2v_2"], adapter_weights=[1., 1.])
64
+ pipe.fuse_lora(adapter_names=["lightx2v"], lora_scale=3., components=["transformer"])
65
+ pipe.fuse_lora(adapter_names=["lightx2v_2"], lora_scale=1., components=["transformer_2"])
66
+ pipe.unload_lora_weights()
67
 
68
+ quantize_(pipe.text_encoder, Int8WeightOnlyConfig())
69
+ quantize_(pipe.transformer, Float8DynamicActivationFloat8WeightConfig())
70
+ quantize_(pipe.transformer_2, Float8DynamicActivationFloat8WeightConfig())
71
 
72
+ aoti.aoti_blocks_load(pipe.transformer, 'zerogpu-aoti/Wan2', variant='fp8da')
73
+ aoti.aoti_blocks_load(pipe.transformer_2, 'zerogpu-aoti/Wan2', variant='fp8da')
74
 
75
 
76
  default_prompt_i2v = "make this image come alive, cinematic motion, smooth animation"