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

add some script of lora test #66

Merged
merged 16 commits into from
Oct 30, 2024
Merged

add some script of lora test #66

merged 16 commits into from
Oct 30, 2024

Conversation

zRzRzRzRzRzRzR
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Neat!



def generate_video(prompt, lora_path, lora_name, output_file, fps):
pipe = CogVideoXPipeline.from_pretrained("THUDM/CogVideoX-5b", torch_dtype=torch.bfloat16).to("cuda")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this should be supplied too, no? What if someone used the 2B variant?

Copy link
Collaborator Author

@zRzRzRzRzRzRzR zRzRzRzRzRzRzR Oct 25, 2024

Choose a reason for hiding this comment

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

Yes, I can turn the model ID into a variable and then add it in.

Run this test in Lora adpater checking:

```shell
python3 test_lora_inference.py --prompt "Your prompt" --lora_path "path/to/lora" --lora_name "lora_adapter" --output_file "output.mp4" --fps 8
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we use a working command as an example here?

Path to LoRA can either be local or a Hub id.

Copy link
Collaborator

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

LGTM! @a-r-r-o-w WDYT?

Copy link
Owner

@a-r-r-o-w a-r-r-o-w left a comment

Choose a reason for hiding this comment

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

Looks good, but I think versions will create a problem currently until pytorch releases 2.5.1

@a-r-r-o-w a-r-r-o-w merged commit cbbac06 into main Oct 30, 2024
@a-r-r-o-w a-r-r-o-w deleted the zR-dev branch October 30, 2024 10:55
@a-r-r-o-w a-r-r-o-w restored the zR-dev branch October 30, 2024 10:55
@sayakpaul sayakpaul deleted the zR-dev branch December 20, 2024 04:51
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.

3 participants