microsoft / microsoft/TRELLIS.2

WSL 2 -> AttributeError: 'DINOv3ViTModel' object has no attribute 'layer'

Open
#147 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
11.3k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

I'm using Ubuntu on WSL 2 under Windows 11, managed to pass the gated models issue but now I hit this error when running the example.py file:

~/TRELLIS.2$ python example.py
[SPARSE] Conv backend: flex_gemm; Attention backend: flash_attn
[ATTENTION] Using backend: flash_attn
Loading weights: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 415/415 [00:00<00:00, 3895.83it/s]
Loading weights: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 754/754 [00:00<00:00, 3714.00it/s]
Traceback (most recent call last):
  File "/home/vl4dt/TRELLIS.2/example.py", line 25, in <module>
    mesh = pipeline.run(image)[0]
  File "/home/vl4dt/miniforge3/envs/trellis2/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "/home/vl4dt/TRELLIS.2/trellis2/pipelines/trellis2_image_to_3d.py", line 539, in run
    cond_512 = self.get_cond([image], 512)
  File "/home/vl4dt/TRELLIS.2/trellis2/pipelines/trellis2_image_to_3d.py", line 177, in get_cond
    cond = self.image_cond_model(image)
  File "/home/vl4dt/miniforge3/envs/trellis2/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "/home/vl4dt/TRELLIS.2/trellis2/modules/image_feature_extractor.py", line 117, in __call__
    features = self.extract_features(image)
  File "/home/vl4dt/TRELLIS.2/trellis2/modules/image_feature_extractor.py", line 86, in extract_features
    for i, layer_module in enumerate(self.model.layer):
  File "/home/vl4dt/miniforge3/envs/trellis2/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1928, in __getattr__
    raise AttributeError(
AttributeError: 'DINOv3ViTModel' object has no attribute 'layer'

Tried downgraded the transformers library but ran into other issues, I'm at a loss here.

pip-freeze.txt

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with python example.py, then inspect trellis2/modules/image_feature_extractor.py, especially extract_features, and the call path in trellis2/pipelines/trellis2_image_to_3d.py. Compare the loaded DINOv3ViTModel with the access shown in the traceback and verify that example.py completes without this AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.