Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import spaces
|
| 3 |
-
from gradio_litmodel3d import LitModel3D
|
| 4 |
import os
|
| 5 |
import shutil
|
| 6 |
os.environ['SPCONV_ALGO'] = 'native'
|
|
@@ -224,27 +223,9 @@ with gr.Blocks(delete_cache=(600, 600)) as demo:
|
|
| 224 |
with gr.Accordion(label="Generation Settings", open=False):
|
| 225 |
with gr.Tab(label="sketch-to-image generation"):
|
| 226 |
negative_prompt = gr.Textbox(label="Negative prompt")
|
| 227 |
-
num_steps = gr.Slider(
|
| 228 |
-
label="
|
| 229 |
-
|
| 230 |
-
maximum=20,
|
| 231 |
-
step=1,
|
| 232 |
-
value=8,
|
| 233 |
-
)
|
| 234 |
-
guidance_scale = gr.Slider(
|
| 235 |
-
label="Guidance scale",
|
| 236 |
-
minimum=0.1,
|
| 237 |
-
maximum=10.0,
|
| 238 |
-
step=0.1,
|
| 239 |
-
value=5,
|
| 240 |
-
)
|
| 241 |
-
controlnet_conditioning_scale = gr.Slider(
|
| 242 |
-
label="controlnet conditioning scale",
|
| 243 |
-
minimum=0.5,
|
| 244 |
-
maximum=5.0,
|
| 245 |
-
step=0.01,
|
| 246 |
-
value=0.85,
|
| 247 |
-
)
|
| 248 |
with gr.Tab(label="3D generation"):
|
| 249 |
seed = gr.Slider(0, MAX_SEED, label="Seed", value=0, step=1)
|
| 250 |
randomize_seed = gr.Checkbox(label="Randomize Seed", value=True)
|
|
@@ -265,7 +246,7 @@ with gr.Blocks(delete_cache=(600, 600)) as demo:
|
|
| 265 |
with gr.Column():
|
| 266 |
video_output = gr.Video(label="Generated 3D Asset", autoplay=True, loop=True, height=300)
|
| 267 |
image_prompt_processed = gr.Image(label="processed sketch", interactive=False, type="pil", height=512)
|
| 268 |
-
model_output =
|
| 269 |
with gr.Row():
|
| 270 |
download_glb = gr.DownloadButton(label="Download GLB", interactive=False)
|
| 271 |
download_gs = gr.DownloadButton(label="Download Gaussian", interactive=False)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import spaces
|
|
|
|
| 3 |
import os
|
| 4 |
import shutil
|
| 5 |
os.environ['SPCONV_ALGO'] = 'native'
|
|
|
|
| 223 |
with gr.Accordion(label="Generation Settings", open=False):
|
| 224 |
with gr.Tab(label="sketch-to-image generation"):
|
| 225 |
negative_prompt = gr.Textbox(label="Negative prompt")
|
| 226 |
+
num_steps = gr.Slider(1, 20, label="Number of steps", value=8, step=1)
|
| 227 |
+
guidance_scale = gr.Slider(0.1, 10.0, label="Guidance scale", value=5, step=0.1)
|
| 228 |
+
controlnet_conditioning_scale = gr.Slider(0.5, 5.0, label="controlnet conditioning scale", value=0.85, step=0.01)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 229 |
with gr.Tab(label="3D generation"):
|
| 230 |
seed = gr.Slider(0, MAX_SEED, label="Seed", value=0, step=1)
|
| 231 |
randomize_seed = gr.Checkbox(label="Randomize Seed", value=True)
|
|
|
|
| 246 |
with gr.Column():
|
| 247 |
video_output = gr.Video(label="Generated 3D Asset", autoplay=True, loop=True, height=300)
|
| 248 |
image_prompt_processed = gr.Image(label="processed sketch", interactive=False, type="pil", height=512)
|
| 249 |
+
model_output = gr.Model3D(label="Extracted GLB/Gaussian", height=300)
|
| 250 |
with gr.Row():
|
| 251 |
download_glb = gr.DownloadButton(label="Download GLB", interactive=False)
|
| 252 |
download_gs = gr.DownloadButton(label="Download Gaussian", interactive=False)
|