Open wardensc2 opened 1 year ago
I was having this same issue, and at least for me, it is down to the following.
If you have the Civitai helper installed, and the DreamShaper XL Alpha 2 model installed (https://civitai.com/models/112902/dreamshaper-xl-09-alpha), and you have retrieved the info for that model, you will break.
This is because the info for that model has some value in the JSON file that is a very large number. The file is 20k lines long, so I did not spend the time to find the actual number, but it is from somewhere in the images array.
This causes the following failure, I believe not as part of the original parse, but as part of something ingesting the resulting json at a layer that does not like that very large number.
2023-08-04 02:24:09 * API error: GET: http://127.0.0.1:7860/cozy-nest/extra_networks/full {'error': 'TypeError', 'detail': '', 'body': '', 'errors': 'Integer exceeds 64-bit range'} 2023-08-04 02:24:09 OverflowError: int too big to convert 2023-08-04 02:24:09 2023-08-04 02:24:09 The above exception was the direct cause of the following exception: 2023-08-04 02:24:09 2023-08-04 02:24:09 Traceback (most recent call last): 2023-08-04 02:24:09 File "/stable-diffusion-webui/modules/api/api.py", line 152, in exception_handling 2023-08-04 02:24:09 return await call_next(request) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 84, in call_next 2023-08-04 02:24:09 raise app_exc 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 70, in coro 2023-08-04 02:24:09 await self.app(scope, receive_or_disconnect, send_no_error) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 108, in call 2023-08-04 02:24:09 response = await self.dispatch_func(request, call_next) 2023-08-04 02:24:09 File "/stable-diffusion-webui/modules/api/api.py", line 116, in log_and_time 2023-08-04 02:24:09 res: Response = await call_next(req) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 84, in call_next 2023-08-04 02:24:09 raise app_exc 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 70, in coro 2023-08-04 02:24:09 await self.app(scope, receive_or_disconnect, send_no_error) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 84, in call 2023-08-04 02:24:09 await self.app(scope, receive, send) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in call 2023-08-04 02:24:09 await responder(scope, receive, send) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in call 2023-08-04 02:24:09 await self.app(scope, receive, self.send_with_gzip) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call 2023-08-04 02:24:09 raise exc 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call 2023-08-04 02:24:09 await self.app(scope, receive, sender) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call 2023-08-04 02:24:09 raise e 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call 2023-08-04 02:24:09 await self.app(scope, receive, send) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 718, in call 2023-08-04 02:24:09 await route.handle(scope, receive, send) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle 2023-08-04 02:24:09 await self.app(scope, receive, send) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 66, in app 2023-08-04 02:24:09 response = await func(request) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 266, in app 2023-08-04 02:24:09 response = actual_response_class(content, response_args) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 196, in init 2023-08-04 02:24:09 super().init(content, status_code, headers, media_type, background) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 55, in init 2023-08-04 02:24:09 self.body = self.render(content) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/gradio/routes.py", line 74, in render 2023-08-04 02:24:09 return ORJSONResponse._render(content) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/gradio/routes.py", line 67, in _render 2023-08-04 02:24:09 return orjson.dumps( 2023-08-04 02:24:09 TypeError: Integer exceeds 64-bit range 2023-08-04 02:24:09 2023-08-04 02:24:09 ---
As a stopgap, I edited my local dreamshaperXL09Alpha_alpha2Xl10.civitai.info file to blank the images array, though removing or renaming the file also works to work around the issue.
I was having this same issue, and at least for me, it is down to the following.
If you have the Civitai helper installed, and the DreamShaper XL Alpha 2 model installed (https://civitai.com/models/112902/dreamshaper-xl-09-alpha), and you have retrieved the info for that model, you will break.
This is because the info for that model has some value in the JSON file that is a very large number. The file is 20k lines long, so I did not spend the time to find the actual number, but it is from somewhere in the images array.
This causes the following failure, I believe not as part of the original parse, but as part of something ingesting the resulting json at a layer that does not like that very large number.
2023-08-04 02:24:09 * API error: GET: http://127.0.0.1:7860/cozy-nest/extra_networks/full {'error': 'TypeError', 'detail': '', 'body': '', 'errors': 'Integer exceeds 64-bit range'} 2023-08-04 02:24:09 OverflowError: int too big to convert 2023-08-04 02:24:09 2023-08-04 02:24:09 The above exception was the direct cause of the following exception: 2023-08-04 02:24:09 2023-08-04 02:24:09 Traceback (most recent call last): 2023-08-04 02:24:09 File "/stable-diffusion-webui/modules/api/api.py", line 152, in exception_handling 2023-08-04 02:24:09 return await call_next(request) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 84, in call_next 2023-08-04 02:24:09 raise app_exc 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 70, in coro 2023-08-04 02:24:09 await self.app(scope, receive_or_disconnect, send_no_error) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 108, in call 2023-08-04 02:24:09 response = await self.dispatch_func(request, call_next) 2023-08-04 02:24:09 File "/stable-diffusion-webui/modules/api/api.py", line 116, in log_and_time 2023-08-04 02:24:09 res: Response = await call_next(req) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 84, in call_next 2023-08-04 02:24:09 raise app_exc 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 70, in coro 2023-08-04 02:24:09 await self.app(scope, receive_or_disconnect, send_no_error) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 84, in call 2023-08-04 02:24:09 await self.app(scope, receive, send) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in call 2023-08-04 02:24:09 await responder(scope, receive, send) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in call 2023-08-04 02:24:09 await self.app(scope, receive, self.send_with_gzip) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call 2023-08-04 02:24:09 raise exc 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call 2023-08-04 02:24:09 await self.app(scope, receive, sender) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call 2023-08-04 02:24:09 raise e 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call 2023-08-04 02:24:09 await self.app(scope, receive, send) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 718, in call 2023-08-04 02:24:09 await route.handle(scope, receive, send) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle 2023-08-04 02:24:09 await self.app(scope, receive, send) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 66, in app 2023-08-04 02:24:09 response = await func(request) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 266, in app 2023-08-04 02:24:09 response = actual_response_class(content, response_args) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 196, in init 2023-08-04 02:24:09 super().init(content, status_code, headers, media_type, background) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 55, in init 2023-08-04 02:24:09 self.body = self.render(content) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/gradio/routes.py", line 74, in render 2023-08-04 02:24:09 return ORJSONResponse._render(content) 2023-08-04 02:24:09 File "/usr/local/lib/python3.10/site-packages/gradio/routes.py", line 67, in _render 2023-08-04 02:24:09 return orjson.dumps( 2023-08-04 02:24:09 TypeError: Integer exceeds 64-bit range 2023-08-04 02:24:09 2023-08-04 02:24:09 ---
As a stopgap, I edited my local dreamshaperXL09Alpha_alpha2Xl10.civitai.info file to blank the images array, though removing or renaming the file also works to work around the issue.
I think Cozy need to update to to new A1111 for stable XL
I have only done some basic testing, and its hitting some memory limits, but the A1111 1.5 update is otherwise working for me with SDXL with some super basic testing.
The JSON within the file named xxx.foo.info might include Comfy's workflow, containing a widget capable of processing Uint64 range values. The JSON holds widget information, providing minimum and maximum values. However, the maximum value can sometimes get dumped as a value exceeding the Int64 range. During restoration, the direct use of json.load results in the Uint64's maximum value being restored as an integer. Within Gradio's internals, during JSON serialization for display, the conversion to numpy int64 takes place. Consequently, this leads to an error due to Uint64 values exceeding the int64 range. Hence, it's worth considering that in the 'get_info' function within 'cozy_extra_network.py', when utilizing json.load, a parser function could be assigned to the 'parse_int' named parameter of json.load. This parser function would clip the value to fit within the int64 range.
What happened?
A bug happened! After I updated WebUI A1111 for Stable XL, all the extra network just run the loading process but not show any extra network
Webui
Automatic1111's webui
What browsers are you seeing the problem on?
Firefox
Additional info
A bug happened!
Relevant browser log output
No response
Relevant log output from the webui
API error: GET: http://127.0.0.1:7860/cozy-nest/extra_networks/full {'error': 'TypeError', 'detail': '', 'body': '', 'errors': 'Integer exceeds 64-bit range'} API error: GET: http://127.0.0.1:7860/cozy-nest/extra_networks/full {'error': 'AttributeError', 'detail': '', 'body': '', 'errors': "'str' object has no attribute 'traceback'"} --- Logging error --
Checklist