diff --git a/modules/utils/runwareUtils.py b/modules/utils/runwareUtils.py index 0dd5b2d..a3bfb22 100644 --- a/modules/utils/runwareUtils.py +++ b/modules/utils/runwareUtils.py @@ -254,9 +254,8 @@ def inferenecRequest(genConfig): } try: - def recaller(): - response = session.post( + return session.post( RUNWARE_API_BASE_URL, headers=headers, json=genConfig, @@ -264,15 +263,14 @@ def inferenecRequest(genConfig): allow_redirects=False, stream=True, ) - if response.status_code != 200: - print(f"[Debugging] Runware Response Status Code: {response.status_code}") - return response genResult = generalRequestWrapper(recaller) try: genResult = genResult.json() except json.JSONDecodeError as e: print(f"[Debugging] Runware JSON Decode Error: {str(e)}") + print(f"[Debugging] Runware Response Status Code: {genResult.status_code}") + print(f"[Debugging] Runware Response Headers: {genResult.headers}") print(f"[Debugging] Runware Raw Response Content: {genResult.content}") raise Exception("Error: Invalid JSON response from API!") if "errors" in genResult: diff --git a/requirements.txt b/requirements.txt index 3e338bf..0fc4ba4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,3 @@ -python-dotenv \ No newline at end of file +python-dotenv +brotli +zstd \ No newline at end of file