Spaces:
Runtime error
Runtime error
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
@@ -17,7 +17,6 @@ import shlex
|
|
17 |
import subprocess
|
18 |
import gradio as gr
|
19 |
from huggingface_hub import snapshot_download
|
20 |
-
from luciddreamer import LucidDreamer
|
21 |
|
22 |
|
23 |
root = pathlib.Path(__file__).parent
|
@@ -34,12 +33,12 @@ try:
|
|
34 |
import simple_knn
|
35 |
except ModuleNotFoundError:
|
36 |
subprocess.run(shlex.split('python setup.py install'), cwd=os.path.join(root, 'submodules', 'simple-knn'))
|
37 |
-
import simple_knn
|
38 |
try:
|
39 |
import depth_diff_gaussian_rasterization_min
|
40 |
except ModuleNotFoundError:
|
41 |
subprocess.run(shlex.split('python setup.py install'), cwd=os.path.join(root, 'submodules', 'depth-diff-gaussian-rasterization-min'))
|
42 |
-
|
|
|
43 |
|
44 |
|
45 |
css = """
|
@@ -51,6 +50,7 @@ css = """
|
|
51 |
|
52 |
ld = LucidDreamer()
|
53 |
|
|
|
54 |
with gr.Blocks(css=css) as demo:
|
55 |
|
56 |
gr.HTML(
|
@@ -103,6 +103,7 @@ with gr.Blocks(css=css) as demo:
|
|
103 |
model_name = gr.Radio(
|
104 |
label='SD checkpoint',
|
105 |
choices=['SD1.5 (default)', 'Blazing Drive V11m', 'Realistic Vision V5.1', 'RealCartoon-Pixar V5',],
|
|
|
106 |
)
|
107 |
|
108 |
prompt = gr.Textbox(
|
@@ -115,7 +116,8 @@ with gr.Blocks(css=css) as demo:
|
|
115 |
)
|
116 |
gen_camerapath = gr.Radio(
|
117 |
label='Camera trajectory for generation (STEP 1)',
|
118 |
-
choices=['
|
|
|
119 |
)
|
120 |
|
121 |
with gr.Row():
|
@@ -137,6 +139,7 @@ with gr.Blocks(css=css) as demo:
|
|
137 |
render_camerapath = gr.Radio(
|
138 |
label='Camera trajectory for rendering (STEP 2)',
|
139 |
choices=['back_and_forth', 'llff', 'headbanging'],
|
|
|
140 |
)
|
141 |
|
142 |
with gr.Column():
|
@@ -187,7 +190,7 @@ with gr.Blocks(css=css) as demo:
|
|
187 |
'dark messy room, noir style, indoors, bottle, shoe soles, jacket, cup, window, blurry, black footwear, depth of field, box, couch, table, gun, chair, foreshortening',
|
188 |
'photo frame, frame, boarder, simple color, inconsistent',
|
189 |
'lookaround',
|
190 |
-
|
191 |
25,
|
192 |
'back_and_forth',
|
193 |
'Blazing Drive V11m',
|
@@ -198,7 +201,7 @@ with gr.Blocks(css=css) as demo:
|
|
198 |
'Postapocalyptic city in desert',
|
199 |
'photo frame, frame, boarder, simple color, inconsistent, humans, people',
|
200 |
'lookaround',
|
201 |
-
|
202 |
25,
|
203 |
'back_and_forth',
|
204 |
'Blazing Drive V11m',
|
@@ -209,7 +212,7 @@ with gr.Blocks(css=css) as demo:
|
|
209 |
'a cozy livingroom',
|
210 |
'photo frame, frame, boarder, simple color, inconsistent, humans, people',
|
211 |
'lookaround',
|
212 |
-
|
213 |
25,
|
214 |
'back_and_forth',
|
215 |
'Realistic Vision V5.1',
|
@@ -220,7 +223,7 @@ with gr.Blocks(css=css) as demo:
|
|
220 |
'Cozy livingroom in christmas',
|
221 |
'photo frame, frame, boarder, simple color, inconsistent, humans, people',
|
222 |
'lookaround',
|
223 |
-
|
224 |
25,
|
225 |
'back_and_forth',
|
226 |
'Realistic Vision V5.1',
|
@@ -231,7 +234,7 @@ with gr.Blocks(css=css) as demo:
|
|
231 |
'serene deep forest',
|
232 |
'photo frame, frame, boarder, simple color, inconsistent, humans, people',
|
233 |
'lookaround',
|
234 |
-
|
235 |
25,
|
236 |
'back_and_forth',
|
237 |
'RealCartoon-Pixar V5',
|
@@ -291,4 +294,4 @@ with gr.Blocks(css=css) as demo:
|
|
291 |
|
292 |
|
293 |
if __name__ == '__main__':
|
294 |
-
demo.queue(max_size=20).launch(
|
|
|
17 |
import subprocess
|
18 |
import gradio as gr
|
19 |
from huggingface_hub import snapshot_download
|
|
|
20 |
|
21 |
|
22 |
root = pathlib.Path(__file__).parent
|
|
|
33 |
import simple_knn
|
34 |
except ModuleNotFoundError:
|
35 |
subprocess.run(shlex.split('python setup.py install'), cwd=os.path.join(root, 'submodules', 'simple-knn'))
|
|
|
36 |
try:
|
37 |
import depth_diff_gaussian_rasterization_min
|
38 |
except ModuleNotFoundError:
|
39 |
subprocess.run(shlex.split('python setup.py install'), cwd=os.path.join(root, 'submodules', 'depth-diff-gaussian-rasterization-min'))
|
40 |
+
|
41 |
+
from luciddreamer import LucidDreamer
|
42 |
|
43 |
|
44 |
css = """
|
|
|
50 |
|
51 |
ld = LucidDreamer()
|
52 |
|
53 |
+
|
54 |
with gr.Blocks(css=css) as demo:
|
55 |
|
56 |
gr.HTML(
|
|
|
103 |
model_name = gr.Radio(
|
104 |
label='SD checkpoint',
|
105 |
choices=['SD1.5 (default)', 'Blazing Drive V11m', 'Realistic Vision V5.1', 'RealCartoon-Pixar V5',],
|
106 |
+
value='SD1.5 (default)'
|
107 |
)
|
108 |
|
109 |
prompt = gr.Textbox(
|
|
|
116 |
)
|
117 |
gen_camerapath = gr.Radio(
|
118 |
label='Camera trajectory for generation (STEP 1)',
|
119 |
+
choices=['lookaround', 'lookdown', 'rotate360'],
|
120 |
+
value='lookaround',
|
121 |
)
|
122 |
|
123 |
with gr.Row():
|
|
|
139 |
render_camerapath = gr.Radio(
|
140 |
label='Camera trajectory for rendering (STEP 2)',
|
141 |
choices=['back_and_forth', 'llff', 'headbanging'],
|
142 |
+
value='llff',
|
143 |
)
|
144 |
|
145 |
with gr.Column():
|
|
|
190 |
'dark messy room, noir style, indoors, bottle, shoe soles, jacket, cup, window, blurry, black footwear, depth of field, box, couch, table, gun, chair, foreshortening',
|
191 |
'photo frame, frame, boarder, simple color, inconsistent',
|
192 |
'lookaround',
|
193 |
+
10,
|
194 |
25,
|
195 |
'back_and_forth',
|
196 |
'Blazing Drive V11m',
|
|
|
201 |
'Postapocalyptic city in desert',
|
202 |
'photo frame, frame, boarder, simple color, inconsistent, humans, people',
|
203 |
'lookaround',
|
204 |
+
4,
|
205 |
25,
|
206 |
'back_and_forth',
|
207 |
'Blazing Drive V11m',
|
|
|
212 |
'a cozy livingroom',
|
213 |
'photo frame, frame, boarder, simple color, inconsistent, humans, people',
|
214 |
'lookaround',
|
215 |
+
10,
|
216 |
25,
|
217 |
'back_and_forth',
|
218 |
'Realistic Vision V5.1',
|
|
|
223 |
'Cozy livingroom in christmas',
|
224 |
'photo frame, frame, boarder, simple color, inconsistent, humans, people',
|
225 |
'lookaround',
|
226 |
+
3,
|
227 |
25,
|
228 |
'back_and_forth',
|
229 |
'Realistic Vision V5.1',
|
|
|
234 |
'serene deep forest',
|
235 |
'photo frame, frame, boarder, simple color, inconsistent, humans, people',
|
236 |
'lookaround',
|
237 |
+
10,
|
238 |
25,
|
239 |
'back_and_forth',
|
240 |
'RealCartoon-Pixar V5',
|
|
|
294 |
|
295 |
|
296 |
if __name__ == '__main__':
|
297 |
+
demo.queue(max_size=20).launch()
|