arthur-qiu commited on
Commit
54a0da2
·
1 Parent(s): 71f226c
Files changed (1) hide show
  1. app.py +3 -2
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
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,7 +157,8 @@ 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 (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():
 
8
  from pipeline_freescale import StableDiffusionXLPipeline
9
  from free_lunch_utils import register_free_upblock2d, register_free_crossattn_upblock2d
10
 
11
+ @spaces.GPU(duration=30)
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 (under testing!!!): ', open=False):
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():