fix more
Browse files- unet/my_unet_model.py +3 -3
unet/my_unet_model.py
CHANGED
@@ -34,7 +34,7 @@ from diffusers.models.embeddings import (
|
|
34 |
ImageHintTimeEmbedding,
|
35 |
ImageProjection,
|
36 |
ImageTimeEmbedding,
|
37 |
-
|
38 |
TextImageProjection,
|
39 |
TextImageTimeEmbedding,
|
40 |
TextTimeEmbedding,
|
@@ -42,7 +42,7 @@ from diffusers.models.embeddings import (
|
|
42 |
Timesteps,
|
43 |
)
|
44 |
from diffusers.models.modeling_utils import ModelMixin
|
45 |
-
from diffusers.models.unet_2d_blocks import (
|
46 |
UNetMidBlock2DCrossAttn,
|
47 |
UNetMidBlock2DSimpleCrossAttn,
|
48 |
get_down_block,
|
@@ -586,7 +586,7 @@ class MyUNetModel(ModelMixin, ConfigMixin, UNet2DConditionLoadersMixin):
|
|
586 |
positive_len = cross_attention_dim[0]
|
587 |
|
588 |
feature_type = "text-only" if attention_type == "gated" else "text-image"
|
589 |
-
self.position_net =
|
590 |
positive_len=positive_len, out_dim=cross_attention_dim, feature_type=feature_type
|
591 |
)
|
592 |
|
|
|
34 |
ImageHintTimeEmbedding,
|
35 |
ImageProjection,
|
36 |
ImageTimeEmbedding,
|
37 |
+
GLIGENTextBoundingboxProjection,
|
38 |
TextImageProjection,
|
39 |
TextImageTimeEmbedding,
|
40 |
TextTimeEmbedding,
|
|
|
42 |
Timesteps,
|
43 |
)
|
44 |
from diffusers.models.modeling_utils import ModelMixin
|
45 |
+
from diffusers.models.unets.unet_2d_blocks import (
|
46 |
UNetMidBlock2DCrossAttn,
|
47 |
UNetMidBlock2DSimpleCrossAttn,
|
48 |
get_down_block,
|
|
|
586 |
positive_len = cross_attention_dim[0]
|
587 |
|
588 |
feature_type = "text-only" if attention_type == "gated" else "text-image"
|
589 |
+
self.position_net = GLIGENTextBoundingboxProjection(
|
590 |
positive_len=positive_len, out_dim=cross_attention_dim, feature_type=feature_type
|
591 |
)
|
592 |
|