Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f74ae6e
fix: DDPMScheduler.set_timesteps()
Joqsan Dec 26, 2022
1f1b6c6
Device to use (e.g. cpu, cuda:0, cuda:1, etc.) (#1844)
camenduru Dec 27, 2022
68e2425
Avoid duplicating PyTorch + safetensors downloads. (#1836)
pcuenca Dec 27, 2022
8a4c3e5
Width was typod as weight (#1800)
Helw150 Dec 27, 2022
b693aff
fix: resize transform now preserves aspect ratio (#1804)
parlance-zz Dec 27, 2022
8874027
Make xformers optional even if it is available (#1753)
kn Dec 27, 2022
cf5265a
Allow selecting precision to make Dreambooth class images (#1832)
kabachuha Dec 27, 2022
53c8147
unCLIP image variation (#1781)
williamberman Dec 28, 2022
2ba42aa
[Community Pipeline] MagicMix (#1839)
daspartho Dec 28, 2022
debc74f
[Versatile Diffusion] Fix cross_attention_kwargs (#1849)
patrickvonplaten Dec 28, 2022
f2e521c
[Dtype] Align dtype casting behavior with Transformers and Accelerate…
patrickvonplaten Dec 29, 2022
03bf877
[StableDiffusionInpaint] Correct test (#1859)
patrickvonplaten Dec 29, 2022
9ea7052
[textual inversion] add gradient checkpointing and small fixes. (#1848)
patil-suraj Dec 29, 2022
ab0e92f
Flax: Fix img2img and align with other pipeline (#1824)
skirsten Dec 29, 2022
29b2c93
Make repo structure consistent (#1862)
patrickvonplaten Dec 30, 2022
b28ab30
[Unclip] Make sure text_embeddings & image_embeddings can directly be…
patrickvonplaten Dec 30, 2022
a6e2c1f
Fix ema decay (#1868)
pcuenca Dec 30, 2022
ac37384
[Docs] Improve docs (#1870)
patrickvonplaten Dec 30, 2022
e4fe941
[examples] update loss computation (#1861)
patil-suraj Dec 30, 2022
62608a9
[train_text_to_image] allow using non-ema weights for training (#1834)
patil-suraj Dec 30, 2022
4f7000f
Throw error when num_inference_steps > num_train_timesteps
Joqsan Dec 31, 2022
6f6db25
fix: DDPMScheduler.set_timesteps()
Joqsan Dec 26, 2022
8328fe2
Throw error when num_inference_steps > num_train_timesteps
Joqsan Dec 31, 2022
0cd5c36
Merge branch 'main' of github.com:Joqsan/diffusers into main
Joqsan Dec 31, 2022
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
4 changes: 3 additions & 1 deletion .github/workflows/nightly_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
run: |
python -m pip install -e .[quality,test]
python -m pip install -U git+https://github.com/huggingface/transformers
python -m pip install git+https://github.com/huggingface/accelerate

- name: Environment
run: |
Expand Down Expand Up @@ -134,6 +135,7 @@ jobs:
${CONDA_RUN} python -m pip install --upgrade pip
${CONDA_RUN} python -m pip install -e .[quality,test]
${CONDA_RUN} python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
${CONDA_RUN} python -m pip install git+https://github.com/huggingface/accelerate

- name: Environment
shell: arch -arch arm64 bash {0}
Expand All @@ -157,4 +159,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: torch_mps_test_reports
path: reports
path: reports
2 changes: 2 additions & 0 deletions .github/workflows/pr_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
apt-get update && apt-get install libsndfile1-dev -y
python -m pip install -e .[quality,test]
python -m pip install -U git+https://github.com/huggingface/transformers
python -m pip install git+https://github.com/huggingface/accelerate

- name: Environment
run: |
Expand Down Expand Up @@ -126,6 +127,7 @@ jobs:
${CONDA_RUN} python -m pip install --upgrade pip
${CONDA_RUN} python -m pip install -e .[quality,test]
${CONDA_RUN} python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
${CONDA_RUN} python -m pip install git+https://github.com/huggingface/accelerate
${CONDA_RUN} python -m pip install -U git+https://github.com/huggingface/transformers

- name: Environment
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/push_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
run: |
python -m pip install -e .[quality,test]
python -m pip install -U git+https://github.com/huggingface/transformers
python -m pip install git+https://github.com/huggingface/accelerate

- name: Environment
run: |
Expand Down Expand Up @@ -130,6 +131,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -e .[quality,test,training]
python -m pip install git+https://github.com/huggingface/accelerate
python -m pip install -U git+https://github.com/huggingface/transformers

- name: Environment
Expand All @@ -151,4 +153,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: examples_test_reports
path: reports
path: reports
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ adds a link to its documentation with this syntax: \[\`XXXClass\`\] or \[\`funct
function to be in the main package.

If you want to create a link to some internal class or function, you need to
provide its path. For instance: \[\`pipeline_utils.ImagePipelineOutput\`\]. This will be converted into a link with
`pipeline_utils.ImagePipelineOutput` in the description. To get rid of the path and only keep the name of the object you are
linking to in the description, add a ~: \[\`~pipeline_utils.ImagePipelineOutput\`\] will generate a link with `ImagePipelineOutput` in the description.
provide its path. For instance: \[\`pipelines.ImagePipelineOutput\`\]. This will be converted into a link with
`pipelines.ImagePipelineOutput` in the description. To get rid of the path and only keep the name of the object you are
linking to in the description, add a ~: \[\`~pipelines.ImagePipelineOutput\`\] will generate a link with `ImagePipelineOutput` in the description.

The same works for methods so you can either use \[\`XXXClass.method\`\] or \[~\`XXXClass.method\`\].

Expand Down
14 changes: 9 additions & 5 deletions docs/source/api/diffusion_pipeline.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ Any pipeline object can be saved locally with [`~DiffusionPipeline.save_pretrain

## DiffusionPipeline
[[autodoc]] DiffusionPipeline
- from_pretrained
- save_pretrained
- to
- all
- __call__
- device
- components
- to

## ImagePipelineOutput
By default diffusion pipelines return an object of class

[[autodoc]] pipeline_utils.ImagePipelineOutput
[[autodoc]] pipelines.ImagePipelineOutput

## AudioPipelineOutput
By default diffusion pipelines return an object of class

[[autodoc]] pipelines.AudioPipelineOutput
4 changes: 2 additions & 2 deletions docs/source/api/models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ The models are built on the base class ['ModelMixin'] that is a `torch.nn.module
[[autodoc]] models.vae.DecoderOutput

## VQEncoderOutput
[[autodoc]] models.vae.VQEncoderOutput
[[autodoc]] models.vq_model.VQEncoderOutput

## VQModel
[[autodoc]] VQModel

## AutoencoderKLOutput
[[autodoc]] models.vae.AutoencoderKLOutput
[[autodoc]] models.autoencoder_kl.AutoencoderKLOutput

## AutoencoderKL
[[autodoc]] AutoencoderKL
Expand Down
2 changes: 1 addition & 1 deletion docs/source/api/outputs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pipeline = DDIMPipeline.from_pretrained("google/ddpm-cifar10-32")
outputs = pipeline()
```

The `outputs` object is a [`~pipeline_utils.ImagePipelineOutput`], as we can see in the
The `outputs` object is a [`~pipelines.ImagePipelineOutput`], as we can see in the
documentation of that class below, it means it has an image attribute.

You can access each attribute as you would usually do, and if that attribute has not been returned by the model, you will get `None`:
Expand Down
8 changes: 4 additions & 4 deletions docs/source/api/pipelines/alt_diffusion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ If you want to use all possible use cases in a single `DiffusionPipeline` we rec

## AltDiffusionPipelineOutput
[[autodoc]] pipelines.alt_diffusion.AltDiffusionPipelineOutput
- all
- __call__

## AltDiffusionPipeline
[[autodoc]] AltDiffusionPipeline
- all
- __call__
- enable_attention_slicing
- disable_attention_slicing

## AltDiffusionImg2ImgPipeline
[[autodoc]] AltDiffusionImg2ImgPipeline
- all
- __call__
- enable_attention_slicing
- disable_attention_slicing
8 changes: 2 additions & 6 deletions docs/source/api/pipelines/audio_diffusion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,8 @@ display(Audio(output.audios[0], rate=pipe.mel.get_sample_rate()))

## AudioDiffusionPipeline
[[autodoc]] AudioDiffusionPipeline
- __call__
- encode
- slerp

- all
- __call__

## Mel
[[autodoc]] Mel
- audio_slice_to_image
- image_to_audio
1 change: 1 addition & 0 deletions docs/source/api/pipelines/cycle_diffusion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,5 @@ image.save("black_to_blue.png")

## CycleDiffusionPipeline
[[autodoc]] CycleDiffusionPipeline
- all
- __call__
3 changes: 2 additions & 1 deletion docs/source/api/pipelines/dance_diffusion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ The original codebase of this implementation can be found [here](https://github.

## DanceDiffusionPipeline
[[autodoc]] DanceDiffusionPipeline
- __call__
- all
- __call__
3 changes: 2 additions & 1 deletion docs/source/api/pipelines/ddim.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ For questions, feel free to contact the author on [tsong.me](https://tsong.me/).

## DDIMPipeline
[[autodoc]] DDIMPipeline
- __call__
- all
- __call__
3 changes: 2 additions & 1 deletion docs/source/api/pipelines/ddpm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ The original codebase of this paper can be found [here](https://github.com/hojon

# DDPMPipeline
[[autodoc]] DDPMPipeline
- __call__
- all
- __call__
6 changes: 4 additions & 2 deletions docs/source/api/pipelines/latent_diffusion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ The original codebase can be found [here](https://github.com/CompVis/latent-diff

## LDMTextToImagePipeline
[[autodoc]] LDMTextToImagePipeline
- __call__
- all
- __call__

## LDMSuperResolutionPipeline
[[autodoc]] LDMSuperResolutionPipeline
- __call__
- all
- __call__
3 changes: 2 additions & 1 deletion docs/source/api/pipelines/latent_diffusion_uncond.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ The original codebase can be found [here](https://github.com/CompVis/latent-diff

## LDMPipeline
[[autodoc]] LDMPipeline
- __call__
- all
- __call__
5 changes: 3 additions & 2 deletions docs/source/api/pipelines/paint_by_example.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,6 @@ image
```

## PaintByExamplePipeline
[[autodoc]] pipelines.paint_by_example.pipeline_paint_by_example.PaintByExamplePipeline
- __call__
[[autodoc]] PaintByExamplePipeline
- all
- __call__
6 changes: 3 additions & 3 deletions docs/source/api/pipelines/pndm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ The original codebase can be found [here](https://github.com/luping-liu/PNDM).


## PNDMPipeline
[[autodoc]] pipelines.pndm.pipeline_pndm.PNDMPipeline
- __call__

[[autodoc]] PNDMPipeline
- all
- __call__
6 changes: 3 additions & 3 deletions docs/source/api/pipelines/repaint.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ inpainted_image = output.images[0]
```

## RePaintPipeline
[[autodoc]] pipelines.repaint.pipeline_repaint.RePaintPipeline
- __call__

[[autodoc]] RePaintPipeline
- all
- __call__
4 changes: 2 additions & 2 deletions docs/source/api/pipelines/score_sde_ve.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ This pipeline implements the Variance Expanding (VE) variant of the method.

## ScoreSdeVePipeline
[[autodoc]] ScoreSdeVePipeline
- __call__

- all
- __call__
11 changes: 8 additions & 3 deletions docs/source/api/pipelines/stable_diffusion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,18 @@ If you want to use all possible use cases in a single `DiffusionPipeline` you ca

## StableDiffusionPipeline
[[autodoc]] StableDiffusionPipeline
- all
- __call__
- enable_attention_slicing
- disable_attention_slicing
- enable_vae_slicing
- disable_vae_slicing
- enable_xformers_memory_efficient_attention
- disable_xformers_memory_efficient_attention



## StableDiffusionImg2ImgPipeline
[[autodoc]] StableDiffusionImg2ImgPipeline
- all
- __call__
- enable_attention_slicing
- disable_attention_slicing
Expand All @@ -91,6 +93,7 @@ If you want to use all possible use cases in a single `DiffusionPipeline` you ca

## StableDiffusionInpaintPipeline
[[autodoc]] StableDiffusionInpaintPipeline
- all
- __call__
- enable_attention_slicing
- disable_attention_slicing
Expand All @@ -99,6 +102,7 @@ If you want to use all possible use cases in a single `DiffusionPipeline` you ca

## StableDiffusionDepth2ImgPipeline
[[autodoc]] StableDiffusionDepth2ImgPipeline
- all
- __call__
- enable_attention_slicing
- disable_attention_slicing
Expand All @@ -107,15 +111,16 @@ If you want to use all possible use cases in a single `DiffusionPipeline` you ca

## StableDiffusionImageVariationPipeline
[[autodoc]] StableDiffusionImageVariationPipeline
- all
- __call__
- enable_attention_slicing
- disable_attention_slicing
- enable_xformers_memory_efficient_attention
- disable_xformers_memory_efficient_attention


## StableDiffusionUpscalePipeline
[[autodoc]] StableDiffusionUpscalePipeline
- all
- __call__
- enable_attention_slicing
- disable_attention_slicing
Expand Down
6 changes: 3 additions & 3 deletions docs/source/api/pipelines/stable_diffusion_safe.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ To use a different scheduler, you can either change it via the [`ConfigMixin.fro

## StableDiffusionSafePipelineOutput
[[autodoc]] pipelines.stable_diffusion_safe.StableDiffusionSafePipelineOutput
- all
- __call__

## StableDiffusionPipelineSafe
[[autodoc]] StableDiffusionPipelineSafe
- all
- __call__
- enable_attention_slicing
- disable_attention_slicing

3 changes: 2 additions & 1 deletion docs/source/api/pipelines/stochastic_karras_ve.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ This pipeline implements the Stochastic sampling tailored to the Variance-Expand

## KarrasVePipeline
[[autodoc]] KarrasVePipeline
- __call__
- all
- __call__
10 changes: 8 additions & 2 deletions docs/source/api/pipelines/unclip.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ The unCLIP model in diffusers comes from kakaobrain's karlo and the original cod
| Pipeline | Tasks | Colab
|---|---|:---:|
| [pipeline_unclip.py](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unclip/pipeline_unclip.py) | *Text-to-Image Generation* | - |
| [pipeline_unclip_image_variation.py](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/unclip/pipeline_unclip_image_variation.py) | *Image-Guided Image Generation* | - |


## UnCLIPPipeline
[[autodoc]] pipelines.unclip.pipeline_unclip.UnCLIPPipeline
- __call__
[[autodoc]] UnCLIPPipeline
- all
- __call__

[[autodoc]] UnCLIPImageVariationPipeline
- all
- __call__
9 changes: 3 additions & 6 deletions docs/source/api/pipelines/versatile_diffusion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,15 @@ To use a different scheduler, you can either change it via the [`ConfigMixin.fro

## VersatileDiffusionTextToImagePipeline
[[autodoc]] VersatileDiffusionTextToImagePipeline
- all
- __call__
- enable_attention_slicing
- disable_attention_slicing

## VersatileDiffusionImageVariationPipeline
[[autodoc]] VersatileDiffusionImageVariationPipeline
- all
- __call__
- enable_attention_slicing
- disable_attention_slicing

## VersatileDiffusionDualGuidedPipeline
[[autodoc]] VersatileDiffusionDualGuidedPipeline
- all
- __call__
- enable_attention_slicing
- disable_attention_slicing
5 changes: 3 additions & 2 deletions docs/source/api/pipelines/vq_diffusion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ The original codebase can be found [here](https://github.com/microsoft/VQ-Diffus


## VQDiffusionPipeline
[[autodoc]] pipelines.vq_diffusion.pipeline_vq_diffusion.VQDiffusionPipeline
- __call__
[[autodoc]] VQDiffusionPipeline
- all
- __call__
Loading