Spaces:
Runtime error
Runtime error
ShreeKanade07
commited on
added example section
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
16 |
|
17 |
from diffusers import StableDiffusionInpaintPipeline
|
18 |
pipe = StableDiffusionInpaintPipeline.from_pretrained(
|
19 |
-
"ShreeKanade07/Real-Image-pipeline", torch_dtype=torch.
|
20 |
)
|
21 |
#pipe = pipe.to("cuda")
|
22 |
|
@@ -42,7 +42,7 @@ def predict(image,mask,prompt):
|
|
42 |
# Create the Gradio interface
|
43 |
gr.Interface(
|
44 |
predict,
|
45 |
-
title='Stable Diffusion In-Painting',
|
46 |
inputs=[
|
47 |
gr.Image(label='Image'),
|
48 |
gr.Image(label='Mask'),
|
@@ -50,5 +50,6 @@ gr.Interface(
|
|
50 |
],
|
51 |
outputs=[
|
52 |
gr.Image(label='Output Image')
|
53 |
-
]
|
|
|
54 |
).launch(debug=True, share=True)
|
|
|
16 |
|
17 |
from diffusers import StableDiffusionInpaintPipeline
|
18 |
pipe = StableDiffusionInpaintPipeline.from_pretrained(
|
19 |
+
"ShreeKanade07/Real-Image-pipeline", torch_dtype=torch.float16
|
20 |
)
|
21 |
#pipe = pipe.to("cuda")
|
22 |
|
|
|
42 |
# Create the Gradio interface
|
43 |
gr.Interface(
|
44 |
predict,
|
45 |
+
title='Stable Diffusion Sketch In-Painting',
|
46 |
inputs=[
|
47 |
gr.Image(label='Image'),
|
48 |
gr.Image(label='Mask'),
|
|
|
50 |
],
|
51 |
outputs=[
|
52 |
gr.Image(label='Output Image')
|
53 |
+
],
|
54 |
+
examples=[["IMG1.jpg", "IMG1_Mask.jpg"]], cache_examples=True
|
55 |
).launch(debug=True, share=True)
|