tbbl commited on
Commit
5d5cad6
·
verified ·
1 Parent(s): f51b357

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -48,15 +48,15 @@ pipe = NAGWanPipeline.from_pretrained(
48
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=5.0)
49
  pipe.to("cuda")
50
 
51
- causvid_path = hf_hub_download(repo_id=LORA_REPO_ID, filename=LORA_FILENAME)
52
- pipe.load_lora_weights(causvid_path, adapter_name="causvid_lora")
53
- pipe.set_adapters(["causvid_lora"], adapter_weights=[0.95])
54
- for name, param in pipe.transformer.named_parameters():
55
- if "lora_B" in name:
56
- if "blocks.0" in name:
57
- param.data = param.data * 0.25
58
- pipe.fuse_lora()
59
- pipe.unload_lora_weights()
60
 
61
  pipe.transformer.__class__.attn_processors = NagWanTransformer3DModel.attn_processors
62
  pipe.transformer.__class__.set_attn_processor = NagWanTransformer3DModel.set_attn_processor
 
48
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=5.0)
49
  pipe.to("cuda")
50
 
51
+ #causvid_path = hf_hub_download(repo_id=LORA_REPO_ID, filename=LORA_FILENAME)
52
+ #pipe.load_lora_weights(causvid_path, adapter_name="causvid_lora")
53
+ #pipe.set_adapters(["causvid_lora"], adapter_weights=[0.95])
54
+ #for name, param in pipe.transformer.named_parameters():
55
+ # if "lora_B" in name:
56
+ # if "blocks.0" in name:
57
+ # param.data = param.data * 0.25
58
+ #pipe.fuse_lora()
59
+ #pipe.unload_lora_weights()
60
 
61
  pipe.transformer.__class__.attn_processors = NagWanTransformer3DModel.attn_processors
62
  pipe.transformer.__class__.set_attn_processor = NagWanTransformer3DModel.set_attn_processor