Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
746f603b
Unverified
Commit
746f603b
authored
May 16, 2024
by
Liang Hou
Committed by
GitHub
May 15, 2024
Browse files
Fix the text tokenizer name in logger warning of PixArt pipelines (#7912)
Fix CLIP to T5 in logger warning
parent
2afea72d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/diffusers/pipelines/pixart_alpha/pipeline_pixart_alpha.py
...diffusers/pipelines/pixart_alpha/pipeline_pixart_alpha.py
+1
-1
src/diffusers/pipelines/pixart_alpha/pipeline_pixart_sigma.py
...diffusers/pipelines/pixart_alpha/pipeline_pixart_sigma.py
+1
-1
No files found.
src/diffusers/pipelines/pixart_alpha/pipeline_pixart_alpha.py
View file @
746f603b
...
@@ -366,7 +366,7 @@ class PixArtAlphaPipeline(DiffusionPipeline):
...
@@ -366,7 +366,7 @@ class PixArtAlphaPipeline(DiffusionPipeline):
):
):
removed_text
=
self
.
tokenizer
.
batch_decode
(
untruncated_ids
[:,
max_length
-
1
:
-
1
])
removed_text
=
self
.
tokenizer
.
batch_decode
(
untruncated_ids
[:,
max_length
-
1
:
-
1
])
logger
.
warning
(
logger
.
warning
(
"The following part of your input was truncated because
CLIP
can only handle sequences up to"
"The following part of your input was truncated because
T5
can only handle sequences up to"
f
"
{
max_length
}
tokens:
{
removed_text
}
"
f
"
{
max_length
}
tokens:
{
removed_text
}
"
)
)
...
...
src/diffusers/pipelines/pixart_alpha/pipeline_pixart_sigma.py
View file @
746f603b
...
@@ -292,7 +292,7 @@ class PixArtSigmaPipeline(DiffusionPipeline):
...
@@ -292,7 +292,7 @@ class PixArtSigmaPipeline(DiffusionPipeline):
):
):
removed_text
=
self
.
tokenizer
.
batch_decode
(
untruncated_ids
[:,
max_length
-
1
:
-
1
])
removed_text
=
self
.
tokenizer
.
batch_decode
(
untruncated_ids
[:,
max_length
-
1
:
-
1
])
logger
.
warning
(
logger
.
warning
(
"The following part of your input was truncated because
CLIP
can only handle sequences up to"
"The following part of your input was truncated because
T5
can only handle sequences up to"
f
"
{
max_length
}
tokens:
{
removed_text
}
"
f
"
{
max_length
}
tokens:
{
removed_text
}
"
)
)
...
...
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