linoyts HF Staff commited on
Commit
fd2fd4d
·
verified ·
1 Parent(s): 78ef85d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -90,7 +90,6 @@ def build_camera_prompt(rotate_deg, move_forward, vertical_tilt, wideangle):
90
  @spaces.GPU
91
  def infer_camera_edit(
92
  image,
93
- prev_output,
94
  rotate_deg,
95
  move_forward,
96
  vertical_tilt,
@@ -101,6 +100,7 @@ def infer_camera_edit(
101
  num_inference_steps,
102
  height,
103
  width,
 
104
  progress=gr.Progress(track_tqdm=True)
105
  ):
106
  prompt = build_camera_prompt(rotate_deg, move_forward, vertical_tilt, wideangle)
@@ -213,9 +213,9 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
213
  #gr.Markdown("_Each change applies a fresh camera instruction to the last output image._")
214
 
215
  inputs = [
216
- image, prev_output, rotate_deg, move_forward,
217
  vertical_tilt, wideangle,
218
- seed, randomize_seed, true_guidance_scale, num_inference_steps, height, width
219
  ]
220
  outputs = [result, seed, prompt_preview]
221
 
@@ -233,9 +233,9 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
233
  # Examples
234
  gr.Examples(
235
  examples=[
236
- ["tool_of_the_sea.png", "", 45, 0, 0, False, 0, True, 1.0, 4, 568, 1024],
237
- ["monkey.jpg", "", -45, 5, 0, False, 0, True, 1.0, 4, 704, 1024],
238
- ["metropolis.jpg", "", 0, 0, -1, True, 0, True, 1.0, 4, 816, 1024],
239
  ],
240
  inputs=inputs,
241
  outputs=outputs,
@@ -270,9 +270,9 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
270
  return infer_camera_edit(*args)
271
 
272
  control_inputs = [
273
- image, prev_output, rotate_deg, move_forward,
274
  vertical_tilt, wideangle,
275
- seed, randomize_seed, true_guidance_scale, num_inference_steps, height, width
276
  ]
277
  control_inputs_with_flag = [is_reset] + control_inputs
278
 
 
90
  @spaces.GPU
91
  def infer_camera_edit(
92
  image,
 
93
  rotate_deg,
94
  move_forward,
95
  vertical_tilt,
 
100
  num_inference_steps,
101
  height,
102
  width,
103
+ prev_output = None,
104
  progress=gr.Progress(track_tqdm=True)
105
  ):
106
  prompt = build_camera_prompt(rotate_deg, move_forward, vertical_tilt, wideangle)
 
213
  #gr.Markdown("_Each change applies a fresh camera instruction to the last output image._")
214
 
215
  inputs = [
216
+ image,rotate_deg, move_forward,
217
  vertical_tilt, wideangle,
218
+ seed, randomize_seed, true_guidance_scale, num_inference_steps, height, width, prev_output
219
  ]
220
  outputs = [result, seed, prompt_preview]
221
 
 
233
  # Examples
234
  gr.Examples(
235
  examples=[
236
+ ["tool_of_the_sea.png", 45, 0, 0, False, 0, True, 1.0, 4, 568, 1024],
237
+ ["monkey.jpg", -45, 5, 0, False, 0, True, 1.0, 4, 704, 1024],
238
+ ["metropolis.jpg", 0, 0, -1, True, 0, True, 1.0, 4, 816, 1024],
239
  ],
240
  inputs=inputs,
241
  outputs=outputs,
 
270
  return infer_camera_edit(*args)
271
 
272
  control_inputs = [
273
+ image, rotate_deg, move_forward,
274
  vertical_tilt, wideangle,
275
+ seed, randomize_seed, true_guidance_scale, num_inference_steps, height, width, prev_output
276
  ]
277
  control_inputs_with_flag = [is_reset] + control_inputs
278