diff --git a/src/together/filemanager.py b/src/together/filemanager.py index f139e9b..5d22e17 100644 --- a/src/together/filemanager.py +++ b/src/together/filemanager.py @@ -102,7 +102,7 @@ def _prepare_output( if output: return output - content_type = str(headers.get("content-type")) + content_type = headers.get("content-type") assert remote_name, ( "No model name found in fine_tune object. " @@ -112,7 +112,7 @@ def _prepare_output( if step > 0: remote_name += f"-checkpoint-{step}" - if "x-tar" in content_type.lower(): + if content_type and "x-tar" in content_type.lower(): remote_name += ".tar.gz" else: