Spaces:
Running on CPU Upgrade

Почему не работает генератор изображений?

#1975
by Lesya93 - opened

Почему не работает генератор изображений?

s_api(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1555, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1193, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 851, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 654, in wrapper
response = f(*args, **kwargs)
File "/home/user/app/app.py", line 98, in infer
images_request = requests.post(url, json = payload)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='34.16.134.181', port=8080): Max retries exceeded with url: /sdxlapi/v1/predict (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f99101b0940>: Failed to establish a new connection: [Errno 111] Connection refused'))
IMPORTANT: You are using gradio version 3.45.1, however version 4.29.0 is available, please upgrade.

===== Application Startup at 2024-07-30 07:39:13 =====

/usr/local/lib/python3.10/site-packages/datasets/load.py:2547: FutureWarning: 'use_auth_token' was deprecated in favor of 'token' in version 2.14.0 and will be removed in 3.0.0.
You can remove this warning by passing 'token=' instead.
warnings.warn(

Downloading data: 0%| | 0.00/1.25k [00:00<?, ?B/s]
Downloading data: 100%|██████████| 1.25k/1.25k [00:00<00:00, 20.5kB/s]

Generating train split: 0 examples [00:00, ? examples/s]
Generating train split: 150 examples [00:00, 4962.46 examples/s]
/home/user/app/app.py:337: GradioDeprecationWarning: The style method is deprecated. Please set these arguments in the constructor instead.
with gr.Row(elem_id="prompt-container").style(mobile_collapse=False, equal_height=True):
/home/user/app/app.py:347: GradioUnusedKwargWarning: You have unused kwarg parameters in Gallery, please remove them: {'grid': [2]}
gallery = gr.Gallery(
/usr/local/lib/python3.10/site-packages/gradio/helpers.py:223: UserWarning: Examples are being cached but not all input components have example values. This may result in an exception being thrown by your function. If you do get an error while caching examples, make sure all of your inputs have example values for all of your examples or you provide default values for those particular parameters in your function.
warnings.warn(
Caching examples at: '/home/user/app/gradio_cached_examples/16'
Caching example 1/5
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 198, in _new_conn
sock = connection.create_connection(
File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
raise err
File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen
response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 496, in _make_request
conn.request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 400, in request
self.endheaders()
File "/usr/local/lib/python3.10/http/client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1038, in _send_output
self.send(msg)
File "/usr/local/lib/python3.10/http/client.py", line 976, in send
self.connect()
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 238, in connect
self.sock = self._new_conn()
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 213, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f99101b0940>: Failed to establish a new connection: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 847, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='34.16.134.181', port=8080): Max retries exceeded with url: /sdxlapi/v1/predict (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f99101b0940>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/user/app/app.py", line 375, in
ex = gr.Examples(examples=examples, fn=infer, inputs=[text, negative, guidance_scale], outputs=[gallery, community_group], cache_examples=True, postprocess=False)
File "/usr/local/lib/python3.10/site-packages/gradio/helpers.py", line 75, in create_examples
client_utils.synchronize_async(examples_obj.create)
File "/usr/local/lib/python3.10/site-packages/gradio_client/utils.py", line 540, in synchronize_async
return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, **kwargs) # type: ignore
File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 103, in sync
raise return_result
File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 56, in _runner
result[0] = await coro
File "/usr/local/lib/python3.10/site-packages/gradio/helpers.py", line 277, in create
await self.cache()
File "/usr/local/lib/python3.10/site-packages/gradio/helpers.py", line 338, in cache
prediction = await Context.root_block.process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1555, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1193, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 851, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 654, in wrapper
response = f(*args, **kwargs)
File "/home/user/app/app.py", line 98, in infer
images_request = requests.post(url, json = payload)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='34.16.134.181', port=8080): Max retries exceeded with url: /sdxlapi/v1/predict (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f99101b0940>: Failed to establish a new connection: [Errno 111] Connection refused'))
IMPORTANT: You are using gradio version 3.45.1, however version 4.29.0 is available, please upgrade.

/usr/local/lib/python3.10/site-packages/datasets/load.py:2547: FutureWarning: 'use_auth_token' was deprecated in favor of 'token' in version 2.14.0 and will be removed in 3.0.0.
You can remove this warning by passing 'token=' instead.
warnings.warn(

Downloading data: 0%| | 0.00/1.25k [00:00<?, ?B/s]
Downloading data: 100%|██████████| 1.25k/1.25k [00:00<00:00, 47.0kB/s]

Generating train split: 0 examples [00:00, ? examples/s]
Generating train split: 150 examples [00:00, 60617.17 examples/s]
/home/user/app/app.py:337: GradioDeprecationWarning: The style method is deprecated. Please set these arguments in the constructor instead.
with gr.Row(elem_id="prompt-container").style(mobile_collapse=False, equal_height=True):
/home/user/app/app.py:347: GradioUnusedKwargWarning: You have unused kwarg parameters in Gallery, please remove them: {'grid': [2]}
gallery = gr.Gallery(
/usr/local/lib/python3.10/site-packages/gradio/helpers.py:223: UserWarning: Examples are being cached but not all input components have example values. This may result in an exception being thrown by your function. If you do get an error while caching examples, make sure all of your inputs have example values for all of your examples or you provide default values for those particular parameters in your function.
warnings.warn(
Caching examples at: '/home/user/app/gradio_cached_examples/16'
Caching example 1/5
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 198, in _new_conn
sock = connection.create_connection(
File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
raise err
File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen
response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 496, in _make_request
conn.request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 400, in request
self.endheaders()
File "/usr/local/lib/python3.10/http/client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1038, in _send_output
self.send(msg)
File "/usr/local/lib/python3.10/http/client.py", line 976, in send
self.connect()
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 238, in connect
self.sock = self._new_conn()
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 213, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f3d181fc970>: Failed to establish a new connection: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 847, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='34.16.134.181', port=8080): Max retries exceeded with url: /sdxlapi/v1/predict (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3d181fc970>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/user/app/app.py", line 375, in
ex = gr.Examples(examples=examples, fn=infer, inputs=[text, negative, guidance_scale], outputs=[gallery, community_group], cache_examples=True, postprocess=False)
File "/usr/local/lib/python3.10/site-packages/gradio/helpers.py", line 75, in create_examples
client_utils.synchronize_async(examples_obj.create)
File "/usr/local/lib/python3.10/site-packages/gradio_client/utils.py", line 540, in synchronize_async
return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, **kwargs) # type: ignore
File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 103, in sync
raise return_result
File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 56, in _runner
result[0] = await coro
File "/usr/local/lib/python3.10/site-packages/gradio/helpers.py", line 277, in create
await self.cache()
File "/usr/local/lib/python3.10/site-packages/gradio/helpers.py", line 338, in cache
prediction = await Context.root_block.process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1555, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1193, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 851, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 654, in wrapper
response = f(*args, **kwargs)
File "/home/user/app/app.py", line 98, in infer
images_request = requests.post(url, json = payload)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='34.16.134.181', port=8080): Max retries exceeded with url: /sdxlapi/v1/predict (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3d181fc970>: Failed to establish a new connection: [Errno 111] Connection refused'))
IMPORTANT: You are using gradio version 3.45.1, however version 4.29.0 is available, please upgrade.

Sign up or log in to comment