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

[WIP] Fix model loading collate_fn non-static #1990

Merged
merged 6 commits into from
May 29, 2023
Merged

Conversation

jkulhanek
Copy link
Contributor

After fixing typing errors #1944 I believe there as a bug introduced which prevents trained checkpoints to be loaded.

Similar issue here:
pydantic/pydantic#1596

Can anyone please confirm that loading of trained checkpoints is broken and this PR fixes it?

@tancik
Copy link
Contributor

tancik commented May 24, 2023

Hmm, Im able to load checkpoints.

Train for 2k iters
ns-train nerfacto --data data/nerfstudio/test/

Load checkpoint
ns-train nerfacto --data data/nerfstudio/test/ --load-dir outputs/test/nerfacto/2023-05-24_104341/nerfstudio_models/step-000002000.ckpt

@jkulhanek jkulhanek changed the title Fix model loading collate_fn non-static [WIP] Fix model loading collate_fn non-static May 24, 2023
@machenmusik
Copy link
Contributor

Do you mean loading of checkpoints trained previously to #1944 (specifically)? At some past point / date?

@jkulhanek
Copy link
Contributor Author

I believe the error happens when you load pre 0.3.0 checkpoint in >=0.3.0 nerfstudio.
I will verify it.

@jkulhanek
Copy link
Contributor Author

Yes, you can reproduce the error if you remove the collate_fn field manually from config.json:
image

@jkulhanek
Copy link
Contributor Author

What I suggested here is also not good. I don't think collate_fn gets registered as a field now.

@jkulhanek
Copy link
Contributor Author

jkulhanek commented May 24, 2023

Do you think it is worth fixing?

Copy link
Contributor

@tancik tancik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jkulhanek jkulhanek enabled auto-merge (squash) May 29, 2023 07:50
@jkulhanek jkulhanek merged commit a0d5307 into main May 29, 2023
4 checks passed
@jkulhanek jkulhanek deleted the jkulhanek/fix-model-load branch May 29, 2023 07:56
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

Successfully merging this pull request may close these issues.

None yet

3 participants