KarthikAI commited on
Commit
5a59f40
·
verified ·
1 Parent(s): 43c3c22

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +9 -3
utils.py CHANGED
@@ -27,12 +27,18 @@ pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
27
  ).to(DEVICE)
28
 
29
  pipe.load_ip_adapter(
30
- pretrained_model_name_or_path_or_dict=ADAPTER_DIR,
31
- subfolder=".", # The weights file is directly in ADAPTER_DIR
32
  weight_name="ip-adapter_sd15.bin"
33
- # Optionally: subfolder="models" if using the repo, not a direct path
34
  )
35
 
 
 
 
 
 
 
 
36
  def generate_sticker(input_image, prompt):
37
  """
38
  Given a user image and a prompt, generates a sticker/emoji-style portrait.
 
27
  ).to(DEVICE)
28
 
29
  pipe.load_ip_adapter(
30
+ pretrained_model_name_or_path_or_dict="h94/IP-Adapter",
31
+ subfolder="models",
32
  weight_name="ip-adapter_sd15.bin"
 
33
  )
34
 
35
+ # pipe.load_ip_adapter(
36
+ # pretrained_model_name_or_path_or_dict=ADAPTER_DIR,
37
+ # subfolder=".", # The weights file is directly in ADAPTER_DIR
38
+ # weight_name="ip-adapter_sd15.bin"
39
+ # # Optionally: subfolder="models" if using the repo, not a direct path
40
+ # )
41
+
42
  def generate_sticker(input_image, prompt):
43
  """
44
  Given a user image and a prompt, generates a sticker/emoji-style portrait.