-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
In the new QwenImagePipeline
method _get_qwen_prompt_embeds
it does following:
txt_tokens = self.tokenizer(
txt, max_length=self.tokenizer_max_length + drop_idx, padding=True, truncation=True, return_tensors="pt"
).to(self.device)
i assume this is a typo as it doesn't use actual device
which is passed as function param and as such it breaks with any type of offloading with device mismatch since self.device
defaults to entire model placement - which doesnt match.
simple solution is to change last part from .to(self.device)
to .to(device)
Reproduction
N/A
Logs
RuntimeError: Expected all tensors to be on the same device, but got index is on cpu, different from other tensors on cuda:0 (when checking argument in method wrapper_CUDA__index_select)
System Info
diffusers==7ea065c5070a5278259e6f1effa9dccea232e62a
Who can help?
bishipAbhinay1997
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working