Spaces:
Running
on
Zero
Running
on
Zero
update
Browse files- __pycache__/viewcrafter.cpython-39.pyc +0 -0
- app.py +15 -2
- requirements.txt +2 -1
__pycache__/viewcrafter.cpython-39.pyc
CHANGED
Binary files a/__pycache__/viewcrafter.cpython-39.pyc and b/__pycache__/viewcrafter.cpython-39.pyc differ
|
|
app.py
CHANGED
@@ -1,11 +1,16 @@
|
|
1 |
import os
|
|
|
|
|
|
|
|
|
|
|
2 |
import sys
|
3 |
import gradio as gr
|
4 |
import random
|
5 |
from viewcrafter import ViewCrafter
|
6 |
from configs.infer_config import get_parser
|
7 |
import torch
|
8 |
-
|
9 |
|
10 |
i2v_examples = [
|
11 |
['test/images/boy.png', 0, 1.0, '0 40', '0 0', '0 0', 50, 123],
|
@@ -17,9 +22,17 @@ i2v_examples = [
|
|
17 |
|
18 |
max_seed = 2 ** 31
|
19 |
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
|
|
|
23 |
|
24 |
def viewcrafter_demo(opts):
|
25 |
css = """#input_img {max-width: 1024px !important} #output_vid {max-width: 1024px; max-height:576px} #random_button {max-width: 100px !important}"""
|
|
|
1 |
import os
|
2 |
+
os.system('wget https://anaconda.org/pytorch3d/pytorch3d/0.7.7/download/linux-64/pytorch3d-0.7.7-py39_cu117_pyt200.tar.bz2')
|
3 |
+
os.system('conda install pytorch3d-0.7.7-py39_cu117_pyt200.tar.bz2')
|
4 |
+
os.system('rm -r pytorch3d-0.7.7-py39_cu117_pyt200.tar.bz2')
|
5 |
+
os.system('wget https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth -P checkpoints/')
|
6 |
+
|
7 |
import sys
|
8 |
import gradio as gr
|
9 |
import random
|
10 |
from viewcrafter import ViewCrafter
|
11 |
from configs.infer_config import get_parser
|
12 |
import torch
|
13 |
+
from huggingface_hub import hf_hub_download
|
14 |
|
15 |
i2v_examples = [
|
16 |
['test/images/boy.png', 0, 1.0, '0 40', '0 0', '0 0', 50, 123],
|
|
|
22 |
|
23 |
max_seed = 2 ** 31
|
24 |
|
25 |
+
def download_model():
|
26 |
+
REPO_ID = 'Drexubery/ViewCrafter_25'
|
27 |
+
filename_list = ['model.ckpt']
|
28 |
+
for filename in filename_list:
|
29 |
+
local_file = os.path.join('./checkpoints/', filename)
|
30 |
+
if not os.path.exists(local_file):
|
31 |
+
hf_hub_download(repo_id=REPO_ID, filename=filename, local_dir='./checkpoints/', force_download=True)
|
32 |
+
|
33 |
|
34 |
|
35 |
+
download_model()
|
36 |
|
37 |
def viewcrafter_demo(opts):
|
38 |
css = """#input_img {max-width: 1024px !important} #output_vid {max-width: 1024px; max-height:576px} #random_button {max-width: 100px !important}"""
|
requirements.txt
CHANGED
@@ -38,4 +38,5 @@ Pygments==2.18.0
|
|
38 |
starlette==0.38.2
|
39 |
tifffile==2024.8.24
|
40 |
yarl==1.9.4
|
41 |
-
spaces
|
|
|
|
38 |
starlette==0.38.2
|
39 |
tifffile==2024.8.24
|
40 |
yarl==1.9.4
|
41 |
+
spaces
|
42 |
+
huggingface_hub
|