Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,20 +39,20 @@ pipe.load_lora_weights(
|
|
| 39 |
adapter_name="4k_schnell",
|
| 40 |
)
|
| 41 |
MAX_SEED = np.iinfo(np.int32).max
|
| 42 |
-
MAX_IMAGE_SIZE =
|
| 43 |
USE_ZERO_GPU = True
|
| 44 |
|
| 45 |
|
| 46 |
# @spaces.GPU #[uncomment to use ZeroGPU]
|
| 47 |
def infer(
|
| 48 |
prompt,
|
| 49 |
-
model,
|
| 50 |
seed,
|
| 51 |
randomize_seed,
|
| 52 |
width,
|
| 53 |
height,
|
| 54 |
num_inference_steps,
|
| 55 |
progress=gr.Progress(track_tqdm=True),
|
|
|
|
| 56 |
):
|
| 57 |
print("Using model:", model)
|
| 58 |
if model == "2k":
|
|
@@ -124,14 +124,14 @@ with gr.Blocks(css=css) as demo:
|
|
| 124 |
|
| 125 |
gr.Markdown("### Setting:")
|
| 126 |
|
| 127 |
-
model = gr.Radio(
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
)
|
| 135 |
|
| 136 |
with gr.Row():
|
| 137 |
width = gr.Slider(
|
|
@@ -176,7 +176,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 176 |
fn=infer,
|
| 177 |
inputs=[
|
| 178 |
prompt,
|
| 179 |
-
model,
|
| 180 |
seed,
|
| 181 |
randomize_seed,
|
| 182 |
width,
|
|
|
|
| 39 |
adapter_name="4k_schnell",
|
| 40 |
)
|
| 41 |
MAX_SEED = np.iinfo(np.int32).max
|
| 42 |
+
MAX_IMAGE_SIZE = 2048
|
| 43 |
USE_ZERO_GPU = True
|
| 44 |
|
| 45 |
|
| 46 |
# @spaces.GPU #[uncomment to use ZeroGPU]
|
| 47 |
def infer(
|
| 48 |
prompt,
|
|
|
|
| 49 |
seed,
|
| 50 |
randomize_seed,
|
| 51 |
width,
|
| 52 |
height,
|
| 53 |
num_inference_steps,
|
| 54 |
progress=gr.Progress(track_tqdm=True),
|
| 55 |
+
model='2k',
|
| 56 |
):
|
| 57 |
print("Using model:", model)
|
| 58 |
if model == "2k":
|
|
|
|
| 124 |
|
| 125 |
gr.Markdown("### Setting:")
|
| 126 |
|
| 127 |
+
# model = gr.Radio(
|
| 128 |
+
# label="Model",
|
| 129 |
+
# choices=[
|
| 130 |
+
# ("2K model", "2k"),
|
| 131 |
+
# ("4K model (beta)", "4k"),
|
| 132 |
+
# ],
|
| 133 |
+
# value="2k",
|
| 134 |
+
# )
|
| 135 |
|
| 136 |
with gr.Row():
|
| 137 |
width = gr.Slider(
|
|
|
|
| 176 |
fn=infer,
|
| 177 |
inputs=[
|
| 178 |
prompt,
|
| 179 |
+
# model,
|
| 180 |
seed,
|
| 181 |
randomize_seed,
|
| 182 |
width,
|