Spaces:
Running
on
Zero
Running
on
Zero
arthur-qiu
commited on
Commit
·
74ec4ec
1
Parent(s):
cf07c97
init
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from PIL import Image
|
|
8 |
from pipeline_freescale import StableDiffusionXLPipeline
|
9 |
from free_lunch_utils import register_free_upblock2d, register_free_crossattn_upblock2d
|
10 |
|
11 |
-
@spaces.GPU(duration=
|
12 |
def infer_gpu_part(pipe, seed, prompt, negative_prompt, ddim_steps, guidance_scale, resolutions_list, fast_mode, cosine_scale, disable_freeu):
|
13 |
pipe = pipe.to("cuda")
|
14 |
generator = torch.Generator(device='cuda')
|
@@ -157,8 +157,7 @@ with gr.Blocks(css=css) as demo:
|
|
157 |
prompt_in = gr.Textbox(label="Prompt", placeholder="A panda walking and munching bamboo in a bamboo forest.")
|
158 |
|
159 |
with gr.Row():
|
160 |
-
with gr.Accordion('FreeScale Parameters (
|
161 |
-
# with gr.Accordion('FreeScale Parameters (feel free to adjust these parameters based on your prompt): ', open=False):
|
162 |
with gr.Row():
|
163 |
output_size = gr.Dropdown(["2048 x 2048", "1024 x 2048", "2048 x 1024"], value="2048 x 2048", label="Output Size (H x W)", info="Due to GPU constraints, run the demo locally for higher resolutions.")
|
164 |
with gr.Row():
|
@@ -166,7 +165,7 @@ with gr.Blocks(css=css) as demo:
|
|
166 |
minimum=5,
|
167 |
maximum=200,
|
168 |
step=1,
|
169 |
-
value=
|
170 |
guidance_scale = gr.Slider(label='Guidance Scale',
|
171 |
minimum=1.0,
|
172 |
maximum=20.0,
|
|
|
8 |
from pipeline_freescale import StableDiffusionXLPipeline
|
9 |
from free_lunch_utils import register_free_upblock2d, register_free_crossattn_upblock2d
|
10 |
|
11 |
+
@spaces.GPU(duration=120)
|
12 |
def infer_gpu_part(pipe, seed, prompt, negative_prompt, ddim_steps, guidance_scale, resolutions_list, fast_mode, cosine_scale, disable_freeu):
|
13 |
pipe = pipe.to("cuda")
|
14 |
generator = torch.Generator(device='cuda')
|
|
|
157 |
prompt_in = gr.Textbox(label="Prompt", placeholder="A panda walking and munching bamboo in a bamboo forest.")
|
158 |
|
159 |
with gr.Row():
|
160 |
+
with gr.Accordion('FreeScale Parameters (feel free to adjust these parameters based on your prompt): ', open=False):
|
|
|
161 |
with gr.Row():
|
162 |
output_size = gr.Dropdown(["2048 x 2048", "1024 x 2048", "2048 x 1024"], value="2048 x 2048", label="Output Size (H x W)", info="Due to GPU constraints, run the demo locally for higher resolutions.")
|
163 |
with gr.Row():
|
|
|
165 |
minimum=5,
|
166 |
maximum=200,
|
167 |
step=1,
|
168 |
+
value=50)
|
169 |
guidance_scale = gr.Slider(label='Guidance Scale',
|
170 |
minimum=1.0,
|
171 |
maximum=20.0,
|