-
Notifications
You must be signed in to change notification settings - Fork 284
Add FramePack example #2341
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
Open
mengniwang95
wants to merge
12
commits into
master
Choose a base branch
from
mengni/framepack
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+587
−0
Open
Add FramePack example #2341
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5dba7d4
draft
bb1d465
fix bug and enhance script
mengniwang95 a0a80cf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b37f428
update script
mengniwang95 c657c0b
Update run_benchmark.sh
mengniwang95 a231251
Update run_benchmark.sh
mengniwang95 a9e9a38
Update run_benchmark.sh
mengniwang95 860fa37
Update autoround.py
mengniwang95 8a5d937
Update README.md
mengniwang95 27ff941
Update README.md
mengniwang95 a82a211
Update requirements.txt
mengniwang95 2cded63
Update run_benchmark.sh
mengniwang95 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
examples/pytorch/diffusion_model/diffusers/framepack/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # Step-by-Step | ||
|
|
||
| This example quantizes and validates the accuracy of Flux. | ||
|
|
||
| # Prerequisite | ||
|
|
||
| ## 1. Environment | ||
|
|
||
| ```shell | ||
| # install zip according to your system | ||
| sudo apt update && sudo apt install zip | ||
|
|
||
| pip install -r requirements.txt | ||
| pip install --update neural-compressor-pt | ||
| pip install --update auto-round | ||
| git clone --depth 1 https://github.com/lllyasviel/FramePack.git | ||
| cd FramePack | ||
| git fetch origin 97fe5dbe06ac1f337ece08935b1076a35eefeeb9 --depth=1 | ||
| git reset --hard FETCH_HEAD | ||
| cd .. | ||
| cp -r FramePack/diffusers_helper/ . | ||
|
|
||
| # several models will be downloaded automatically into HF_HOME | ||
| export HF_HOME=/path/to/save/model | ||
| ``` | ||
|
|
||
| ## 2. Prepare Dataset | ||
|
|
||
| ```shell | ||
| git clone --depth 1 https://github.com/Vchitect/VBench.git | ||
| cd VBench | ||
| git fetch origin 07bc8a4b74d5e0a23de42ed5880b899a1ff705f0 --depth=1 | ||
| git reset --hard FETCH_HEAD | ||
| sh vbench2_beta_i2v/download_data.sh | ||
| ``` | ||
|
|
||
| # Run | ||
|
|
||
| ## BF16 | ||
|
|
||
| ```bash | ||
| CUDA_VISIBLE_DEVICES=0,1 \ | ||
| bash run_benchmark.sh \ | ||
| --topology=BF16 \ | ||
| --dataset_location=/path/to/VBench \ | ||
| --output_video_path=bf16_video \ | ||
| --dimension_list="subject_consistency i2v_background" \ | ||
| --result_path=bf16_result | ||
| ``` | ||
|
|
||
| ## MXFP8 or FP8 | ||
|
|
||
| ```bash | ||
| CUDA_VISIBLE_DEVICES=0,1 \ | ||
| bash run_benchmark.sh \ | ||
| --topology=MXFP8 \ # or FP8 | ||
| --dataset_location=/path/to/VBench \ | ||
| --output_video_path=mxfp8_video \ | ||
| --dimension_list="subject_consistency i2v_background" \ | ||
| --result_path=mxfp8_result | ||
| ``` | ||
|
|
||
| - CUDA_VISIBLE_DEVICES: distribute the dimension_list to different visible GPUs to speed up the evaluation | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Can we freeze to a tag or commit?
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