BILLY12138 commited on
Commit
6cfd3ee
·
verified ·
1 Parent(s): 678c371

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -31,10 +31,8 @@ if torch.cuda.is_available():
31
  variant="fp16",
32
  ).to(device)
33
 
34
- tdd_lora = load_file(ACC_lora["TDD"])
35
- tdd_adv_lora = ACC_lora["TDD_adv"]
36
- pipe_sdxl.load_lora_weights(tdd_lora, adapter_name="TDD")
37
- pipe_sdxl.load_lora_weights(tdd_adv_lora, adapter_name="TDD_adv")
38
  pipe_sdxl.scheduler = TDDScheduler.from_config(pipe_sdxl.scheduler.config)
39
 
40
  pipe_sdxl_real = StableDiffusionXLPipeline.from_pretrained(
@@ -43,8 +41,8 @@ if torch.cuda.is_available():
43
  torch_dtype=torch.float16,
44
  variant="fp16",
45
  ).to(device)
46
- pipe_sdxl_real.load_lora_weights(tdd_lora, adapter_name="TDD")
47
- pipe_sdxl_real.load_lora_weights(tdd_adv_lora, adapter_name="TDD_adv")
48
  pipe_sdxl_real.scheduler = TDDScheduler.from_config(pipe_sdxl.scheduler.config)
49
 
50
  def update_base_model(ckpt):
 
31
  variant="fp16",
32
  ).to(device)
33
 
34
+ pipe_sdxl.load_lora_weights("RED-AIGC/TDD", weight_name=ACC_lora["TDD"], adapter_name="TDD")
35
+ pipe_sdxl.load_lora_weights("RED-AIGC/TDD", weight_name=ACC_lora["TDD_adv"], adapter_name="TDD_adv")
 
 
36
  pipe_sdxl.scheduler = TDDScheduler.from_config(pipe_sdxl.scheduler.config)
37
 
38
  pipe_sdxl_real = StableDiffusionXLPipeline.from_pretrained(
 
41
  torch_dtype=torch.float16,
42
  variant="fp16",
43
  ).to(device)
44
+ pipe_sdxl_real.load_lora_weights("RED-AIGC/TDD", weight_name=ACC_lora["TDD"], adapter_name="TDD")
45
+ pipe_sdxl_real.load_lora_weights("RED-AIGC/TDD", weight_name=ACC_lora["TDD_adv"], adapter_name="TDD_adv")
46
  pipe_sdxl_real.scheduler = TDDScheduler.from_config(pipe_sdxl.scheduler.config)
47
 
48
  def update_base_model(ckpt):