gabsm commited on
Commit
9a2d082
1 Parent(s): 5cf522b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -45,6 +45,7 @@ def predict(
45
  prompt: str,
46
  negative_prompt: str,
47
  guidance_scale: float = 5.0,
 
48
  seed: int = 0,
49
  randomize_seed: bool = True,
50
  ):
@@ -55,6 +56,7 @@ def predict(
55
  height=512,
56
  negative_prompt=negative_prompt,
57
  guidance_scale=guidance_scale,
 
58
  generator=generator,
59
  num_inference_steps=50,
60
  ) # type: ignore
@@ -87,6 +89,9 @@ Model card: https://huggingface.co/Intel/ldm3d-pano<br>
87
  guidance_scale = gr.Slider(
88
  label="Guidance Scale", minimum=0, maximum=10, step=0.1, value=5.0
89
  )
 
 
 
90
  randomize_seed = gr.Checkbox(label="Randomize Seed", value=True)
91
  seed = gr.Slider(label="Seed", minimum=0,
92
  maximum=2**64 - 1, step=1)
@@ -101,15 +106,15 @@ Model card: https://huggingface.co/Intel/ldm3d-pano<br>
101
  depth = gr.Image(label="Depth Image", type="filepath")
102
  gr.Examples(
103
  examples=[
104
- ["360 view of a large bedroom", "", 7.0, 42, False]],
105
- inputs=[prompt, negative_prompt, guidance_scale, seed, randomize_seed],
106
  outputs=[rgb, depth, generated_seed, html],
107
  fn=predict,
108
  cache_examples=True)
109
 
110
  new_btn.click(
111
  fn=predict,
112
- inputs=[prompt, negative_prompt, guidance_scale, seed, randomize_seed],
113
  outputs=[rgb, depth, generated_seed, html],
114
  )
115
 
 
45
  prompt: str,
46
  negative_prompt: str,
47
  guidance_scale: float = 5.0,
48
+ ddim_steps: int = 50,
49
  seed: int = 0,
50
  randomize_seed: bool = True,
51
  ):
 
56
  height=512,
57
  negative_prompt=negative_prompt,
58
  guidance_scale=guidance_scale,
59
+ ddim_steps=ddim_steps,
60
  generator=generator,
61
  num_inference_steps=50,
62
  ) # type: ignore
 
89
  guidance_scale = gr.Slider(
90
  label="Guidance Scale", minimum=0, maximum=10, step=0.1, value=5.0
91
  )
92
+ ddim_steps = gr.Slider(
93
+ label="DDIM Steps", minimum=0, maximum=200, step=1, value=50
94
+ )
95
  randomize_seed = gr.Checkbox(label="Randomize Seed", value=True)
96
  seed = gr.Slider(label="Seed", minimum=0,
97
  maximum=2**64 - 1, step=1)
 
106
  depth = gr.Image(label="Depth Image", type="filepath")
107
  gr.Examples(
108
  examples=[
109
+ ["360 view of a large bedroom", "", 7.0, 50, 42, False]],
110
+ inputs=[prompt, negative_prompt, guidance_scale, ddim_steps, seed, randomize_seed],
111
  outputs=[rgb, depth, generated_seed, html],
112
  fn=predict,
113
  cache_examples=True)
114
 
115
  new_btn.click(
116
  fn=predict,
117
+ inputs=[prompt, negative_prompt, guidance_scale, ddim_steps, seed, randomize_seed],
118
  outputs=[rgb, depth, generated_seed, html],
119
  )
120