Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -15,12 +15,9 @@ css = """
|
|
15 |
}
|
16 |
"""
|
17 |
|
18 |
-
import os
|
19 |
-
os.makedirs("cache", exist_ok=True)
|
20 |
-
|
21 |
DEVICE = 'cuda'
|
22 |
model_id = "Onodofthenorth/SD_PixelArt_SpriteSheet_Generator"
|
23 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id,
|
24 |
pipe.to("cuda")
|
25 |
|
26 |
|
@@ -39,7 +36,7 @@ with gr.Blocks(css=css) as API:
|
|
39 |
|
40 |
with gr.Column():
|
41 |
inputs=gr.TextArea(label="Prompt", placeholder="Prompt")
|
42 |
-
outputs=gr.Image(label="Ouput Image", type='pil',
|
43 |
generate_btn = gr.Button(value="Generate")
|
44 |
generate_btn.click(generate_sprite, inputs=inputs, outputs=outputs, api_name="generate_mesh")
|
45 |
|
|
|
15 |
}
|
16 |
"""
|
17 |
|
|
|
|
|
|
|
18 |
DEVICE = 'cuda'
|
19 |
model_id = "Onodofthenorth/SD_PixelArt_SpriteSheet_Generator"
|
20 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
21 |
pipe.to("cuda")
|
22 |
|
23 |
|
|
|
36 |
|
37 |
with gr.Column():
|
38 |
inputs=gr.TextArea(label="Prompt", placeholder="Prompt")
|
39 |
+
outputs=gr.Image(label="Ouput Image", type='pil', elem_id="img-display-output")
|
40 |
generate_btn = gr.Button(value="Generate")
|
41 |
generate_btn.click(generate_sprite, inputs=inputs, outputs=outputs, api_name="generate_mesh")
|
42 |
|