mattyamonaca commited on
Commit
b65b966
1 Parent(s): 21f3a40
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -35,14 +35,14 @@ def generate(detectors, prompt, negative_prompt, reference_flg=False, reference_
35
  negative_prompt = default_neg + negative_prompt
36
 
37
 
38
- if reference_flg==False and reference_img is not None:
39
  image = pipe_ip(
40
  prompt=prompt,
41
  negative_prompt = negative_prompt,
42
  image=detectors,
43
  num_inference_steps=50,
44
  controlnet_conditioning_scale=[1.0, 0.2],
45
- ip_adapter_image=None,
46
  ).images[0]
47
  else:
48
 
@@ -51,8 +51,7 @@ def generate(detectors, prompt, negative_prompt, reference_flg=False, reference_
51
  negative_prompt = negative_prompt,
52
  image=detectors,
53
  num_inference_steps=50,
54
- controlnet_conditioning_scale=[1.0, 0.2],
55
- ip_adapter_image=reference_img,
56
  ).images[0]
57
  return image
58
 
 
35
  negative_prompt = default_neg + negative_prompt
36
 
37
 
38
+ if reference_flg==True and reference_img is not None:
39
  image = pipe_ip(
40
  prompt=prompt,
41
  negative_prompt = negative_prompt,
42
  image=detectors,
43
  num_inference_steps=50,
44
  controlnet_conditioning_scale=[1.0, 0.2],
45
+ ip_adapter_image=reference_img,
46
  ).images[0]
47
  else:
48
 
 
51
  negative_prompt = negative_prompt,
52
  image=detectors,
53
  num_inference_steps=50,
54
+ controlnet_conditioning_scale=[1.0, 0.2]
 
55
  ).images[0]
56
  return image
57