linoyts HF Staff commited on
Commit
2327668
·
verified ·
1 Parent(s): 7019232

Update optimization.py

Browse files
Files changed (1) hide show
  1. optimization.py +9 -9
optimization.py CHANGED
@@ -45,20 +45,20 @@ def optimize_pipeline_(pipeline: Callable[P, Any], *args: P.args, **kwargs: P.kw
45
  def compile_transformer():
46
 
47
  pipeline.load_lora_weights(
48
- "vrgamedevgirl84/Wan14BT2VFusioniX",
49
- weight_name="FusionX_LoRa/Phantom_Wan_14B_FusionX_LoRA.safetensors",
50
- adapter_name="phantom"
51
  )
52
  kwargs_lora = {}
53
  kwargs_lora["load_into_transformer_2"] = True
54
  pipeline.load_lora_weights(
55
- "vrgamedevgirl84/Wan14BT2VFusioniX",
56
- weight_name="FusionX_LoRa/Phantom_Wan_14B_FusionX_LoRA.safetensors",
57
- adapter_name="phantom_2", **kwargs_lora
58
  )
59
- pipeline.set_adapters(["phantom", "phantom_2"], adapter_weights=[1., 1.])
60
- pipeline.fuse_lora(adapter_names=["phantom"], lora_scale=3., components=["transformer"])
61
- pipeline.fuse_lora(adapter_names=["phantom_2"], lora_scale=1., components=["transformer_2"])
62
  pipeline.unload_lora_weights()
63
 
64
  with capture_component_call(pipeline, 'transformer') as call:
 
45
  def compile_transformer():
46
 
47
  pipeline.load_lora_weights(
48
+ "Kijai/WanVideo_comfy",
49
+ weight_name="Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank128_bf16.safetensors",
50
+ adapter_name="lightx2v"
51
  )
52
  kwargs_lora = {}
53
  kwargs_lora["load_into_transformer_2"] = True
54
  pipeline.load_lora_weights(
55
+ "Kijai/WanVideo_comfy",
56
+ weight_name="Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank128_bf16.safetensors",
57
+ adapter_name="lightx2v_2", **kwargs_lora
58
  )
59
+ pipeline.set_adapters(["lightx2v", "lightx2v_2"], adapter_weights=[1., 1.])
60
+ pipeline.fuse_lora(adapter_names=["lightx2v"], lora_scale=3., components=["transformer"])
61
+ pipeline.fuse_lora(adapter_names=["lightx2v_2"], lora_scale=1., components=["transformer_2"])
62
  pipeline.unload_lora_weights()
63
 
64
  with capture_component_call(pipeline, 'transformer') as call: