altayavci commited on
Commit
7755ca1
1 Parent(s): 0c7515f

Update ip_adapter_openpose.py

Browse files
Files changed (1) hide show
  1. ip_adapter_openpose.py +3 -1
ip_adapter_openpose.py CHANGED
@@ -9,6 +9,7 @@ init_openpose()
9
  init_img2txt()
10
 
11
  ip_model = MODEL("pose")
 
12
 
13
 
14
  def generate(img_human: Image, img_clothes: Image):
@@ -18,13 +19,14 @@ def generate(img_human: Image, img_clothes: Image):
18
 
19
  img_openpose_gen = ip_model.model.generate(
20
  prompt=prompt,
 
21
  pil_image=img_clothes,
22
  image=img_openpose,
23
  width=512,
24
  height=768,
25
  num_samples=1,
26
  num_inference_steps=30,
27
- seed=42 # 123
28
  )[0]
29
 
30
  torch.cuda.empty_cache()
 
9
  init_img2txt()
10
 
11
  ip_model = MODEL("pose")
12
+ negative_prompt = "(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers:1.4), (deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation"
13
 
14
 
15
  def generate(img_human: Image, img_clothes: Image):
 
19
 
20
  img_openpose_gen = ip_model.model.generate(
21
  prompt=prompt,
22
+ negative_prompt=negative_prompt,
23
  pil_image=img_clothes,
24
  image=img_openpose,
25
  width=512,
26
  height=768,
27
  num_samples=1,
28
  num_inference_steps=30,
29
+ seed=123
30
  )[0]
31
 
32
  torch.cuda.empty_cache()