Skip to content

Commit 20e9258

Browse files
0.20.0dev0 (huggingface#4299)
* 0.20.0dev0 * make style
1 parent 5623ea0 commit 20e9258

File tree

68 files changed

+72
-173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+72
-173
lines changed

PHILOSOPHY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ The following design principles are followed:
9090
- To integrate new model checkpoints whose general architecture can be classified as an architecture that already exists in Diffusers, the existing model architecture shall be adapted to make it work with the new checkpoint. One should only create a new file if the model architecture is fundamentally different.
9191
- Models should be designed to be easily extendable to future changes. This can be achieved by limiting public function arguments, configuration arguments, and "foreseeing" future changes, *e.g.* it is usually better to add `string` "...type" arguments that can easily be extended to new future types instead of boolean `is_..._type` arguments. Only the minimum amount of changes shall be made to existing architectures to make a new model checkpoint work.
9292
- The model design is a difficult trade-off between keeping code readable and concise and supporting many model checkpoints. For most parts of the modeling code, classes shall be adapted for new model checkpoints, while there are some exceptions where it is preferred to add new classes to make sure the code is kept concise and
93-
readable longterm, such as [UNet blocks](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_2d_blocks.py) and [Attention processors](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py).
93+
readable longterm, such as [UNet blocks](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_2d_blocks.py) and [Attention processors](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py).
9494

9595
### Schedulers
9696

docs/source/en/conceptual/philosophy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ The following design principles are followed:
9090
- To integrate new model checkpoints whose general architecture can be classified as an architecture that already exists in Diffusers, the existing model architecture shall be adapted to make it work with the new checkpoint. One should only create a new file if the model architecture is fundamentally different.
9191
- Models should be designed to be easily extendable to future changes. This can be achieved by limiting public function arguments, configuration arguments, and "foreseeing" future changes, *e.g.* it is usually better to add `string` "...type" arguments that can easily be extended to new future types instead of boolean `is_..._type` arguments. Only the minimum amount of changes shall be made to existing architectures to make a new model checkpoint work.
9292
- The model design is a difficult trade-off between keeping code readable and concise and supporting many model checkpoints. For most parts of the modeling code, classes shall be adapted for new model checkpoints, while there are some exceptions where it is preferred to add new classes to make sure the code is kept concise and
93-
readable longterm, such as [UNet blocks](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_2d_blocks.py) and [Attention processors](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py).
93+
readable longterm, such as [UNet blocks](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_2d_blocks.py) and [Attention processors](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py).
9494

9595
### Schedulers
9696

examples/community/lpw_stable_diffusion.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ def __call__(
967967
cross_attention_kwargs (`dict`, *optional*):
968968
A kwargs dictionary that if specified is passed along to the `AttentionProcessor` as defined under
969969
`self.processor` in
970-
[diffusers.cross_attention](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py).
970+
[diffusers.models.attention_processor](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py).
971971
972972
Returns:
973973
`None` if cancelled by `is_cancelled_callback`,
@@ -1202,7 +1202,7 @@ def text2img(
12021202
cross_attention_kwargs (`dict`, *optional*):
12031203
A kwargs dictionary that if specified is passed along to the `AttentionProcessor` as defined under
12041204
`self.processor` in
1205-
[diffusers.cross_attention](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py).
1205+
[diffusers.models.attention_processor](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py).
12061206
12071207
Returns:
12081208
`None` if cancelled by `is_cancelled_callback`,
@@ -1316,7 +1316,7 @@ def img2img(
13161316
cross_attention_kwargs (`dict`, *optional*):
13171317
A kwargs dictionary that if specified is passed along to the `AttentionProcessor` as defined under
13181318
`self.processor` in
1319-
[diffusers.cross_attention](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py).
1319+
[diffusers.models.attention_processor](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py).
13201320
13211321
Returns:
13221322
`None` if cancelled by `is_cancelled_callback`,
@@ -1437,7 +1437,7 @@ def inpaint(
14371437
cross_attention_kwargs (`dict`, *optional*):
14381438
A kwargs dictionary that if specified is passed along to the `AttentionProcessor` as defined under
14391439
`self.processor` in
1440-
[diffusers.cross_attention](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py).
1440+
[diffusers.models.attention_processor](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py).
14411441
14421442
Returns:
14431443
`None` if cancelled by `is_cancelled_callback`,

examples/community/stable_diffusion_controlnet_img2img.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ def __call__(
777777
cross_attention_kwargs (`dict`, *optional*):
778778
A kwargs dictionary that if specified is passed along to the `AttentionProcessor` as defined under
779779
`self.processor` in
780-
[diffusers.cross_attention](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py).
780+
[diffusers.models.attention_processor](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py).
781781
controlnet_conditioning_scale (`float`, *optional*, defaults to 1.0):
782782
The outputs of the controlnet are multiplied by `controlnet_conditioning_scale` before they are added
783783
to the residual in the original unet.

examples/community/stable_diffusion_controlnet_inpaint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ def __call__(
912912
cross_attention_kwargs (`dict`, *optional*):
913913
A kwargs dictionary that if specified is passed along to the `AttentionProcessor` as defined under
914914
`self.processor` in
915-
[diffusers.cross_attention](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py).
915+
[diffusers.models.attention_processor](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py).
916916
controlnet_conditioning_scale (`float`, *optional*, defaults to 1.0):
917917
The outputs of the controlnet are multiplied by `controlnet_conditioning_scale` before they are added
918918
to the residual in the original unet.

examples/community/stable_diffusion_controlnet_inpaint_img2img.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ def __call__(
911911
cross_attention_kwargs (`dict`, *optional*):
912912
A kwargs dictionary that if specified is passed along to the `AttentionProcessor` as defined under
913913
`self.processor` in
914-
[diffusers.cross_attention](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py).
914+
[diffusers.models.attention_processor](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py).
915915
controlnet_conditioning_scale (`float`, *optional*, defaults to 1.0):
916916
The outputs of the controlnet are multiplied by `controlnet_conditioning_scale` before they are added
917917
to the residual in the original unet.

examples/community/stable_diffusion_controlnet_reference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def __call__(
201201
cross_attention_kwargs (`dict`, *optional*):
202202
A kwargs dictionary that if specified is passed along to the `AttentionProcessor` as defined under
203203
`self.processor` in
204-
[diffusers.cross_attention](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py).
204+
[diffusers.models.attention_processor](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py).
205205
controlnet_conditioning_scale (`float` or `List[float]`, *optional*, defaults to 1.0):
206206
The outputs of the controlnet are multiplied by `controlnet_conditioning_scale` before they are added
207207
to the residual in the original unet. If multiple ControlNets are specified in init, you can set the

examples/community/stable_diffusion_ipex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ def __call__(
729729
cross_attention_kwargs (`dict`, *optional*):
730730
A kwargs dictionary that if specified is passed along to the `AttnProcessor` as defined under
731731
`self.processor` in
732-
[diffusers.cross_attention](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py).
732+
[diffusers.models.attention_processor](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py).
733733
734734
Examples:
735735

examples/community/stable_diffusion_reference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def __call__(
249249
cross_attention_kwargs (`dict`, *optional*):
250250
A kwargs dictionary that if specified is passed along to the `AttentionProcessor` as defined under
251251
`self.processor` in
252-
[diffusers.cross_attention](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py).
252+
[diffusers.models.attention_processor](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py).
253253
guidance_rescale (`float`, *optional*, defaults to 0.7):
254254
Guidance rescale factor proposed by [Common Diffusion Noise Schedules and Sample Steps are
255255
Flawed](https://arxiv.org/pdf/2305.08891.pdf) `guidance_scale` is defined as `φ` in equation 16. of

examples/controlnet/train_controlnet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
import wandb
5757

5858
# Will error if the minimal version of diffusers is not installed. Remove at your own risks.
59-
check_min_version("0.19.0.dev0")
59+
check_min_version("0.20.0.dev0")
6060

6161
logger = get_logger(__name__)
6262

0 commit comments

Comments
 (0)