-
Notifications
You must be signed in to change notification settings - Fork 360
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 negative prompts feature for txt2img pipeline #75
Merged
antinucleon
merged 1 commit into
facebookincubator:main
from
yubozhao:add-negative-prompt
Nov 12, 2022
Merged
Add negative prompts feature for txt2img pipeline #75
antinucleon
merged 1 commit into
facebookincubator:main
from
yubozhao:add-negative-prompt
Nov 12, 2022
Conversation
This file contains 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
Add optional negative prompt option for txt2img pipeline
antinucleon
approved these changes
Nov 12, 2022
terrychenism
approved these changes
Nov 12, 2022
Thanks for the contribution! |
carlushuang
referenced
this pull request
in ROCm/AITemplate
Nov 28, 2022
* updated to 5th stable diffusion checkpoint (#57) * updated to 5th stable diffusion checkpoint * updated all stable diffusion example files to checkpoint v1.5 * Support different sizes via recompilation (StableDiff demo) (#71) Mostly, this commit is just re-establishing the relationship between various previously-hardcoded constants and the target image size (since the latent size is 1/8 of the image size, hardcoding the latent sizes is inconvenient). This adds `--width` and `--height` options to both compile.py and demo.py, and provided these both match you can process different sizes. For img2img mode, the size options passed at compile time must match the size of the actual input image. Consequently, the `--img2img` flag for `compile.py` no longer exists: all this ever did was change the hardcoded size to match the default input image used by `demo_img2img.py`. Yikes. Sooo it's slightly more flexible than before, but still has no support for a single binary to handle different image sizes. It isn't super clear that compiling a generic binary is useful: the upstream project can do that just fine: isn't the whole point of AITemplates to achieve performance gains via aggressive constant propagation and benchmarking to select the optimal kernels? * v0.1.1 (#74) * v0.11 * update cutlass * fix * add missing files * patch cutlass Co-authored-by: Bing Xu <bingxu@fb.com> * fix sm86 conv (#81) Co-authored-by: Bing Xu <bingxu@fb.com> * fix README.md of bert example (facebookincubator#82) * Add negative prompts feature for txt2img pipeline (#75) Add optional negative prompt option for txt2img pipeline * add missing copyright headers (facebookincubator#86) * Conv2d group (#73) * group conv * add conv_groups op compiler * Conv2d groups * Conv2d depthwise * wip * wip * wip * wip * only one ops to get feedback * only one ops to get feedback * Fix layout, now test passes * Fix docstring * Add conv2d_depthwise_bias and test * Add conv2d_depthwise_bias and test and frontends * doc * frontend import depthwise * Fix lint * Fix lint * Fix after rebase UTs pass * fix lint * fix more lint * add more tile size for GN + update CK to main (#40) (#3) * add more tile size for gn * update ck Co-authored-by: Terry Chen <terrychen@meta.com> Co-authored-by: Terry Chen <hahakuku@hotmail.com> Co-authored-by: Terry Chen <terrychen@meta.com> * Ck remove unnecessary compile include directories (#4) * remove unnecessary include directory while compiling ck code * refactor data_type.hpp under ck/utility/data_type.hpp * Update docker to ROCm5.3 (#2) * upgrade compiler to ROCM 5.3 version * remove unnecessary build fixes Co-authored-by: illsilin <Illia.Silin@amd.com> * Fix BERT benchmark for 2 gcd (#6) * fixed batch_size > 1 * load so file for benchmark * Ci setup (#11) * add script for ci and testing * fix syntax * fix syntax again * get rid of the drun alias * get rid of interactive flag for docker * fix syntax * run docker without sudo * run some sanity checks before docker * change the run directive * fix syntax * merge build and test steps into one * fix the path to examples * add pytorch * fix syntax * install timm module * set paths in the docker * change the version of the pytorch * try running bert and vit models * add modules for bert * test if examples work with FB repo * try building the docker from the ait source * try building the docker from the rocm/ait repo * get rid of unnecessary changing paths * try running examples 1 and 4 * update docker arguments * fix syntax * try skippinfg the rebuilding steps * try using the same commits as Jing * check the pytorch version * force replacing pytorch * update the examples * remove the foreground commands * skip the BERT tests while using mi100 * clean up and add logfiles * archive the logfiles * fix path to log files, refine steps * fix paths * fix path to logfiles * specify exact paths to logs * fix syntax * fix syntax * get rid of workspace path in artifact paths * write log headers and archive them in one step * set git branch name as global env var * fix syntax * set the branch name value in each necessary step * test posting test results to db * add missing python packages * do not install glob module * do not convert dbsshport to int type * check the port value * hardcode ssh port * try re-running with new action secrets * skip the ssh tunnel * apply changes to all branches and use tunnel if not running on db host * change the syntax to check hostname * fix syntax * move the python script for processing the results * only run ci for the push branch * add BERT tests * modify the script to parse and store BERT test results * post-merge fix of pr 6 (#13) Co-authored-by: root <root@ctr-ubbsmc15.amd.com> Co-authored-by: Chao Liu <lc.roy86@gmail.com> * Add stable diffusion benchmark to the CI. (#16) * add compilation of stable diffusion * add missing python modules and new demos * add accelerate module and fix the parsing script * only use batch size 1 for stable diffusion * add stable diffusion benchmark result to the table * sync upstream v0.1.1 (#15) * updated to 5th stable diffusion checkpoint (#57) * updated to 5th stable diffusion checkpoint * updated all stable diffusion example files to checkpoint v1.5 * Support different sizes via recompilation (StableDiff demo) (#71) Mostly, this commit is just re-establishing the relationship between various previously-hardcoded constants and the target image size (since the latent size is 1/8 of the image size, hardcoding the latent sizes is inconvenient). This adds `--width` and `--height` options to both compile.py and demo.py, and provided these both match you can process different sizes. For img2img mode, the size options passed at compile time must match the size of the actual input image. Consequently, the `--img2img` flag for `compile.py` no longer exists: all this ever did was change the hardcoded size to match the default input image used by `demo_img2img.py`. Yikes. Sooo it's slightly more flexible than before, but still has no support for a single binary to handle different image sizes. It isn't super clear that compiling a generic binary is useful: the upstream project can do that just fine: isn't the whole point of AITemplates to achieve performance gains via aggressive constant propagation and benchmarking to select the optimal kernels? * v0.1.1 (#74) * v0.11 * update cutlass * fix * add missing files * patch cutlass Co-authored-by: Bing Xu <bingxu@fb.com> * fix profile * fix profile bugs * update ck commit * fix format * fix format * update timeout * add rocm unittest case Co-authored-by: Ivan Mikhnenkov <39604625+ivanmikhnenkov@users.noreply.github.com> Co-authored-by: Chris Kitching <chriskitching@linux.com> Co-authored-by: Bing Xu <antinucleon@gmail.com> Co-authored-by: Bing Xu <bingxu@fb.com> * merge amd-develop Co-authored-by: Ivan Mikhnenkov <39604625+ivanmikhnenkov@users.noreply.github.com> Co-authored-by: Chris Kitching <chriskitching@linux.com> Co-authored-by: Bing Xu <antinucleon@gmail.com> Co-authored-by: Bing Xu <bingxu@fb.com> Co-authored-by: Zhang Jun <ewalker@live.cn> Co-authored-by: Bozhao <yubz86@gmail.com> Co-authored-by: Max Podkorytov <maxdp@meta.com> Co-authored-by: Ehsan Azar <dashesy@gmail.com> Co-authored-by: Chao Liu <lc.roy86@gmail.com> Co-authored-by: Terry Chen <hahakuku@hotmail.com> Co-authored-by: Terry Chen <terrychen@meta.com> Co-authored-by: carlushuang <carlus.huang@amd.com> Co-authored-by: illsilin <Illia.Silin@amd.com> Co-authored-by: zjing14 <zhangjing14@gmail.com> Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com> Co-authored-by: root <root@ctr-ubbsmc15.amd.com>
carlushuang
referenced
this pull request
in ROCm/AITemplate
Jan 19, 2023
* updated to 5th stable diffusion checkpoint (#57) * updated to 5th stable diffusion checkpoint * updated all stable diffusion example files to checkpoint v1.5 * Support different sizes via recompilation (StableDiff demo) (#71) Mostly, this commit is just re-establishing the relationship between various previously-hardcoded constants and the target image size (since the latent size is 1/8 of the image size, hardcoding the latent sizes is inconvenient). This adds `--width` and `--height` options to both compile.py and demo.py, and provided these both match you can process different sizes. For img2img mode, the size options passed at compile time must match the size of the actual input image. Consequently, the `--img2img` flag for `compile.py` no longer exists: all this ever did was change the hardcoded size to match the default input image used by `demo_img2img.py`. Yikes. Sooo it's slightly more flexible than before, but still has no support for a single binary to handle different image sizes. It isn't super clear that compiling a generic binary is useful: the upstream project can do that just fine: isn't the whole point of AITemplates to achieve performance gains via aggressive constant propagation and benchmarking to select the optimal kernels? * v0.1.1 (#74) * v0.11 * update cutlass * fix * add missing files * patch cutlass Co-authored-by: Bing Xu <bingxu@fb.com> * fix sm86 conv (#81) Co-authored-by: Bing Xu <bingxu@fb.com> * fix README.md of bert example (facebookincubator#82) * Add negative prompts feature for txt2img pipeline (#75) Add optional negative prompt option for txt2img pipeline * add missing copyright headers (facebookincubator#86) * Conv2d group (#73) * group conv * add conv_groups op compiler * Conv2d groups * Conv2d depthwise * wip * wip * wip * wip * only one ops to get feedback * only one ops to get feedback * Fix layout, now test passes * Fix docstring * Add conv2d_depthwise_bias and test * Add conv2d_depthwise_bias and test and frontends * doc * frontend import depthwise * Fix lint * Fix lint * Fix after rebase UTs pass * fix lint * fix more lint * Fix python lint (facebookincubator#106) * fix python lint * . * . * fix * sd 2.0 (facebookincubator#105) Co-authored-by: Terry Chne <terrychen2012@live.com> * support pipeline at 768x768 resolution (facebookincubator#119) The pipeline default image size = 512x512, but when using the Stable Diffusion 2.0-v (768x768) model for benchmark (--benchmark=True) evaluation, after compiled model in 768x768 image size, the demo script will error in image size. * added requires_safety_checker to sd pipelines, following diffusers pipelines (facebookincubator#126) * use same benchmark pipeline (facebookincubator#130) * Vanilla Attention (facebookincubator#100) * Vanilla attention * Vanilla attention * fix lint * Fix causal unimplemented * support causal * causal vanilla attention * retrigger the CI * Separate class for vanilla attention * type * docstring * address CR * Update ait_ci.yml, diffusers=0.11.1 * Update ait_ci.yml with diffusers==0.11.1 Co-authored-by: Ivan Mikhnenkov <39604625+ivanmikhnenkov@users.noreply.github.com> Co-authored-by: Chris Kitching <chriskitching@linux.com> Co-authored-by: Bing Xu <antinucleon@gmail.com> Co-authored-by: Bing Xu <bingxu@fb.com> Co-authored-by: Zhang Jun <ewalker@live.cn> Co-authored-by: Bozhao <yubz86@gmail.com> Co-authored-by: Max Podkorytov <maxdp@meta.com> Co-authored-by: Ehsan Azar <dashesy@gmail.com> Co-authored-by: Yinghai Lu <yinghai@fb.com> Co-authored-by: Terry Chen <hahakuku@hotmail.com> Co-authored-by: Terry Chne <terrychen2012@live.com> Co-authored-by: BasicCoder <abasiccoder@gmail.com> Co-authored-by: inisis <46103969+inisis@users.noreply.github.com> Co-authored-by: Ehsan Azar <ehazar@microsoft.com> Co-authored-by: carlushuang <carlus.huang@amd.com>
tissue3
pushed a commit
to tissue3/AITemplate-1
that referenced
this pull request
Feb 7, 2023
* keep original inputs for concat op Previously, we rely on the "inputs" attr for computing concat dimension offsets. It doens't seem to be safe, because some of our transformation may modify (e.g. remove) a concat's input. After discussed with Ying, we decided to keep a copy for the original inputs of a concat op. The backend codegen will use some of the original input's information for shapes and calculating dim offsets. Note that this PR also removed "skip_copy" field from the global Tensor class. Instead, we added a field "input_masks" to concat op, where a True element means the accociated input will be copied by the generated code. Otherwise, the input will be skipped because it has been processed by its src op via TensorAccessor. * fixed test failures * lint
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add optional negative prompt option for txt2img pipeline.