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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

add some script of lora test #66

wants to merge 14 commits into from

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

@@ -8,8 +8,8 @@ peft>=0.12.0
decord>=0.6.0
wandb
pandas
torch>=2.4.0
torchvision>=0.19.0
torch>=2.5.0
Copy link
Owner

Choose a reason for hiding this comment

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

I think this will not work at the moment because of the cuDNN errors: huggingface/diffusers#9704

Suggested change
torch>=2.5.0
torch<2.5.0

torch>=2.4.0
torchvision>=0.19.0
torch>=2.5.0
torchvision>=0.20.0
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
torchvision>=0.20.0
torchvision<0.20.0

Same reason as above

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