Update app.py
Browse files
app.py
CHANGED
|
@@ -122,7 +122,7 @@ def infer_camera_edit(
|
|
| 122 |
width = (width // 8) * 8
|
| 123 |
|
| 124 |
# Limit max resolution to prevent OOM
|
| 125 |
-
max_dim =
|
| 126 |
if height > max_dim or width > max_dim:
|
| 127 |
scale = max_dim / max(height, width)
|
| 128 |
height = int(height * scale)
|
|
@@ -1101,8 +1101,8 @@ with gr.Blocks() as demo:
|
|
| 1101 |
randomize_seed = gr.Checkbox(label="π Randomize Seed", value=True)
|
| 1102 |
|
| 1103 |
with gr.Row():
|
| 1104 |
-
width = gr.Slider(label="π Width", minimum=256, maximum=
|
| 1105 |
-
height = gr.Slider(label="π Height", minimum=256, maximum=
|
| 1106 |
|
| 1107 |
# Footer
|
| 1108 |
gr.HTML("""
|
|
|
|
| 122 |
width = (width // 8) * 8
|
| 123 |
|
| 124 |
# Limit max resolution to prevent OOM
|
| 125 |
+
max_dim = 2048
|
| 126 |
if height > max_dim or width > max_dim:
|
| 127 |
scale = max_dim / max(height, width)
|
| 128 |
height = int(height * scale)
|
|
|
|
| 1101 |
randomize_seed = gr.Checkbox(label="π Randomize Seed", value=True)
|
| 1102 |
|
| 1103 |
with gr.Row():
|
| 1104 |
+
width = gr.Slider(label="π Width", minimum=256, maximum=2048, step=8, value=768)
|
| 1105 |
+
height = gr.Slider(label="π Height", minimum=256, maximum=2048, step=8, value=768)
|
| 1106 |
|
| 1107 |
# Footer
|
| 1108 |
gr.HTML("""
|