ashawkey commited on
Commit
bab8ce7
1 Parent(s): 57322e1

download ckpt

Browse files
Files changed (1) hide show
  1. app.py +18 -2
app.py CHANGED
@@ -11,8 +11,12 @@ from safetensors.torch import load_file
11
  import rembg
12
  import gradio as gr
13
 
 
 
 
 
 
14
  os.system("pip install ./diff-gaussian-rasterization")
15
- from diff_gaussian_rasterization import GaussianRasterizer
16
 
17
  import kiui
18
  from kiui.op import recenter
@@ -29,7 +33,19 @@ IMAGENET_DEFAULT_STD = (0.229, 0.224, 0.225)
29
  GRADIO_VIDEO_PATH = 'gradio_output.mp4'
30
  GRADIO_PLY_PATH = 'gradio_output.ply'
31
 
32
- opt = tyro.cli(AllConfigs)
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
  # model
35
  model = LGM(opt)
 
11
  import rembg
12
  import gradio as gr
13
 
14
+ # download checkpoints
15
+ from huggingface_hub import hf_hub_download
16
+ ckpt_path = hf_hub_download(repo_id="ashawkey/LGM", filename="model_fp16.safetensors")
17
+
18
+ # NOTE: no -e... else it's not working!
19
  os.system("pip install ./diff-gaussian-rasterization")
 
20
 
21
  import kiui
22
  from kiui.op import recenter
 
33
  GRADIO_VIDEO_PATH = 'gradio_output.mp4'
34
  GRADIO_PLY_PATH = 'gradio_output.ply'
35
 
36
+ # opt = tyro.cli(AllConfigs)
37
+ opt = Options(
38
+ input_size=256,
39
+ up_channels=(1024, 1024, 512, 256, 128), # one more decoder
40
+ up_attention=(True, True, True, False, False),
41
+ splat_size=128,
42
+ output_size=512, # render & supervise Gaussians at a higher resolution.
43
+ batch_size=8,
44
+ num_views=8,
45
+ gradient_accumulation_steps=1,
46
+ mixed_precision='bf16',
47
+ resume=ckpt_path,
48
+ )
49
 
50
  # model
51
  model = LGM(opt)