NIRVANALAN commited on
Commit
3791ac5
β€’
1 Parent(s): 96737f5
Files changed (3) hide show
  1. app.py +21 -0
  2. nsr/train_util_diffusion.py +3 -2
  3. requirements.txt +2 -0
app.py CHANGED
@@ -241,6 +241,27 @@ def main(args):
241
  image = resize_to_224(image)
242
  return image
243
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
 
245
  with gr.Blocks(css=css) as demo:
246
  gr.Markdown(
 
241
  image = resize_to_224(image)
242
  return image
243
 
244
+ _CITE_ = r"""
245
+ If LN3Diff is helpful, please help to ⭐ the
246
+ <a href='https://github.com/NIRVANALAN/LN3Diff/' target='_blank'>Github Repo</a>. Thanks! [![GitHub Stars](https://img.shields.io/github/stars/NIRVANALAN/LN3Diff?style=social)](https://github.com/NIRVANALAN/LN3Diff/)
247
+ ---
248
+ πŸ“ **Citation**
249
+ If you find our work useful for your research or applications, please cite using this bibtex:
250
+ ```bibtex
251
+ @inproceedings{lan2024ln3diff,
252
+ title={LN3Diff: Scalable Latent Neural Fields Diffusion for Speedy 3D Generation},
253
+ author={Yushi Lan and Fangzhou Hong and Shuai Yang and Shangchen Zhou and Xuyi Meng and Bo Dai and Xingang Pan and Chen Change Loy},
254
+ year={2024},
255
+ booktitle={ECCV},
256
+ }
257
+ ```
258
+ πŸ“‹ **License**
259
+ S-Lab 1.0 LICENSE. Please refer to the [LICENSE file](https://github.com/NIRVANALAN/LN3Diff/blob/main/LICENSE) for details.
260
+ πŸ“§ **Contact**
261
+ If you have any questions, feel free to open a discussion or contact us at <b>lanyushi15@gmail.com</b>.
262
+ """
263
+
264
+
265
 
266
  with gr.Blocks(css=css) as demo:
267
  gr.Markdown(
nsr/train_util_diffusion.py CHANGED
@@ -31,6 +31,9 @@ from guided_diffusion.train_util import (TrainLoop, calc_average_loss,
31
  log_rec3d_loss_dict,
32
  parse_resume_step_from_filename)
33
 
 
 
 
34
  import dnnlib
35
  from safetensors.torch import load_file
36
  from huggingface_hub import hf_hub_download
@@ -196,8 +199,6 @@ class TrainLoopDiffusionWithRec(TrainLoop):
196
  # if True:
197
  mesh_size = 192 # avoid OOM on V100
198
  mesh_thres = 10 # TODO, requires tuning
199
- import mcubes
200
- import trimesh
201
  dump_path = f'{logger.get_dir()}/mesh/'
202
 
203
  os.makedirs(dump_path, exist_ok=True)
 
31
  log_rec3d_loss_dict,
32
  parse_resume_step_from_filename)
33
 
34
+
35
+ import mcubes
36
+ import trimesh
37
  import dnnlib
38
  from safetensors.torch import load_file
39
  from huggingface_hub import hf_hub_download
 
199
  # if True:
200
  mesh_size = 192 # avoid OOM on V100
201
  mesh_thres = 10 # TODO, requires tuning
 
 
202
  dump_path = f'{logger.get_dir()}/mesh/'
203
 
204
  os.makedirs(dump_path, exist_ok=True)
requirements.txt CHANGED
@@ -30,3 +30,5 @@ rembg
30
  safetensors
31
  matplotlib
32
  git+https://github.com/nupurkmr9/vision-aided-gan
 
 
 
30
  safetensors
31
  matplotlib
32
  git+https://github.com/nupurkmr9/vision-aided-gan
33
+ PyMCubes
34
+ trimesh