Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't initiate the VitMatte model #17

Open
musja007 opened this issue Nov 20, 2023 · 1 comment
Open

Can't initiate the VitMatte model #17

musja007 opened this issue Nov 20, 2023 · 1 comment

Comments

@musja007
Copy link

musja007 commented Nov 20, 2023

Hi all!

I'm trying to run the matte_anything.py in Google Collab but get the following error:


`Initializing models... Please wait...

AssertionError                            Traceback (most recent call last)

[<ipython-input-8-a4065ac3ce58>](https://localhost:8080/#) in <cell line: 30>()
     28 print('Initializing models... Please wait...')
     29 
---> 30 vitmatte = init_vitmatte(vitmatte_model)

4 frames

[/content/Matte-Anything/modeling/decoder/detail_capture.py](https://localhost:8080/#) in __init__(self, in_chans, img_chans, convstream_out, fusion_out)
    110     ):
    111         super().__init__()
--> 112         assert len(fusion_out) == len(convstream_out) + 1
    113 
    114         self.convstream = ConvStream(in_chans = img_chans)

AssertionError:`

My initial thought was that it is related to the torch version, so I made sure I have a correct one: 2.0.0+cu117, but the error still persists.

Thanks in advance!

@YeL6
Copy link
Collaborator

YeL6 commented Nov 22, 2023

Thank you for your interest in our work! We appreciate your question!

I have reproduced your question and updated the MatteAnything/modeling/decoder/detail_capture.py files to fix the bug.

You can check in the new commit and update your code, I hope this works for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants