oobabooga / text-generation-webui

A Gradio web UI for Large Language Models.
GNU Affero General Public License v3.0
39.58k stars 5.2k forks source link

Generating 0 Tokens and Can't use Send a Picture Feature #4467

Closed denyicz closed 5 months ago

denyicz commented 10 months ago

Describe the bug

When i try to enter a prompt or send a picture, terminal outputs a library error and also generating 0 or very low tokens.

Is there an existing issue for this?

Reproduction

0 - Load "TheBloke_chronos-hermes-13B-GPTQ_gptq-4bit-32g-actorder_True" Model, select ExLlama as model loader. 1 - Session tab > Extensions SubTab > check marks on both gallery, openai,sd_api_pictures,send_pictures 2- drag down png file 3-) Force picture response 4-) enter a prompt.

Screenshot

resim resim

Logs

2023-11-02 08:24:54 INFO:Loaded the model in 47.84 seconds.
Traceback (most recent call last):
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\queueing.py", line 407, in call_prediction
    output = await route_utils.call_process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 226, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1550, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1199, in call_function
    prediction = await utils.async_iteration(iterator)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\utils.py", line 519, in async_iteration
    return await iterator.__anext__()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\utils.py", line 512, in __anext__
    return await anyio.to_thread.run_sync(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\utils.py", line 495, in run_sync_iterator_async
    return next(iterator)
           ^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\utils.py", line 649, in gen_wrapper
    yield from f(*args, **kwargs)
  File "C:\text-generation-webui-main\modules\chat.py", line 329, in generate_chat_reply_wrapper
    for i, history in enumerate(generate_chat_reply(text, state, regenerate, _continue, loading_message=True)):
  File "C:\text-generation-webui-main\modules\chat.py", line 297, in generate_chat_reply
    for history in chatbot_wrapper(text, state, regenerate=regenerate, _continue=_continue, loading_message=loading_message):
  File "C:\text-generation-webui-main\modules\chat.py", line 203, in chatbot_wrapper
    visible_text = html.escape(text)
                   ^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\html\__init__.py", line 19, in escape
    s = s.replace("&", "&") # Must be done first!
        ^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'replace'
Output generated in 60.02 seconds (0.02 tokens/s, 1 tokens, context 1419, seed 1754692964)
Requesting Auto1111 to re-load last checkpoint used...
Traceback (most recent call last):
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\queueing.py", line 407, in call_prediction
    output = await route_utils.call_process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 226, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1550, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1199, in call_function
    prediction = await utils.async_iteration(iterator)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\utils.py", line 519, in async_iteration
    return await iterator.__anext__()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\utils.py", line 512, in __anext__
    return await anyio.to_thread.run_sync(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\utils.py", line 495, in run_sync_iterator_async
    return next(iterator)
           ^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\utils.py", line 649, in gen_wrapper
    yield from f(*args, **kwargs)
  File "C:\text-generation-webui-main\modules\chat.py", line 329, in generate_chat_reply_wrapper
    for i, history in enumerate(generate_chat_reply(text, state, regenerate, _continue, loading_message=True)):
  File "C:\text-generation-webui-main\modules\chat.py", line 297, in generate_chat_reply
    for history in chatbot_wrapper(text, state, regenerate=regenerate, _continue=_continue, loading_message=loading_message):
  File "C:\text-generation-webui-main\modules\chat.py", line 244, in chatbot_wrapper
    output['visible'][-1][1] = apply_extensions('output', output['visible'][-1][1], state, is_chat=True)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\modules\extensions.py", line 224, in apply_extensions
    return EXTENSION_MAP[typ](*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\modules\extensions.py", line 82, in _apply_string_extensions
    text = func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\extensions\sd_api_pictures\script.py", line 219, in output_modifier
    string = get_SD_pictures(string, state['character_menu']) + "\n" + text
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\text-generation-webui-main\extensions\sd_api_pictures\script.py", line 134, in get_SD_pictures
    give_VRAM_priority('SD')
  File "C:\text-generation-webui-main\extensions\sd_api_pictures\script.py", line 52, in give_VRAM_priority
    response.raise_for_status()
  File "C:\text-generation-webui-main\installer_files\env\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://127.0.0.1:7860/sdapi/v1/reload-checkpoint

System Info

Windows 11 Home 64 Bit
Ryzen 5 3600
Zotac Rtx 2060 Super mini
16gb Ram
krslim commented 10 months ago

I'm having the same issue with send_pictures, it was working well until recently.

diginovo commented 10 months ago

I'm having the same issue with send_pictures, it was working well for me before.

red-sponge commented 9 months ago

Me too!

Summer-FF commented 8 months ago

me too! +1

dbrooks95 commented 8 months ago

For those who are still experiencing this issue. I fixed this on my end by first uploading the file / image like normal. Then if you get an error like AttributeError: 'NoneType' object has no attribute 'replace', press the generate button without filling the prompt with anything effectively leaving it blank. After that you shouldn't see the error pop up for that chat session.

frank0828 commented 7 months ago

I checked the mark on "send picture" and restarted Webui, but I can't find the place where I can upload the file/image, can you tell me where that is?

For those who are still experiencing this issue. I fixed this on my end by first uploading the file / image like normal. Then if you get an error like AttributeError: 'NoneType' object has no attribute 'replace', press the generate button without filling the prompt with anything effectively leaving it blank. After that you shouldn't see the error pop up for that chat session.

github-actions[bot] commented 5 months ago

This issue has been closed due to inactivity for 2 months. If you believe it is still relevant, please leave a comment below. You can tag a developer in your comment.