Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ pipe = DiffusionPipeline.from_pretrained(model_repo_id, torch_dtype=torch_dtype)
|
|
18 |
pipe = pipe.to(device)
|
19 |
|
20 |
MAX_SEED = np.iinfo(np.int32).max
|
21 |
-
MAX_IMAGE_SIZE =
|
22 |
|
23 |
from datasets import load_dataset, Dataset
|
24 |
|
@@ -79,9 +79,7 @@ def infer(
|
|
79 |
|
80 |
|
81 |
examples = [
|
82 |
-
"
|
83 |
-
"An astronaut riding a green horse",
|
84 |
-
"A delicious ceviche cheesecake slice",
|
85 |
]
|
86 |
|
87 |
css = """
|
@@ -132,7 +130,7 @@ with gr.Blocks(css=css) as demo:
|
|
132 |
minimum=256,
|
133 |
maximum=MAX_IMAGE_SIZE,
|
134 |
step=32,
|
135 |
-
value=
|
136 |
)
|
137 |
|
138 |
height = gr.Slider(
|
@@ -140,7 +138,7 @@ with gr.Blocks(css=css) as demo:
|
|
140 |
minimum=256,
|
141 |
maximum=MAX_IMAGE_SIZE,
|
142 |
step=32,
|
143 |
-
value=
|
144 |
)
|
145 |
|
146 |
with gr.Row():
|
@@ -155,7 +153,7 @@ with gr.Blocks(css=css) as demo:
|
|
155 |
num_inference_steps = gr.Slider(
|
156 |
label="Number of inference steps",
|
157 |
minimum=1,
|
158 |
-
maximum=
|
159 |
step=1,
|
160 |
value=2, # Replace with defaults that work for your model
|
161 |
)
|
|
|
18 |
pipe = pipe.to(device)
|
19 |
|
20 |
MAX_SEED = np.iinfo(np.int32).max
|
21 |
+
MAX_IMAGE_SIZE = 520
|
22 |
|
23 |
from datasets import load_dataset, Dataset
|
24 |
|
|
|
79 |
|
80 |
|
81 |
examples = [
|
82 |
+
" A Woman using Leather Pants
|
|
|
|
|
83 |
]
|
84 |
|
85 |
css = """
|
|
|
130 |
minimum=256,
|
131 |
maximum=MAX_IMAGE_SIZE,
|
132 |
step=32,
|
133 |
+
value=520, # Replace with defaults that work for your model
|
134 |
)
|
135 |
|
136 |
height = gr.Slider(
|
|
|
138 |
minimum=256,
|
139 |
maximum=MAX_IMAGE_SIZE,
|
140 |
step=32,
|
141 |
+
value=520, # Replace with defaults that work for your model
|
142 |
)
|
143 |
|
144 |
with gr.Row():
|
|
|
153 |
num_inference_steps = gr.Slider(
|
154 |
label="Number of inference steps",
|
155 |
minimum=1,
|
156 |
+
maximum=10,
|
157 |
step=1,
|
158 |
value=2, # Replace with defaults that work for your model
|
159 |
)
|