Spaces:
Runtime error
Runtime error
fix int issue
Browse files
app.py
CHANGED
@@ -149,16 +149,16 @@ def make3d(images):
|
|
149 |
|
150 |
|
151 |
@spaces.GPU
|
152 |
-
def process_image(num_images,
|
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(
|
158 |
num_inference_steps=1,
|
159 |
guidance_scale=0.,
|
160 |
-
height=int(
|
161 |
-
width=int(
|
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,
|
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 |
|