tori29umai commited on
Commit
57ffff6
1 Parent(s): 6d6bac1
Files changed (2) hide show
  1. app.py +3 -1
  2. utils/utils.py +2 -2
app.py CHANGED
@@ -33,7 +33,9 @@ def load_model(lora_dir, cn_dir):
33
  pipe = StableDiffusionXLControlNetImg2ImgPipeline.from_pretrained(
34
  "cagliostrolab/animagine-xl-3.1", controlnet=controlnet, vae=vae, torch_dtype=torch.float16
35
  )
36
- pipe.load_lora_weights(lora_dir, weight_name="style-lineart_02.safetensors")
 
 
37
  pipe = pipe.to(device)
38
  return pipe
39
 
 
33
  pipe = StableDiffusionXLControlNetImg2ImgPipeline.from_pretrained(
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_BWLine.safetensors", adapter_name="sdxl_BWLine")
37
+ pipe.set_adapters(["sdxl_BWLine"], adapter_weights=[1.4])
38
+ pipe.fuse_lora()
39
  pipe = pipe.to(device)
40
  return pipe
41
 
utils/utils.py CHANGED
@@ -62,8 +62,8 @@ def load_tagger_model(model_dir):
62
 
63
  def load_lora_model(model_dir):
64
  folder = model_dir
65
- file_name = 'style-lineart_02.safetensors'
66
- url = "https://huggingface.co/2vXpSwA7/iroiro-lora/resolve/main/test3/style-lineart_02.safetensors"
67
 
68
  file_path = os.path.join(folder, file_name)
69
  if not os.path.exists(file_path):
 
62
 
63
  def load_lora_model(model_dir):
64
  folder = model_dir
65
+ file_name = 'sdxl_BWLine.safetensors'
66
+ url = "https://huggingface.co/tori29umai/lineart/resolve/main/sdxl_BWLine.safetensors"
67
 
68
  file_path = os.path.join(folder, file_name)
69
  if not os.path.exists(file_path):