abreza commited on
Commit
47b1e0f
1 Parent(s): ba6c7b6

fix int issue

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -149,16 +149,16 @@ def make3d(images):
149
 
150
 
151
  @spaces.GPU
152
- def process_image(num_images, height, width, prompt, seed):
153
  global pipe
154
  with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16), timer("inference"):
155
  return pipe(
156
  prompt=[prompt]*num_images,
157
- generator=torch.Generator().manual_seed(int(seed)),
158
  num_inference_steps=1,
159
  guidance_scale=0.,
160
- height=int(height),
161
- width=int(width),
162
  timesteps=[800]
163
  ).images
164
 
@@ -290,7 +290,7 @@ with gr.Blocks() as demo:
290
 
291
  generate_2d_btn.click(
292
  fn=process_image,
293
- inputs=[num_images, 512, 512, prompt, 123],
294
  outputs=[generated_images]
295
  )
296
 
 
149
 
150
 
151
  @spaces.GPU
152
+ def process_image(num_images, prompt):
153
  global pipe
154
  with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16), timer("inference"):
155
  return pipe(
156
  prompt=[prompt]*num_images,
157
+ generator=torch.Generator().manual_seed(123),
158
  num_inference_steps=1,
159
  guidance_scale=0.,
160
+ height=int(512),
161
+ width=int(512),
162
  timesteps=[800]
163
  ).images
164
 
 
290
 
291
  generate_2d_btn.click(
292
  fn=process_image,
293
+ inputs=[num_images, prompt],
294
  outputs=[generated_images]
295
  )
296