MaxMilan1
commited on
Commit
·
fb01197
1
Parent(s):
4095388
hi
Browse files
app.py
CHANGED
@@ -1,11 +1,13 @@
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
-
from diffusers import DiffusionPipeline
|
5 |
import rembg
|
6 |
|
7 |
model_id = "dataautogpt3/OpenDalleV1.1"
|
|
|
8 |
pipe = DiffusionPipeline.from_pretrained(model_id,
|
|
|
9 |
torch_dtype=torch.float16,
|
10 |
use_safetensors=True,
|
11 |
variant="fp16")
|
@@ -24,7 +26,7 @@ _TITLE = "Shoe Generator"
|
|
24 |
with gr.Blocks(_TITLE) as ShoeGen:
|
25 |
with gr.Row():
|
26 |
with gr.Column():
|
27 |
-
prompt = gr.Textbox(label="Enter a discription of a shoe"
|
28 |
neg_prompt = gr.Textbox(label="Enter a negative prompt", value="low quality, watermark, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, body out of frame, blurry, bad anatomy, blurred, watermark, grainy, signature, cut off, draft, closed eyes, text, logo")
|
29 |
button_gen = gr.Button("Generate Image")
|
30 |
with gr.Column():
|
|
|
1 |
import spaces
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
+
from diffusers import DiffusionPipeline, AutoencoderKL
|
5 |
import rembg
|
6 |
|
7 |
model_id = "dataautogpt3/OpenDalleV1.1"
|
8 |
+
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
|
9 |
pipe = DiffusionPipeline.from_pretrained(model_id,
|
10 |
+
vae=vae,
|
11 |
torch_dtype=torch.float16,
|
12 |
use_safetensors=True,
|
13 |
variant="fp16")
|
|
|
26 |
with gr.Blocks(_TITLE) as ShoeGen:
|
27 |
with gr.Row():
|
28 |
with gr.Column():
|
29 |
+
prompt = gr.Textbox(label="Enter a discription of a shoe")
|
30 |
neg_prompt = gr.Textbox(label="Enter a negative prompt", value="low quality, watermark, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, body out of frame, blurry, bad anatomy, blurred, watermark, grainy, signature, cut off, draft, closed eyes, text, logo")
|
31 |
button_gen = gr.Button("Generate Image")
|
32 |
with gr.Column():
|