Spaces:
Running
on
Zero
Running
on
Zero
tori29umai
commited on
Commit
•
6e57b9c
1
Parent(s):
5d415f4
app.py
Browse files- app.py +2 -2
- utils/utils.py +1 -1
app.py
CHANGED
@@ -34,8 +34,8 @@ def load_model(lora_dir, cn_dir):
|
|
34 |
"cagliostrolab/animagine-xl-3.1", controlnet=controlnet, vae=vae, torch_dtype=torch.float16
|
35 |
)
|
36 |
pipe.load_lora_weights(lora_dir, weight_name="sdxl_BW_bold_Line.safetensors")
|
37 |
-
|
38 |
-
|
39 |
pipe = pipe.to(device)
|
40 |
return pipe
|
41 |
|
|
|
34 |
"cagliostrolab/animagine-xl-3.1", controlnet=controlnet, vae=vae, torch_dtype=torch.float16
|
35 |
)
|
36 |
pipe.load_lora_weights(lora_dir, weight_name="sdxl_BW_bold_Line.safetensors")
|
37 |
+
pipe.set_adapters(["sdxl_BW_bold_Line"], adapter_weights=[1.2])
|
38 |
+
pipe.fuse_lora()
|
39 |
pipe = pipe.to(device)
|
40 |
return pipe
|
41 |
|
utils/utils.py
CHANGED
@@ -60,7 +60,7 @@ def load_lora_model(model_dir):
|
|
60 |
file_name = 'sdxl_BW_bold_Line.safetensors'
|
61 |
file_path = os.path.join(model_dir, file_name)
|
62 |
if not os.path.exists(file_path):
|
63 |
-
url = "https://huggingface.co/tori29umai/lineart/
|
64 |
response = requests.get(url, allow_redirects=True)
|
65 |
if response.status_code == 200:
|
66 |
with open(file_path, 'wb') as f:
|
|
|
60 |
file_name = 'sdxl_BW_bold_Line.safetensors'
|
61 |
file_path = os.path.join(model_dir, file_name)
|
62 |
if not os.path.exists(file_path):
|
63 |
+
url = "https://huggingface.co/tori29umai/lineart/resolve/main/sdxl_BW_bold_Line.safetensors"
|
64 |
response = requests.get(url, allow_redirects=True)
|
65 |
if response.status_code == 200:
|
66 |
with open(file_path, 'wb') as f:
|