ironjr commited on
Commit
1cf8b36
1 Parent(s): 186c7d4

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -13,6 +13,8 @@
13
  import os
14
  import time
15
  import pathlib
 
 
16
  import gradio as gr
17
  from huggingface_hub import snapshot_download
18
  from luciddreamer import LucidDreamer
@@ -28,6 +30,17 @@ if not CHECKPOINTS_PATH.exists():
28
  snapshot_download(repo_id="ironjr/RealisticVisionV5-1", repo_type="model", local_dir=os.path.join(ckpt_root, 'Realistic Vision V5.1'))
29
  snapshot_download(repo_id="runwayml/stable-diffusion-inpainting", repo_type="model", local_dir=os.path.join(ckpt_root, 'SD1-5'))
30
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
  css = """
33
  #run-button {
 
13
  import os
14
  import time
15
  import pathlib
16
+ import shlex
17
+ import subprocess
18
  import gradio as gr
19
  from huggingface_hub import snapshot_download
20
  from luciddreamer import LucidDreamer
 
30
  snapshot_download(repo_id="ironjr/RealisticVisionV5-1", repo_type="model", local_dir=os.path.join(ckpt_root, 'Realistic Vision V5.1'))
31
  snapshot_download(repo_id="runwayml/stable-diffusion-inpainting", repo_type="model", local_dir=os.path.join(ckpt_root, 'SD1-5'))
32
 
33
+ 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
+ import depth_diff_gaussian_rasterization_min
43
+
44
 
45
  css = """
46
  #run-button {