phillipinseoul commited on
Commit
12a81fb
1 Parent(s): 50b3741

delete images

Browse files
Files changed (2) hide show
  1. app.py +8 -1
  2. requirements.txt +1 -2
app.py CHANGED
@@ -2,6 +2,8 @@
2
  app.py
3
  An interactive demo for text-guided panorama generation.
4
  """
 
 
5
  import torch
6
  import gradio as gr
7
 
@@ -59,7 +61,7 @@ if __name__=="__main__":
59
  run_button = gr.Button(label="Generate")
60
 
61
  prompt = gr.Textbox(label="Text Prompt", value='a cinematic view of a castle in the sunset')
62
- width = gr.Slider(label="Width", minimum=512, maximum=4096, value=2048, step=128)
63
  sync_weight = gr.Slider(label="Sync Weight", minimum=0.0, maximum=30.0, value=20.0, step=5.0)
64
  sync_thres = gr.Slider(label="Sync Threshold (If N, apply SyncDiffusion for the first N steps)", minimum=0, maximum=15, value=5, step=1)
65
  seed = gr.Number(label="Seed", value=0)
@@ -75,6 +77,11 @@ if __name__=="__main__":
75
  ['a photo of a lake under the northern lights', 2048, 20.0, 5, 6]
76
  ],
77
  inputs=[prompt, width, sync_weight, sync_thres, seed],
 
 
 
 
 
78
  )
79
 
80
  ips = [prompt, width, sync_weight, sync_thres, seed]
 
2
  app.py
3
  An interactive demo for text-guided panorama generation.
4
  """
5
+ import os
6
+ from os.path import join
7
  import torch
8
  import gradio as gr
9
 
 
61
  run_button = gr.Button(label="Generate")
62
 
63
  prompt = gr.Textbox(label="Text Prompt", value='a cinematic view of a castle in the sunset')
64
+ width = gr.Slider(label="Width", minimum=512, maximum=3072, value=2048, step=128)
65
  sync_weight = gr.Slider(label="Sync Weight", minimum=0.0, maximum=30.0, value=20.0, step=5.0)
66
  sync_thres = gr.Slider(label="Sync Threshold (If N, apply SyncDiffusion for the first N steps)", minimum=0, maximum=15, value=5, step=1)
67
  seed = gr.Number(label="Seed", value=0)
 
77
  ['a photo of a lake under the northern lights', 2048, 20.0, 5, 6]
78
  ],
79
  inputs=[prompt, width, sync_weight, sync_thres, seed],
80
+ outputs=[
81
+ join(os.path.dirname(__file__), "assets", "result_castle_seed_1.png"),
82
+ join(os.path.dirname(__file__), "assets", "result_natural_seed_2.png"),
83
+ join(os.path.dirname(__file__), "assets", "result_northern_seed_6.png"),
84
+ ]
85
  )
86
 
87
  ips = [prompt, width, sync_weight, sync_thres, seed]
requirements.txt CHANGED
@@ -5,5 +5,4 @@ diffusers==0.15.1
5
  numpy==1.24.3
6
  lpips
7
  accelerate
8
- tqdm
9
- gradio
 
5
  numpy==1.24.3
6
  lpips
7
  accelerate
8
+ tqdm