nv-tlabs / LION

Latent Point Diffusion Models for 3D Shape Generation
Other
735 stars 57 forks source link

available all-categories checkpoints? #62

Closed noahcao closed 5 months ago

noahcao commented 8 months ago

Hi @ZENGXH

i tried to run demo.py. with the default config and checkpoint files for chair category, it runs successfully:

# in demo.py
model_path = './lion_ckpt/text2shape/chair/checkpoints/model.pt'
model_config = './lion_ckpt/text2shape/chair/cfg.yml'

However, if I would like to use the all-categories files you provided as

# in demo.py
model_path = './lion_ckpt/unconditional/all55/checkpoints/epoch_7999_iters_1527999.pt'
model_config = './lion_ckpt/unconditional/all55/cfg.yml'

The files can't run, blocked by the error:

Traceback (most recent call last):
  File "/sensei-fs/users/jcao/git/LION/demo.py", line 33, in <module>
    lion.load_model(model_path)
  File "/sensei-fs/users/jcao/git/LION/models/lion.py", line 39, in load_model
    ckpt = torch.load(model_path)
  File "/opt/conda/envs/lion_new/lib/python3.10/site-packages/torch/serialization.py", line 789, in load
    return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
  File "/opt/conda/envs/lion_new/lib/python3.10/site-packages/torch/serialization.py", line 1131, in _load
    result = unpickler.load()
  File "/opt/conda/envs/lion_new/lib/python3.10/site-packages/torch/serialization.py", line 1124, in find_class
    return super().find_class(mod_name, name)
ModuleNotFoundError: No module named 'utils.yacs_config'

I can't spot how the error is raised, but given that it is originally tracked back to

File "/sensei-fs/users/jcao/git/LION/models/lion.py", line 39, in load_model
    ckpt = torch.load(model_path)

I assume there is something wrong with the provided checkpoint files.

Could you help to confirm this error and may I ask if there is any checkpoint files that are available for multi-category object shape generation instead of single-category ones? Thanks

noahcao commented 8 months ago

Similar to the discussion on slackoverflow, I assume that a lib called utils.yacs_config is used when you save the weights into the .pt files. However, I can't find a clue how to add the missing lib while loading the weights to work it around. This missing lib is probably third_party.yacs_config, but this makes no aligned hierarchy for importing.

dqj5182 commented 6 months ago

Same question

ZENGXH commented 6 months ago

Hi, I think this is because I move the file to different folder when I clean up the repo. I create the utils.yacs_config now. could you try again?

dqj5182 commented 6 months ago

Thanks! It worked for me!