3DTopia / OpenLRM

An open-source impl. of Large Reconstruction Models
Apache License 2.0
976 stars 56 forks source link

question about inference #23

Closed Biggaoga closed 8 months ago

Biggaoga commented 8 months ago

hello! when I run python -m openlrm.launch infer.lrm --infer "./configs/infer-b.yaml" model_name="zxhezexin/openlrm-mix-base-1.1" image_input="./assets/sample_input/owl.png" export_video=true export_mesh=trueas the example did , it failed, error message: Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/data1/ubu/OpenLRM/openlrm/launch.py", line 36, in main() File "/data1/ubu/OpenLRM/openlrm/launch.py", line 31, in main with RunnerClass() as runner: ^^^^^^^^^^^^^ File "/data1/ubu/OpenLRM/openlrm/runners/infer/lrm.py", line 121, in init self.model = self._build_model(self.cfg).to(self.device) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data1/ubu/OpenLRM/openlrm/runners/infer/lrm.py", line 126, in _build_model model = hf_model_cls.from_pretrained(cfg.model_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubu/anaconda3/envs/lrm/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, kwargs) ^^^^^^^^^^^^^^^^^^^ File "/home/ubu/anaconda3/envs/lrm/lib/python3.11/site-packages/huggingface_hub/hub_mixin.py", line 277, in from_pretrained instance = cls._from_pretrained( ^^^^^^^^^^^^^^^^^^^^^ File "/home/ubu/anaconda3/envs/lrm/lib/python3.11/site-packages/huggingface_hub/hub_mixin.py", line 485, in _from_pretrained model = cls(model_kwargs) ^^^^^^^^^^^^^^^^^^^ TypeError: wrap_model_hub..HfModel.init() missing 1 required positional argument: 'config'

my environment python=3.11 torch=2.1.2 cuda=11.8 Is there anything wrong with my operation?

ZexinHe commented 8 months ago

Hi,

The huggingface_hub utilities should load from config.json file under zxhezexin/openlrm-mix-base-1.1. Could you plz check your local cache dir for this model and see if there is a config.json? It looks like an incomplete download but needs a double check. E.g. ~/.cache/huggingface/hub/models--zxhezexin--openlrm-mix-base-1.1/snapshots/a1fcb5574050fe4dfbaa01dd1fd0425b2fbca837/config.json.

Biggaoga commented 8 months ago

Yes, config.jsonfile missed and I download model manually, now it works!