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
ModelZoo
Qwen2-Audio_pytorch
Commits
b2c7202f
Commit
b2c7202f
authored
Feb 10, 2025
by
wanglch
Browse files
Update qwen2_audio_inference.py
parent
c86ded1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
qwen2_audio_inference.py
qwen2_audio_inference.py
+1
-1
No files found.
qwen2_audio_inference.py
View file @
b2c7202f
...
...
@@ -29,7 +29,7 @@ for message in conversation:
inputs
=
processor
(
text
=
text
,
audios
=
audios
,
return_tensors
=
"pt"
,
padding
=
True
)
inputs
.
input_ids
=
inputs
.
input_ids
.
to
(
"cuda"
)
generate_ids
=
model
.
generate
(
**
inputs
,
max_length
=
256
)
generate_ids
=
model
.
generate
(
**
inputs
,
max_length
=
1000
)
generate_ids
=
generate_ids
[:,
inputs
.
input_ids
.
size
(
1
):]
response
=
processor
.
batch_decode
(
generate_ids
,
skip_special_tokens
=
True
,
clean_up_tokenization_spaces
=
False
)[
0
]
...
...
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