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

[WIP] Consistency models distillation examples #3992

Closed
Closed
Show file tree
Hide file tree
Changes from 79 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
799ab23
initial commit
dg845 May 15, 2023
63b7f01
Improve consistency models sampling implementation.
dg845 May 17, 2023
f2e53da
Add CMStochasticIterativeScheduler, which implements the multi-step s…
dg845 May 18, 2023
37e1895
Merge branch 'main2' into consistency_unet
May 22, 2023
7c1e81f
Add Unet blocks for consistency models
May 22, 2023
3a151bd
Add conversion script for Unet
May 22, 2023
b6c5e15
Fix bug in new unet blocks
May 22, 2023
4e93f09
Fix attention weight loading
May 23, 2023
d137d11
Merge pull request #1 from ayushtues/consistency_unet
dg845 May 25, 2023
9ae7669
Make design improvements to ConsistencyModelPipeline and CMStochastic…
dg845 May 26, 2023
54b287e
make style
dg845 May 26, 2023
067a9ef
Add initial training script
ayushtues May 26, 2023
5a27c2f
Make small random test UNet class conditional and set resnet_time_sca…
dg845 May 30, 2023
f2783a8
Add support for converting a test UNet and non-class-conditional UNet…
dg845 May 30, 2023
ed53b85
make style
dg845 May 30, 2023
a505c6c
Change num_class_embeds to 1000 to better match the original consiste…
dg845 May 30, 2023
a927a4a
Add support for distillation in pipeline_consistency_models.py.
dg845 May 30, 2023
b2e6424
Improve consistency model tests:
dg845 May 30, 2023
c37e302
make style
dg845 May 30, 2023
a0a164c
Improve ConsistencyModelPipeline:
dg845 May 30, 2023
0d1de08
make style
dg845 May 30, 2023
5f4f406
Improve ConsistencyModelPipeline:
dg845 May 30, 2023
213b25d
make style
dg845 May 30, 2023
fbe34c3
Fix bug when randomly generating class labels for class-conditional g…
dg845 May 30, 2023
0e53d8b
Switch CMStochasticIterativeScheduler to configuring a sigma schedule…
dg845 Jun 1, 2023
c3b242e
Remove some unused code and make style.
dg845 Jun 1, 2023
43e4379
Fix small bug in CMStochasticIterativeScheduler.
dg845 Jun 1, 2023
94c99ca
Add expected slices for multistep sampling tests and make them pass.
dg845 Jun 2, 2023
0773b27
Work on consistency model fast tests:
dg845 Jun 2, 2023
6867a3a
make style
dg845 Jun 2, 2023
f0c85d3
Refactor conversion script to make it easier to add more model archit…
dg845 Jun 4, 2023
6adb589
Work on ConsistencyModelPipeline tests:
dg845 Jun 4, 2023
c213bf7
make style
dg845 Jun 4, 2023
3be6e08
Remove the add_noise and add_noise_to_input methods from CMStochastic…
dg845 Jun 4, 2023
660909f
Run python utils/check_copies.py --fix_and_overwrite
dg845 Jun 4, 2023
ad5abdc
Make fast tests from PipelineTesterMixin pass.
dg845 Jun 4, 2023
a1c11d3
make style
dg845 Jun 4, 2023
a15c168
Merge branch 'consistency-models-pipeline' into consistency-models-ex…
ayushtues Jun 5, 2023
2dc2fa3
Refactor consistency models pipeline and scheduler:
dg845 Jun 7, 2023
7d3dbe3
make style
dg845 Jun 7, 2023
55f80ed
Add docstrings and further refactor pipeline and scheduler.
dg845 Jun 7, 2023
3234543
make style
dg845 Jun 7, 2023
dc4349c
Add initial version of the consistency models documentation.
dg845 Jun 9, 2023
787e65a
Minor
ayushtues Jun 9, 2023
50136d0
Merge branch 'consistency-models-pipeline' into consistency-models-ex…
ayushtues Jun 9, 2023
6530b17
Add training code
ayushtues Jun 9, 2023
8f858cb
Fix bugs in training
ayushtues Jun 9, 2023
e56b870
Remove some args, add target model
ayushtues Jun 9, 2023
85eb796
Refactor custom timesteps logic following DDPMScheduler/IFPipeline an…
dg845 Jun 10, 2023
bf3a405
make style
dg845 Jun 10, 2023
1488180
attention weight loading fix
ayushtues Jun 12, 2023
fd0a253
Convert current slow tests to use fp16 and flash attention.
dg845 Jun 13, 2023
7c03ff6
make style
dg845 Jun 13, 2023
80d7745
Add slow tests for normal attention on cuda device.
dg845 Jun 13, 2023
0662f63
make style
dg845 Jun 13, 2023
cce04c0
Fix attention weights loading
ayushtues Jun 13, 2023
c1ba8b9
Merge pull request #3 from ayushtues/fix-attention-loading
dg845 Jun 13, 2023
62a49a2
Update consistency model fast tests for new test checkpoints with att…
dg845 Jun 13, 2023
58f12ca
make style
dg845 Jun 13, 2023
98e1381
Renaming ema model to target
ayushtues Jun 15, 2023
baefc87
Add some comments
ayushtues Jun 15, 2023
071f850
apply suggestions
dg845 Jun 16, 2023
cd460ca
Remove xformers, refactor ckpt resuming
ayushtues Jun 17, 2023
6968615
Add add_noise method to CMStochasticIterativeScheduler (copied from E…
dg845 Jun 18, 2023
9bc3167
Merge branch 'consistency-models-pipeline' into consistency-models-ex…
ayushtues Jun 18, 2023
9a81642
Add input scaling, disable gradients
ayushtues Jun 19, 2023
ca15734
Conversion script now outputs pipeline instead of UNet and add suppor…
dg845 Jun 21, 2023
a56d3d2
When both timesteps and num_inference_steps are supplied, raise warni…
dg845 Jun 21, 2023
a17847e
make style
dg845 Jun 21, 2023
8214a33
Add remaining diffusers model checkpoints for models in the original …
dg845 Jun 21, 2023
2606d82
apply suggestions from review
dg845 Jun 29, 2023
075351a
make style
dg845 Jun 29, 2023
0240407
Merge branch 'consistency-models-pipeline' into consistency-models-ex…
ayushtues Jun 29, 2023
88356e6
Merge branch 'main_hf' into consistency-models-examples
ayushtues Jul 7, 2023
ea7d75f
Update training script to main, fix timesteps
ayushtues Jul 10, 2023
a32b869
Fix bug in timestep ordering
ayushtues Jul 10, 2023
8742e4e
Add review suggestions
ayushtues Jul 11, 2023
943c88b
Integrate accelerator better, change model upload
ayushtues Jul 12, 2023
6b58d81
Fix checkpointing and add test
ayushtues Jul 13, 2023
180b3e8
Remove hardcoded configs, add DiffusionPipeline
ayushtues Jul 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions examples/consistency_models/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accelerate>=0.16.0
torchvision
datasets
wandb
tensrboard
Loading