Formatting

This commit is contained in:
Aymeric 2025-01-10 21:45:52 +01:00
parent 9c1a0fa2e5
commit 6743d01ed5
1 changed files with 3 additions and 1 deletions

View File

@ -277,7 +277,9 @@ def handle_agent_output_types(output, output_type=None):
# If the class does not have defined output, then we map according to the type
for _k, _v in INSTANCE_TYPE_MAPPING.items():
if isinstance(output, _k):
if not isinstance(output, object): # avoid converting to audio if torch is not installed
if not isinstance(
output, object
): # avoid converting to audio if torch is not installed
return _v(output)
return output