tori29umai commited on
Commit
f1a09c7
1 Parent(s): 7b45aa5
Files changed (2) hide show
  1. app.py +2 -2
  2. utils/dl_utils.py +2 -2
app.py CHANGED
@@ -36,8 +36,8 @@ def load_model(lora_dir, cn_dir):
36
  pipe = StableDiffusionXLControlNetImg2ImgPipeline.from_pretrained(
37
  "cagliostrolab/animagine-xl-3.1", controlnet=controlnet, vae=vae, torch_dtype=torch.float16
38
  )
39
- pipe.load_lora_weights(lora_dir, weight_name="sdxl_BWLine.safetensors")
40
- pipe.set_adapters(["sdxl_BWLine"], adapter_weights=[1.4])
41
  pipe.fuse_lora()
42
  pipe = pipe.to(device)
43
  return pipe
 
36
  pipe = StableDiffusionXLControlNetImg2ImgPipeline.from_pretrained(
37
  "cagliostrolab/animagine-xl-3.1", controlnet=controlnet, vae=vae, torch_dtype=torch.float16
38
  )
39
+ pipe.load_lora_weights(lora_dir, weight_name="lineart.safetensors")
40
+ pipe.set_adapters(["lineart"], adapter_weights=[1.4])
41
  pipe.fuse_lora()
42
  pipe = pipe.to(device)
43
  return pipe
utils/dl_utils.py CHANGED
@@ -57,10 +57,10 @@ def dl_tagger_model(model_dir):
57
 
58
 
59
  def dl_lora_model(model_dir):
60
- file_name = 'sdxl_BWLine.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_BWLine.safetensors"
64
  response = requests.get(url, allow_redirects=True)
65
  if response.status_code == 200:
66
  with open(file_path, 'wb') as f:
 
57
 
58
 
59
  def dl_lora_model(model_dir):
60
+ file_name = 'lineart.safetensors'
61
  file_path = os.path.join(model_dir, file_name)
62
  if not os.path.exists(file_path):
63
+ url = "https://huggingface.co/2vXpSwA7/iroiro-lora/resolve/main/sdxl/sdxl-lineart_03.safetensors"
64
  response = requests.get(url, allow_redirects=True)
65
  if response.status_code == 200:
66
  with open(file_path, 'wb') as f: