Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
diffusers
Commits
3a28e36a
Unverified
Commit
3a28e36a
authored
May 29, 2024
by
Sayak Paul
Committed by
GitHub
May 29, 2024
Browse files
[Post release 0.28.0] remove deprecated blocks. (#8291)
* remove deprecated blocks. * update the location paths.
parent
3393c01c
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
src/diffusers/models/unets/unet_3d_condition.py
src/diffusers/models/unets/unet_3d_condition.py
+4
-4
src/diffusers/models/unets/unet_i2vgen_xl.py
src/diffusers/models/unets/unet_i2vgen_xl.py
+4
-4
src/diffusers/models/unets/unet_motion_model.py
src/diffusers/models/unets/unet_motion_model.py
+4
-4
src/diffusers/models/unets/unet_spatio_temporal_condition.py
src/diffusers/models/unets/unet_spatio_temporal_condition.py
+3
-3
No files found.
src/diffusers/models/unets/unet_3d_condition.py
View file @
3a28e36a
...
...
@@ -598,15 +598,15 @@ class UNet3DConditionModel(ModelMixin, ConfigMixin, UNet2DConditionLoadersMixin)
mid_block_additional_residual: (`torch.Tensor`, *optional*):
A tensor that if specified is added to the residual of the middle unet block.
return_dict (`bool`, *optional*, defaults to `True`):
Whether or not to return a [`~models.unet_3d_condition.UNet3DConditionOutput`] instead of a plain
Whether or not to return a [`~models.
unets.
unet_3d_condition.UNet3DConditionOutput`] instead of a plain
tuple.
cross_attention_kwargs (`dict`, *optional*):
A kwargs dictionary that if specified is passed along to the [`AttnProcessor`].
Returns:
[`~models.unet_3d_condition.UNet3DConditionOutput`] or `tuple`:
If `return_dict` is True, an [`~models.unet_3d_condition.UNet3DConditionOutput`] is returned,
otherwise
a `tuple` is returned where the first element is the sample tensor.
[`~models.
unets.
unet_3d_condition.UNet3DConditionOutput`] or `tuple`:
If `return_dict` is True, an [`~models.
unets.
unet_3d_condition.UNet3DConditionOutput`] is returned,
otherwise
a `tuple` is returned where the first element is the sample tensor.
"""
# By default samples have to be AT least a multiple of the overall upsampling factor.
# The overall upsampling factor is equal to 2 ** (# num of upsampling layears).
...
...
src/diffusers/models/unets/unet_i2vgen_xl.py
View file @
3a28e36a
...
...
@@ -542,13 +542,13 @@ class I2VGenXLUNet(ModelMixin, ConfigMixin, UNet2DConditionLoadersMixin):
`self.processor` in
[diffusers.models.attention_processor](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py).
return_dict (`bool`, *optional*, defaults to `True`):
Whether or not to return a [`~models.unet_3d_condition.UNet3DConditionOutput`] instead of a plain
Whether or not to return a [`~models.
unets.
unet_3d_condition.UNet3DConditionOutput`] instead of a plain
tuple.
Returns:
[`~models.unet_3d_condition.UNet3DConditionOutput`] or `tuple`:
If `return_dict` is True, an [`~models.unet_3d_condition.UNet3DConditionOutput`] is returned,
otherwise
a `tuple` is returned where the first element is the sample tensor.
[`~models.
unets.
unet_3d_condition.UNet3DConditionOutput`] or `tuple`:
If `return_dict` is True, an [`~models.
unets.
unet_3d_condition.UNet3DConditionOutput`] is returned,
otherwise
a `tuple` is returned where the first element is the sample tensor.
"""
batch_size
,
channels
,
num_frames
,
height
,
width
=
sample
.
shape
...
...
src/diffusers/models/unets/unet_motion_model.py
View file @
3a28e36a
...
...
@@ -856,13 +856,13 @@ class UNetMotionModel(ModelMixin, ConfigMixin, UNet2DConditionLoadersMixin):
mid_block_additional_residual: (`torch.Tensor`, *optional*):
A tensor that if specified is added to the residual of the middle unet block.
return_dict (`bool`, *optional*, defaults to `True`):
Whether or not to return a [`~models.unet_3d_condition.UNet3DConditionOutput`] instead of a plain
Whether or not to return a [`~models.
unets.
unet_3d_condition.UNet3DConditionOutput`] instead of a plain
tuple.
Returns:
[`~models.unet_3d_condition.UNet3DConditionOutput`] or `tuple`:
If `return_dict` is True, an [`~models.unet_3d_condition.UNet3DConditionOutput`] is returned,
otherwise
a `tuple` is returned where the first element is the sample tensor.
[`~models.
unets.
unet_3d_condition.UNet3DConditionOutput`] or `tuple`:
If `return_dict` is True, an [`~models.
unets.
unet_3d_condition.UNet3DConditionOutput`] is returned,
otherwise
a `tuple` is returned where the first element is the sample tensor.
"""
# By default samples have to be AT least a multiple of the overall upsampling factor.
# The overall upsampling factor is equal to 2 ** (# num of upsampling layears).
...
...
src/diffusers/models/unets/unet_spatio_temporal_condition.py
View file @
3a28e36a
...
...
@@ -57,9 +57,9 @@ class UNetSpatioTemporalConditionModel(ModelMixin, ConfigMixin, UNet2DConditionL
The dimension of the cross attention features.
transformer_layers_per_block (`int`, `Tuple[int]`, or `Tuple[Tuple]` , *optional*, defaults to 1):
The number of transformer blocks of type [`~models.attention.BasicTransformerBlock`]. Only relevant for
[`~models.unet_3d_blocks.CrossAttnDownBlockSpatioTemporal`],
[`~models.unet_3d_blocks.CrossAttnUpBlockSpatioTemporal`],
[`~models.unet_3d_blocks.UNetMidBlockSpatioTemporal`].
[`~models.
unets.
unet_3d_blocks.CrossAttnDownBlockSpatioTemporal`],
[`~models.
unets.
unet_3d_blocks.CrossAttnUpBlockSpatioTemporal`],
[`~models.
unets.
unet_3d_blocks.UNetMidBlockSpatioTemporal`].
num_attention_heads (`int`, `Tuple[int]`, defaults to `(5, 10, 10, 20)`):
The number of attention heads.
dropout (`float`, *optional*, defaults to 0.0): The dropout probability to use.
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment