-
Notifications
You must be signed in to change notification settings - Fork 102
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
Conversation
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
tests/test_lora_inference.py
Outdated
|
||
|
||
def generate_video(prompt, lora_path, lora_name, output_file, fps): | ||
pipe = CogVideoXPipeline.from_pretrained("THUDM/CogVideoX-5b", torch_dtype=torch.bfloat16).to("cuda") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
tests/test_lora_inference.py
Outdated
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this 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?
There was a problem hiding this 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
No description provided.