From e26ddc65ed7e4dc20b802bede0252f72638d3446 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Mon, 25 Mar 2024 22:33:42 +0200 Subject: [PATCH] Update unet_2d_condition.py --- models/unet_2d_condition.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/unet_2d_condition.py b/models/unet_2d_condition.py index e18f69f..804a164 100644 --- a/models/unet_2d_condition.py +++ b/models/unet_2d_condition.py @@ -38,7 +38,7 @@ from diffusers.models.embeddings import ( ImageHintTimeEmbedding, ImageProjection, ImageTimeEmbedding, - #PositionNet, + GLIGENTextBoundingboxProjection, TextImageProjection, TextImageTimeEmbedding, TextTimeEmbedding, @@ -619,7 +619,7 @@ class UNet2DConditionModel(ModelMixin, ConfigMixin, UNet2DConditionLoadersMixin) positive_len = cross_attention_dim[0] 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 )