Update app.py
Browse filesfixing shape issue
app.py
CHANGED
|
@@ -61,12 +61,13 @@ def infer(prompts, negative_prompts, image):
|
|
| 61 |
num_inference_steps=50,
|
| 62 |
neg_prompt_ids=negative_prompt_ids,
|
| 63 |
jit=True,
|
| 64 |
-
).images[0]
|
| 65 |
|
| 66 |
#output_images = pipe.numpy_to_pil(np.asarray(output.reshape((num_samples,) + output.shape[-3:])))
|
| 67 |
del image
|
| 68 |
gc.collect()
|
| 69 |
|
|
|
|
| 70 |
return output
|
| 71 |
|
| 72 |
with gr.Blocks(theme='kfahn/AnimalPose') as demo:
|
|
|
|
| 61 |
num_inference_steps=50,
|
| 62 |
neg_prompt_ids=negative_prompt_ids,
|
| 63 |
jit=True,
|
| 64 |
+
).images[0,0]
|
| 65 |
|
| 66 |
#output_images = pipe.numpy_to_pil(np.asarray(output.reshape((num_samples,) + output.shape[-3:])))
|
| 67 |
del image
|
| 68 |
gc.collect()
|
| 69 |
|
| 70 |
+
output=np.array(output, dtype=np.float32)
|
| 71 |
return output
|
| 72 |
|
| 73 |
with gr.Blocks(theme='kfahn/AnimalPose') as demo:
|