File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1153,10 +1153,14 @@ def forward(self, texts: List[str]) -> Tensor:
11531153 return_tensors = "pt" ,
11541154 )
11551155
1156+ device = next (self .transformer .parameters ()).device
1157+ input_ids = encoded ["input_ids" ].to (device )
1158+ attention_mask = encoded ["attention_mask" ].to (device )
1159+
11561160 self .transformer .eval ()
11571161
11581162 embedding = self .transformer (
1159- input_ids = encoded [ " input_ids" ] , attention_mask = encoded [ " attention_mask" ]
1163+ input_ids = input_ids , attention_mask = attention_mask
11601164 )["last_hidden_state" ]
11611165
11621166 return embedding
Original file line number Diff line number Diff line change 33setup (
44 name = "audio-diffusion-pytorch" ,
55 packages = find_packages (exclude = []),
6- version = "0.0.63 " ,
6+ version = "0.0.64 " ,
77 license = "MIT" ,
88 description = "Audio Diffusion - PyTorch" ,
99 long_description_content_type = "text/markdown" ,
You can’t perform that action at this time.
0 commit comments