tonyassi commited on
Commit
8a3216f
·
verified ·
1 Parent(s): 3d91128

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -16,6 +16,8 @@ image_pipeline.set_ip_adapter_scale(0.6)
16
 
17
  @spaces.GPU(enable_queue=True)
18
  def text_to_image(ip, prompt, neg_prompt, width, height, ip_scale, strength, guidance, steps):
 
 
19
  ip.thumbnail((1024, 1024))
20
 
21
  text_pipeline.set_ip_adapter_scale(ip_scale)
@@ -35,6 +37,8 @@ def text_to_image(ip, prompt, neg_prompt, width, height, ip_scale, strength, gui
35
 
36
  @spaces.GPU(enable_queue=True)
37
  def image_to_image(ip, image, prompt, neg_prompt, width, height, ip_scale, strength, guidance, steps):
 
 
38
  ip.thumbnail((1024, 1024))
39
  image.thumbnail((1024, 1024))
40
 
 
16
 
17
  @spaces.GPU(enable_queue=True)
18
  def text_to_image(ip, prompt, neg_prompt, width, height, ip_scale, strength, guidance, steps):
19
+ text_pipeline.to("cuda")
20
+
21
  ip.thumbnail((1024, 1024))
22
 
23
  text_pipeline.set_ip_adapter_scale(ip_scale)
 
37
 
38
  @spaces.GPU(enable_queue=True)
39
  def image_to_image(ip, image, prompt, neg_prompt, width, height, ip_scale, strength, guidance, steps):
40
+ image_pipeline.to("cuda")
41
+
42
  ip.thumbnail((1024, 1024))
43
  image.thumbnail((1024, 1024))
44