amos1088 commited on
Commit
13a9d06
·
1 Parent(s): 3cffeee
Files changed (1) hide show
  1. app.py +11 -12
app.py CHANGED
@@ -67,18 +67,17 @@ pipe.init_ipadapter(
67
  def gui_generation(prompt, ref_img, guidance_scale, ipadapter_scale):
68
 
69
  # Ensure the pipeline runs with correct dtype and device
70
- with torch.autocast("cuda", dtype=torch.bfloat16):
71
- image = pipe(
72
- width=1024,
73
- height=1024,
74
- prompt=prompt,
75
- negative_prompt="lowres, low quality, worst quality",
76
- num_inference_steps=24,
77
- guidance_scale=guidance_scale,
78
- generator=torch.Generator("cuda").manual_seed(42),
79
- clip_image=ref_img.convert('RGB'),
80
- ipadapter_scale=ipadapter_scale,
81
- ).images[0]
82
 
83
  return image
84
 
 
67
  def gui_generation(prompt, ref_img, guidance_scale, ipadapter_scale):
68
 
69
  # Ensure the pipeline runs with correct dtype and device
70
+ image = pipe(
71
+ width=1024,
72
+ height=1024,
73
+ prompt=prompt,
74
+ negative_prompt="lowres, low quality, worst quality",
75
+ num_inference_steps=24,
76
+ guidance_scale=guidance_scale,
77
+ generator=torch.Generator("cuda").manual_seed(42),
78
+ clip_image=ref_img.convert('RGB'),
79
+ ipadapter_scale=ipadapter_scale,
80
+ ).images[0]
 
81
 
82
  return image
83