Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ pipe = pipe.to(device)
|
|
14 |
pipe.scheduler = DPMSolverSinglestepScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
|
15 |
|
16 |
MAX_SEED = np.iinfo(np.int32).max
|
17 |
-
MAX_IMAGE_SIZE =
|
18 |
|
19 |
@spaces.GPU(duration=20,queue=False)
|
20 |
def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps):
|
@@ -82,18 +82,18 @@ with gr.Blocks() as demo:
|
|
82 |
|
83 |
width = gr.Slider(
|
84 |
label="Width",
|
85 |
-
minimum=
|
86 |
maximum=MAX_IMAGE_SIZE,
|
87 |
step=32,
|
88 |
-
value=
|
89 |
)
|
90 |
|
91 |
height = gr.Slider(
|
92 |
label="Height",
|
93 |
-
minimum=
|
94 |
maximum=MAX_IMAGE_SIZE,
|
95 |
step=32,
|
96 |
-
value=
|
97 |
)
|
98 |
|
99 |
with gr.Row():
|
|
|
14 |
pipe.scheduler = DPMSolverSinglestepScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
|
15 |
|
16 |
MAX_SEED = np.iinfo(np.int32).max
|
17 |
+
MAX_IMAGE_SIZE = 4096
|
18 |
|
19 |
@spaces.GPU(duration=20,queue=False)
|
20 |
def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps):
|
|
|
82 |
|
83 |
width = gr.Slider(
|
84 |
label="Width",
|
85 |
+
minimum=512,
|
86 |
maximum=MAX_IMAGE_SIZE,
|
87 |
step=32,
|
88 |
+
value=1024,
|
89 |
)
|
90 |
|
91 |
height = gr.Slider(
|
92 |
label="Height",
|
93 |
+
minimum=512,
|
94 |
maximum=MAX_IMAGE_SIZE,
|
95 |
step=32,
|
96 |
+
value=1024,
|
97 |
)
|
98 |
|
99 |
with gr.Row():
|