Change model precision to float32 for CPU compatibility
Browse files
app.py
CHANGED
|
@@ -1,6 +1,3 @@
|
|
| 1 |
-
import sys
|
| 2 |
-
sys.path.append('/content/ViTON') # Ensure the SegBody.py file is on the Python path
|
| 3 |
-
|
| 4 |
import gradio as gr
|
| 5 |
from PIL import Image
|
| 6 |
from diffusers import AutoPipelineForInpainting, AutoencoderKL
|
|
@@ -66,7 +63,8 @@ demo = gr.Interface(
|
|
| 66 |
],
|
| 67 |
outputs=gr.Image(type="pil"),
|
| 68 |
title="Stable Diffusion Inpainting with Segmentation",
|
| 69 |
-
description="Inpainting model for seamless garment transfer on segmented body image using Stable Diffusion XL."
|
|
|
|
| 70 |
)
|
| 71 |
|
| 72 |
-
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from PIL import Image
|
| 3 |
from diffusers import AutoPipelineForInpainting, AutoencoderKL
|
|
|
|
| 63 |
],
|
| 64 |
outputs=gr.Image(type="pil"),
|
| 65 |
title="Stable Diffusion Inpainting with Segmentation",
|
| 66 |
+
description="Inpainting model for seamless garment transfer on segmented body image using Stable Diffusion XL.",
|
| 67 |
+
server_timeout=100, # Increase timeout duration to prevent session errors
|
| 68 |
)
|
| 69 |
|
| 70 |
+
demo.launch(share=True) # Enable share link for testing in a public domain
|