Skip to content

Commit

Permalink
[Dance Diffusion] Add dance diffusion (#803)
Browse files Browse the repository at this point in the history
* start

* add more logic

* Update src/diffusers/models/unet_2d_condition_flax.py

* match weights

* up

* make model work

* making class more general, fixing missed file rename

* small fix

* make new conversion work

* up

* finalize conversion

* up

* first batch of variable renamings

* remove c and c_prev var names

* add mid and out block structure

* add pipeline

* up

* finish conversion

* finish

* upload

* more fixes

* Apply suggestions from code review

* add attr

* up

* uP

* up

* finish tests

* finish

* uP

* finish

* fix test

* up

* naming consistency in tests

* Apply suggestions from code review

Co-authored-by: Suraj Patil <[email protected]>
Co-authored-by: Pedro Cuenca <[email protected]>
Co-authored-by: Nathan Lambert <[email protected]>
Co-authored-by: Anton Lozhkov <[email protected]>

* remove hardcoded 16

* Remove bogus

* fix some stuff

* finish

* improve logging

* docs

* upload

Co-authored-by: Nathan Lambert <[email protected]>
Co-authored-by: Suraj Patil <[email protected]>
Co-authored-by: Pedro Cuenca <[email protected]>
Co-authored-by: Nathan Lambert <[email protected]>
Co-authored-by: Anton Lozhkov <[email protected]>
  • Loading branch information
6 people authored Oct 25, 2022
1 parent 0b42b07 commit 88fa6b7
Show file tree
Hide file tree
Showing 27 changed files with 1,613 additions and 16 deletions.
2 changes: 2 additions & 0 deletions docs/source/_toctree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,7 @@
title: "Stable Diffusion"
- local: api/pipelines/stochastic_karras_ve
title: "Stochastic Karras VE"
- local: api/pipelines/dance_diffusion
title: "Dance Diffusion"
title: "Pipelines"
title: "API"
3 changes: 3 additions & 0 deletions docs/source/api/models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ The models are built on the base class ['ModelMixin'] that is a `torch.nn.module
## UNet2DOutput
[[autodoc]] models.unet_2d.UNet2DOutput

## UNet1DModel
[[autodoc]] UNet1DModel

## UNet2DModel
[[autodoc]] UNet2DModel

Expand Down
33 changes: 33 additions & 0 deletions docs/source/api/pipelines/dance_diffusion.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!--Copyright 2022 The HuggingFace Team. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->

# Dance Diffusion

## Overview

[Dance Diffusion](https://github.com/Harmonai-org/sample-generator) by Zach Evans.

Dance Diffusion is the first in a suite of generative audio tools for producers and musicians to be released by Harmonai.
For more info or to get involved in the development of these tools, please visit https://harmonai.org and fill out the form on the front page.

The original codebase of this implementation can be found [here](https://github.com/Harmonai-org/sample-generator).

## Available Pipelines:

| Pipeline | Tasks | Colab
|---|---|:---:|
| [pipeline_dance_diffusion.py](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/dance_diffusion/pipeline_dance_diffusion.py) | *Unconditional Audio Generation* | - |


## DanceDiffusionPipeline
[[autodoc]] DanceDiffusionPipeline
- __call__
4 changes: 4 additions & 0 deletions docs/source/api/schedulers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ Original paper can be found [here](https://arxiv.org/abs/2011.13456).

[[autodoc]] ScoreSdeVeScheduler

#### improved pseudo numerical methods for diffusion models (iPNDM)

Original implementation can be found [here](https://github.com/crowsonkb/v-diffusion-pytorch/blob/987f8985e38208345c1959b0ea767a625831cc9b/diffusion/sampling.py#L296).

#### variance preserving stochastic differential equation (SDE) scheduler

Original paper can be found [here](https://arxiv.org/abs/2011.13456).
Expand Down
Loading

0 comments on commit 88fa6b7

Please sign in to comment.