Compare commits
4
Commits
main
...
diffusers-0.26
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8eddf6ed3d | ||
|
|
c17a198800 | ||
|
|
feb9d28f1d | ||
|
|
c5abb6f538 |
@@ -26,7 +26,7 @@ from diffusers.configuration_utils import ConfigMixin, register_to_config
|
|||||||
from diffusers.models.embeddings import ImagePositionalEmbeddings
|
from diffusers.models.embeddings import ImagePositionalEmbeddings
|
||||||
from diffusers.utils import USE_PEFT_BACKEND, BaseOutput, deprecate
|
from diffusers.utils import USE_PEFT_BACKEND, BaseOutput, deprecate
|
||||||
# from diffusers.models.attention import BasicTransformerBlock
|
# from diffusers.models.attention import BasicTransformerBlock
|
||||||
from diffusers.models.embeddings import CaptionProjection, PatchEmbed
|
from diffusers.models.embeddings import PixArtAlphaTextProjection, PatchEmbed
|
||||||
from diffusers.models.lora import LoRACompatibleConv, LoRACompatibleLinear
|
from diffusers.models.lora import LoRACompatibleConv, LoRACompatibleLinear
|
||||||
from diffusers.models.modeling_utils import ModelMixin
|
from diffusers.models.modeling_utils import ModelMixin
|
||||||
from diffusers.models.normalization import AdaLayerNormSingle
|
from diffusers.models.normalization import AdaLayerNormSingle
|
||||||
@@ -237,7 +237,7 @@ class Transformer2DModel(ModelMixin, ConfigMixin):
|
|||||||
|
|
||||||
self.caption_projection = None
|
self.caption_projection = None
|
||||||
if caption_channels is not None:
|
if caption_channels is not None:
|
||||||
self.caption_projection = CaptionProjection(in_features=caption_channels, hidden_size=inner_dim)
|
self.caption_projection = PixArtAlphaTextProjection(in_features=caption_channels, hidden_size=inner_dim)
|
||||||
|
|
||||||
self.gradient_checkpointing = False
|
self.gradient_checkpointing = False
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ from diffusers.configuration_utils import ConfigMixin, register_to_config
|
|||||||
from diffusers.models.embeddings import ImagePositionalEmbeddings
|
from diffusers.models.embeddings import ImagePositionalEmbeddings
|
||||||
from diffusers.utils import USE_PEFT_BACKEND, BaseOutput, deprecate
|
from diffusers.utils import USE_PEFT_BACKEND, BaseOutput, deprecate
|
||||||
# from diffusers.models.attention import BasicTransformerBlock
|
# from diffusers.models.attention import BasicTransformerBlock
|
||||||
from diffusers.models.embeddings import CaptionProjection, PatchEmbed
|
from diffusers.models.embeddings import PixArtAlphaTextProjection, PatchEmbed
|
||||||
from diffusers.models.lora import LoRACompatibleConv, LoRACompatibleLinear
|
from diffusers.models.lora import LoRACompatibleConv, LoRACompatibleLinear
|
||||||
from diffusers.models.modeling_utils import ModelMixin
|
from diffusers.models.modeling_utils import ModelMixin
|
||||||
from diffusers.models.normalization import AdaLayerNormSingle
|
from diffusers.models.normalization import AdaLayerNormSingle
|
||||||
@@ -237,7 +237,7 @@ class Transformer2DModel(ModelMixin, ConfigMixin):
|
|||||||
|
|
||||||
self.caption_projection = None
|
self.caption_projection = None
|
||||||
if caption_channels is not None:
|
if caption_channels is not None:
|
||||||
self.caption_projection = CaptionProjection(in_features=caption_channels, hidden_size=inner_dim)
|
self.caption_projection = PixArtAlphaTextProjection(in_features=caption_channels, hidden_size=inner_dim)
|
||||||
|
|
||||||
self.gradient_checkpointing = False
|
self.gradient_checkpointing = False
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ from diffusers.models.embeddings import (
|
|||||||
ImageHintTimeEmbedding,
|
ImageHintTimeEmbedding,
|
||||||
ImageProjection,
|
ImageProjection,
|
||||||
ImageTimeEmbedding,
|
ImageTimeEmbedding,
|
||||||
PositionNet,
|
GLIGENTextBoundingboxProjection,
|
||||||
TextImageProjection,
|
TextImageProjection,
|
||||||
TextImageTimeEmbedding,
|
TextImageTimeEmbedding,
|
||||||
TextTimeEmbedding,
|
TextTimeEmbedding,
|
||||||
@@ -624,7 +624,7 @@ class UNetGarm2DConditionModel(ModelMixin, ConfigMixin, UNet2DConditionLoadersMi
|
|||||||
positive_len = cross_attention_dim[0]
|
positive_len = cross_attention_dim[0]
|
||||||
|
|
||||||
feature_type = "text-only" if attention_type == "gated" else "text-image"
|
feature_type = "text-only" if attention_type == "gated" else "text-image"
|
||||||
self.position_net = PositionNet(
|
self.position_net = GLIGENTextBoundingboxProjection(
|
||||||
positive_len=positive_len, out_dim=cross_attention_dim, feature_type=feature_type
|
positive_len=positive_len, out_dim=cross_attention_dim, feature_type=feature_type
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ from diffusers.models.embeddings import (
|
|||||||
ImageHintTimeEmbedding,
|
ImageHintTimeEmbedding,
|
||||||
ImageProjection,
|
ImageProjection,
|
||||||
ImageTimeEmbedding,
|
ImageTimeEmbedding,
|
||||||
PositionNet,
|
GLIGENTextBoundingboxProjection,
|
||||||
TextImageProjection,
|
TextImageProjection,
|
||||||
TextImageTimeEmbedding,
|
TextImageTimeEmbedding,
|
||||||
TextTimeEmbedding,
|
TextTimeEmbedding,
|
||||||
@@ -624,7 +624,7 @@ class UNetVton2DConditionModel(ModelMixin, ConfigMixin, UNet2DConditionLoadersMi
|
|||||||
positive_len = cross_attention_dim[0]
|
positive_len = cross_attention_dim[0]
|
||||||
|
|
||||||
feature_type = "text-only" if attention_type == "gated" else "text-image"
|
feature_type = "text-only" if attention_type == "gated" else "text-image"
|
||||||
self.position_net = PositionNet(
|
self.position_net = GLIGENTextBoundingboxProjection(
|
||||||
positive_len=positive_len, out_dim=cross_attention_dim, feature_type=feature_type
|
positive_len=positive_len, out_dim=cross_attention_dim, feature_type=feature_type
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ scipy
|
|||||||
scikit-image
|
scikit-image
|
||||||
opencv-python
|
opencv-python
|
||||||
pillow
|
pillow
|
||||||
diffusers==0.24.0
|
diffusers>=0.26.0
|
||||||
transformers
|
transformers
|
||||||
accelerate
|
accelerate
|
||||||
matplotlib
|
matplotlib
|
||||||
|
|||||||
Reference in New Issue
Block a user