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
e1b7f1f2
Unverified
Commit
e1b7f1f2
authored
Sep 10, 2025
by
ttio2tech
Committed by
GitHub
Sep 10, 2025
Browse files
fix for the qwen controlnet pipeline - wrong device can be used (#12309)
fix the device for textencoder
parent
9e7ae568
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/diffusers/pipelines/qwenimage/pipeline_qwenimage_controlnet.py
...sers/pipelines/qwenimage/pipeline_qwenimage_controlnet.py
+1
-1
No files found.
src/diffusers/pipelines/qwenimage/pipeline_qwenimage_controlnet.py
View file @
e1b7f1f2
...
@@ -265,7 +265,7 @@ class QwenImageControlNetPipeline(DiffusionPipeline, QwenImageLoraLoaderMixin):
...
@@ -265,7 +265,7 @@ class QwenImageControlNetPipeline(DiffusionPipeline, QwenImageLoraLoaderMixin):
txt
=
[
template
.
format
(
e
)
for
e
in
prompt
]
txt
=
[
template
.
format
(
e
)
for
e
in
prompt
]
txt_tokens
=
self
.
tokenizer
(
txt_tokens
=
self
.
tokenizer
(
txt
,
max_length
=
self
.
tokenizer_max_length
+
drop_idx
,
padding
=
True
,
truncation
=
True
,
return_tensors
=
"pt"
txt
,
max_length
=
self
.
tokenizer_max_length
+
drop_idx
,
padding
=
True
,
truncation
=
True
,
return_tensors
=
"pt"
).
to
(
self
.
device
)
).
to
(
device
)
encoder_hidden_states
=
self
.
text_encoder
(
encoder_hidden_states
=
self
.
text_encoder
(
input_ids
=
txt_tokens
.
input_ids
,
input_ids
=
txt_tokens
.
input_ids
,
attention_mask
=
txt_tokens
.
attention_mask
,
attention_mask
=
txt_tokens
.
attention_mask
,
...
...
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