-
Notifications
You must be signed in to change notification settings - Fork 744
Improved installation and inference from python function (rather than CLI) #156
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
base: main
Are you sure you want to change the base?
Conversation
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols |
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.
Thanks for contributing to the package!
General comment:
Please use commit messages that match the regex pattern: .: [A-Z].
"einops", | ||
"timm", | ||
"imageio", | ||
"timm" |
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.
Please squash commit bd56660 into the first commit of the PR
frame_rate: int = 30 | ||
device: Optional[str] = None | ||
pipeline_config: str = "configs/ltxv-13b-0.9.7-dev.yaml" | ||
pipeline_config: str = str(CONFIG_PATH / "ltxv-13b-0.9.7-dev.yaml") |
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.
The default should be ltxv-13b-0.9.7-distilled.yaml
# create env | ||
python -m venv env | ||
source env/bin/activate | ||
python -m pip install -e .\[inference-script\] |
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.
Please fix the Readme to point to the new location of inference.py
src
, so thatpip install -e .
can be used (by updatingpyproject.toml
).from ltx_video.inference import infer
.def infer
signature the same defaults as argparse so that it can be used as a function from elsewhere.models_dir
argument exposed (so can be set to None and use hf default)src/ltx_video
so that it will be included with pip install. Path defaults to relative toinference.py
.Local install:
Or add as dependency to another package (in e.g.,
requirements.txt
):And run with:
from ltx_video.inference import infer infer(prompt="something")