-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Separate inference 720p video with 24G VRAM #597
base: main
Are you sure you want to change the base?
Conversation
README.md
Outdated
### Separate Inference 720p video with 24G VRAM | ||
```bash | ||
# text to video | ||
./scripts/separate_inference.sh 4s 720p "9:16" "a beautiful waterfall" | ||
``` | ||
|
||
```bash | ||
# image to video | ||
./scripts/separate_inference.sh 4s 720p "9:16" "a beautiful waterfall. {\"reference_path\": \"path2reference.png\",\"mask_strategy\": \"0\"}"" | ||
``` | ||
|
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 am aware of your motivation, but can you add more doc to tell other users why, when and how to run inference separately so that they can feel more guided?
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.
Done.
scripts/separate_inference.sh
Outdated
|
||
set_default_params "$@" | ||
|
||
CUDA_VISIBLE_DEVICES=0,1 torchrun --nproc_per_node 2 --master_port=23456 scripts/separate_inference/inference_text_encoder.py configs/opensora-v1-2/inference/sample.py --aes 7 --num-frames "$num_frames" --resolution "$resolution" --aspect-ratio "$aspect_ratio" --prompt "$prompt" |
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.
This will by default use 2 GPUs, can you make this configurable via bash argument as well?
I tried you 24gb vram code @narrowsnap but im getting the issue on inference_stdit.py with caption_embs=caption_embs, caption_emb_masks=caption_emb_masks where fails with AttributeError: 'NoneType' object has no attribute 'encode' during inference. Rest of steps seams ok. |
Are you update the code of RFLOW?(opensora/schedulers/rf/__init__.py) |
Yes, i even tried git clone your fork, but no luck. This one right? |
This is wrong! You need to use feature/720p_for_16g branch. |
Sorry that is what i meant. Yes using from there: It gets: Also, many thanks for the quick replies, much appreaciated |
What is the command you used? |
From root on the fork, im just running: bash ./scripts/separate_inference.sh |
I can successfully run it. According to the error you showed, I suggest you check if there is caption_embs in your code.[opensora/schedulers/rf/init.py line 45] |
Made work:) solution was delete all the instalations and cond env and use only your fork to intall. After you said was working, i tried delete the rf/init and still got the same issue, so i think was some type of caching or something referecing to the original instalation. After all re-installs. Worked. many thanks for quick replies and help @narrowsnap Great work. |
Hi, is it possible to further squash VRAM usage to get it running on 12GB? :) |
Add VAE encoder for reference.
Reduce inference VRAM by separate process: