Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e1b7f1f

Browse files
fix for the qwen controlnet pipeline - wrong device can be used (#12309)
fix the device for textencoder
1 parent 9e7ae56 commit e1b7f1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/diffusers/pipelines/qwenimage/pipeline_qwenimage_controlnet.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def _get_qwen_prompt_embeds(
265265
txt = [template.format(e) for e in prompt]
266266
txt_tokens = self.tokenizer(
267267
txt, max_length=self.tokenizer_max_length + drop_idx, padding=True, truncation=True, return_tensors="pt"
268-
).to(self.device)
268+
).to(device)
269269
encoder_hidden_states = self.text_encoder(
270270
input_ids=txt_tokens.input_ids,
271271
attention_mask=txt_tokens.attention_mask,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /