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

opensora/utils/ckpt_utils.py does not have OpenSora 1.1 in pretrained_models #322

Closed
boringlee24 opened this issue Apr 25, 2024 · 4 comments
Labels

Comments

@boringlee24
Copy link

How do we specify the --ckpt-path argument to run the inference script for opensora 1.1?

@FangGet
Copy link

FangGet commented Apr 26, 2024

for all who want to load opensora 1.1 model, please just add the following lines into

print(f"Unexpected keys: {unexpected_keys}")

elif ckpt_path.endswith(".safetensors"):
    from safetensors.torch import load_file
    state_dict = load_file(ckpt_path)
    missing_keys, unexpected_keys = model.load_state_dict(state_dict, strict=False)
    print(f"Missing keys: {missing_keys}")
    print(f"Unexpected keys: {unexpected_keys}")

@boringlee24
Copy link
Author

for all who want to load opensora 1.1 model, please just add the following lines into

print(f"Unexpected keys: {unexpected_keys}")

elif ckpt_path.endswith(".safetensors"):
    from safetensors.torch import load_file
    state_dict = load_file(ckpt_path)
    missing_keys, unexpected_keys = model.load_state_dict(state_dict, strict=False)
    print(f"Missing keys: {missing_keys}")
    print(f"Unexpected keys: {unexpected_keys}")

Thank you, works now

Copy link

github-actions bot commented May 4, 2024

This issue is stale because it has been open for 7 days with no activity.

@github-actions github-actions bot added the stale label May 4, 2024
@zhengzangw
Copy link
Collaborator

We have added now.

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

No branches or pull requests

3 participants