Spaces:
Runtime error
Runtime error
Mohamed Rashad
commited on
Commit
·
971809e
1
Parent(s):
ca6f560
Move to CPU
Browse files
app.py
CHANGED
@@ -3,7 +3,6 @@ from diffusers import StableDiffusionPipeline
|
|
3 |
import torch
|
4 |
|
5 |
pipe = StableDiffusionPipeline.from_pretrained("MohamedRashad/diffusion_fashion", torch_dtype=torch.float16)
|
6 |
-
pipe.to("cuda")
|
7 |
|
8 |
def generate_image(text):
|
9 |
images = pipe(text).images
|
@@ -13,7 +12,7 @@ def generate_image(text):
|
|
13 |
diffusion_interface = gr.Interface(
|
14 |
generate_image,
|
15 |
gr.Textbox(lines=1, label="Input"),
|
16 |
-
gr.
|
17 |
title="Diffusion4Fashion: Generate cool clothes!",
|
18 |
description="<center><p>Enter a description about a piece of cloth and the model will generate an image.</p></center>",
|
19 |
examples=["A photo of a dress, made in 2019, color is Red, Casual usage, Women's cloth, something for the summer season, on white background"],
|
|
|
3 |
import torch
|
4 |
|
5 |
pipe = StableDiffusionPipeline.from_pretrained("MohamedRashad/diffusion_fashion", torch_dtype=torch.float16)
|
|
|
6 |
|
7 |
def generate_image(text):
|
8 |
images = pipe(text).images
|
|
|
12 |
diffusion_interface = gr.Interface(
|
13 |
generate_image,
|
14 |
gr.Textbox(lines=1, label="Input"),
|
15 |
+
gr.Image(type="pil", label="Output"),
|
16 |
title="Diffusion4Fashion: Generate cool clothes!",
|
17 |
description="<center><p>Enter a description about a piece of cloth and the model will generate an image.</p></center>",
|
18 |
examples=["A photo of a dress, made in 2019, color is Red, Casual usage, Women's cloth, something for the summer season, on white background"],
|