zs38 commited on
Commit
ebd2fe3
·
1 Parent(s): 03e6b18
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import os
2
 
3
  import torch
4
- # import spaces
5
  import safetensors
6
  import gradio as gr
7
  from PIL import Image
@@ -56,7 +56,7 @@ IMAGE_PROCESS_TRANSFORM = transforms.Compose([
56
  transforms.Normalize(mean=[0.4815, 0.4578, 0.4082], std=[0.2686, 0.2613, 0.276])
57
  ])
58
 
59
- # @spaces.GPU
60
  def generate_image(ref_image, ref_image2, prompt, height=512, width=512, num_steps=25, guidance_scale=3.5, seed=0, ip_scale=1.0):
61
  print(f"ref_image: {ref_image.size}, prompt: {prompt}, height: {height}, width: {width}, num_steps: {num_steps}, guidance_scale: {guidance_scale}, ip_scale: {ip_scale}")
62
  with torch.no_grad():
 
1
  import os
2
 
3
  import torch
4
+ import spaces
5
  import safetensors
6
  import gradio as gr
7
  from PIL import Image
 
56
  transforms.Normalize(mean=[0.4815, 0.4578, 0.4082], std=[0.2686, 0.2613, 0.276])
57
  ])
58
 
59
+ @spaces.GPU
60
  def generate_image(ref_image, ref_image2, prompt, height=512, width=512, num_steps=25, guidance_scale=3.5, seed=0, ip_scale=1.0):
61
  print(f"ref_image: {ref_image.size}, prompt: {prompt}, height: {height}, width: {width}, num_steps: {num_steps}, guidance_scale: {guidance_scale}, ip_scale: {ip_scale}")
62
  with torch.no_grad():