Spaces:
Sleeping
Sleeping
updated for bigger textbox
Browse files
app.py
CHANGED
|
@@ -7,7 +7,6 @@ from diffusers import DiffusionPipeline
|
|
| 7 |
import torch
|
| 8 |
|
| 9 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 10 |
-
model_repo_id = "stabilityai/sdxl-turbo" # Replace to the model you would like to use
|
| 11 |
|
| 12 |
MAX_SEED = np.iinfo(np.int32).max
|
| 13 |
MAX_IMAGE_SIZE = 1024
|
|
@@ -91,12 +90,11 @@ with gr.Blocks(css=css) as demo:
|
|
| 91 |
)
|
| 92 |
|
| 93 |
with gr.Row():
|
| 94 |
-
prompt = gr.
|
| 95 |
label="Prompt",
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
container=False,
|
| 100 |
)
|
| 101 |
|
| 102 |
run_button = gr.Button("Run", scale=0, variant="primary")
|
|
@@ -127,7 +125,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 127 |
minimum=256,
|
| 128 |
maximum=MAX_IMAGE_SIZE,
|
| 129 |
step=32,
|
| 130 |
-
value=1024,
|
| 131 |
)
|
| 132 |
|
| 133 |
height = gr.Slider(
|
|
@@ -135,7 +133,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 135 |
minimum=256,
|
| 136 |
maximum=MAX_IMAGE_SIZE,
|
| 137 |
step=32,
|
| 138 |
-
value=1024,
|
| 139 |
)
|
| 140 |
|
| 141 |
with gr.Row():
|
|
@@ -144,7 +142,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 144 |
minimum=0.0,
|
| 145 |
maximum=10.0,
|
| 146 |
step=0.1,
|
| 147 |
-
value=0.0,
|
| 148 |
)
|
| 149 |
|
| 150 |
num_inference_steps = gr.Slider(
|
|
@@ -152,7 +150,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 152 |
minimum=1,
|
| 153 |
maximum=50,
|
| 154 |
step=1,
|
| 155 |
-
value=2,
|
| 156 |
)
|
| 157 |
|
| 158 |
gr.Examples(examples=examples, inputs=[prompt])
|
|
|
|
| 7 |
import torch
|
| 8 |
|
| 9 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
|
| 10 |
|
| 11 |
MAX_SEED = np.iinfo(np.int32).max
|
| 12 |
MAX_IMAGE_SIZE = 1024
|
|
|
|
| 90 |
)
|
| 91 |
|
| 92 |
with gr.Row():
|
| 93 |
+
prompt = gr.Textbox(
|
| 94 |
label="Prompt",
|
| 95 |
+
info="Enter your prompt",
|
| 96 |
+
lines=5,
|
| 97 |
+
value="Cute animal with two eyes",
|
|
|
|
| 98 |
)
|
| 99 |
|
| 100 |
run_button = gr.Button("Run", scale=0, variant="primary")
|
|
|
|
| 125 |
minimum=256,
|
| 126 |
maximum=MAX_IMAGE_SIZE,
|
| 127 |
step=32,
|
| 128 |
+
value=1024,
|
| 129 |
)
|
| 130 |
|
| 131 |
height = gr.Slider(
|
|
|
|
| 133 |
minimum=256,
|
| 134 |
maximum=MAX_IMAGE_SIZE,
|
| 135 |
step=32,
|
| 136 |
+
value=1024,
|
| 137 |
)
|
| 138 |
|
| 139 |
with gr.Row():
|
|
|
|
| 142 |
minimum=0.0,
|
| 143 |
maximum=10.0,
|
| 144 |
step=0.1,
|
| 145 |
+
value=0.0,
|
| 146 |
)
|
| 147 |
|
| 148 |
num_inference_steps = gr.Slider(
|
|
|
|
| 150 |
minimum=1,
|
| 151 |
maximum=50,
|
| 152 |
step=1,
|
| 153 |
+
value=2,
|
| 154 |
)
|
| 155 |
|
| 156 |
gr.Examples(examples=examples, inputs=[prompt])
|