Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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)
|
|
@@ -215,9 +215,9 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
|
|
| 215 |
#gr.Markdown("_Each change applies a fresh camera instruction to the last output image._")
|
| 216 |
|
| 217 |
inputs = [
|
| 218 |
-
image,
|
| 219 |
vertical_tilt, wideangle,
|
| 220 |
-
seed, randomize_seed, true_guidance_scale, num_inference_steps, height, width
|
| 221 |
]
|
| 222 |
outputs = [result, seed, prompt_preview]
|
| 223 |
|
|
@@ -240,7 +240,7 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
|
|
| 240 |
["metropolis.jpg", None, 0, 0, -1, True, 0, True, 1.0, 4, 816, 1024],
|
| 241 |
],
|
| 242 |
inputs=[
|
| 243 |
-
image,
|
| 244 |
vertical_tilt, wideangle,
|
| 245 |
seed, randomize_seed, true_guidance_scale, num_inference_steps, height, width
|
| 246 |
],
|
|
@@ -276,9 +276,9 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
|
|
| 276 |
return infer_camera_edit(*args)
|
| 277 |
|
| 278 |
control_inputs = [
|
| 279 |
-
image,
|
| 280 |
vertical_tilt, wideangle,
|
| 281 |
-
seed, randomize_seed, true_guidance_scale, num_inference_steps, height, width
|
| 282 |
]
|
| 283 |
control_inputs_with_flag = [is_reset] + control_inputs
|
| 284 |
|
|
|
|
| 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)
|
|
|
|
| 215 |
#gr.Markdown("_Each change applies a fresh camera instruction to the last output image._")
|
| 216 |
|
| 217 |
inputs = [
|
| 218 |
+
image, rotate_deg, move_forward,
|
| 219 |
vertical_tilt, wideangle,
|
| 220 |
+
seed, randomize_seed, true_guidance_scale, num_inference_steps, height, width, prev_output
|
| 221 |
]
|
| 222 |
outputs = [result, seed, prompt_preview]
|
| 223 |
|
|
|
|
| 240 |
["metropolis.jpg", None, 0, 0, -1, True, 0, True, 1.0, 4, 816, 1024],
|
| 241 |
],
|
| 242 |
inputs=[
|
| 243 |
+
image, rotate_deg, move_forward,
|
| 244 |
vertical_tilt, wideangle,
|
| 245 |
seed, randomize_seed, true_guidance_scale, num_inference_steps, height, width
|
| 246 |
],
|
|
|
|
| 276 |
return infer_camera_edit(*args)
|
| 277 |
|
| 278 |
control_inputs = [
|
| 279 |
+
image, rotate_deg, move_forward,
|
| 280 |
vertical_tilt, wideangle,
|
| 281 |
+
seed, randomize_seed, true_guidance_scale, num_inference_steps, height, width, prev_output
|
| 282 |
]
|
| 283 |
control_inputs_with_flag = [is_reset] + control_inputs
|
| 284 |
|