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

small model backbone #28

Open
gc625-kodifly opened this issue Apr 10, 2024 · 4 comments
Open

small model backbone #28

gc625-kodifly opened this issue Apr 10, 2024 · 4 comments

Comments

@gc625-kodifly
Copy link

Hi, I've modified the code to load a DinoV2 small model, but i realized that the embed_dim of the vit_small model

def vit_small(patch_size=16, **kwargs):
    model = DinoVisionTransformer(
        patch_size=patch_size,
        embed_dim=384,
        depth=12,
        num_heads=6,
        mlp_ratio=4,
        block_fn=partial(Block, attn_class=MemEffAttention),
        **kwargs,
    )
    return model

is 384, which is causing dimension mismatch problem with the RoMa ckpt provided. which assumes that the embed_dim is 1024. e.g.

 proj16 = nn.Sequential(nn.Conv2d(1024, 512, 1, 1), nn.BatchNorm2d(512))

can you provide the weights for RoMa-s? As the model takes ~6GB vram even after applying the change from kde to approx_kde in #23, so being able to use a small model would help a lot

@Parskatt
Copy link
Owner

Sorry don't have it. I'll try training one (also with vit base).

@gc625-kodifly
Copy link
Author

please do :) that would be really helpful. Looking forward to the results!

@Dawars
Copy link
Contributor

Dawars commented Apr 15, 2024

@Parskatt Could you also train one using FeatUp? Would it be possible to get higher resolution outputs?

https://github.com/mhamilton723/FeatUp

@Parskatt
Copy link
Owner

@Dawars I'm not convinced that FeatUp is useful. Would be glad to be proven wrong, but not something I'll spend time on currently.

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

3 participants