wsntxxn commited on
Commit
bc8964d
·
verified ·
1 Parent(s): 999e37c

Upload model

Browse files
Files changed (1) hide show
  1. hf_modeling_grounding.py +1 -1
hf_modeling_grounding.py CHANGED
@@ -341,7 +341,7 @@ class Cnn8RnnLaionClapGroundingModel(PreTrainedModel):
341
  device = self.device
342
  tokens = self.text_tokenizer(
343
  text, padding=True, return_tensors="pt", truncation=True
344
- )
345
  tokens["text_len"] = tokens.attention_mask.sum(dim=-1)
346
  input_dict = {
347
  "waveform": audio.to(device),
 
341
  device = self.device
342
  tokens = self.text_tokenizer(
343
  text, padding=True, return_tensors="pt", truncation=True
344
+ ).to(device)
345
  tokens["text_len"] = tokens.attention_mask.sum(dim=-1)
346
  input_dict = {
347
  "waveform": audio.to(device),