text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

KeyError: 'serialized_input'

Open Sophytes opened this issue 1 year ago • 6 comments

Describe the bug

INFO:Gradio HTTP request redirected to localhost :) bin C:\Users\PC\Downloads\AI\oobabooga_windows\installer_files\env\lib\site-packages\bitsandbytes\libbitsandbytes_cuda117.dll INFO:Loading facebook_opt-2.7b... INFO:Loaded the model in 6.37 seconds. INFO:Loading the extension "gallery"... Traceback (most recent call last): File "C:\Users\PC\Downloads\AI\oobabooga_windows\text-generation-webui\server.py", line 885, in create_interface() File "C:\Users\PC\Downloads\AI\oobabooga_windows\text-generation-webui\server.py", line 472, in create_interface with gr.Blocks(css=ui.css if not shared.is_chat() else ui.css + ui.chat_css, analytics_enabled=False, title=title, theme=ui.theme) as shared.gradio['interface']: File "C:\Users\PC\Downloads\AI\oobabooga_windows\installer_files\env\lib\site-packages\gradio\blocks.py", line 1285, in exit self.config = self.get_config_file() File "C:\Users\PC\Downloads\AI\oobabooga_windows\installer_files\env\lib\site-packages\gradio\blocks.py", line 1261, in get_config_file "input": list(block.input_api_info()), # type: ignore File "C:\Users\PC\Downloads\AI\oobabooga_windows\installer_files\env\lib\site-packages\gradio_client\serializing.py", line 40, in input_api_info return (api_info["serialized_input"][0], api_info["serialized_input"][1]) KeyError: 'serialized_input'

Done! Pressione qualquer tecla para continuar. . .

Strange that when I used the old version it works... and before you ask me I've tried using everything suggested here: https://github.com/oobabooga/text-generation-webui/issues/1825

Is there an existing issue for this?

  • [X] I have searched the existing issues

Reproduction

start_windows

Screenshot

No response

Logs

.

System Info

.

Sophytes avatar May 06 '23 18:05 Sophytes

I have exact same issue.

brian-n-millar avatar May 06 '23 18:05 brian-n-millar

Same issue. WSL Ubuntu22.0.4.2

My setup from new Ubuntu install: sudo apt-get update sudo apt-get upgrade sudo apt install build-essential

wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run

sudo sh cuda_11.8.0_520.61.05_linux.run (did not select Kernel Objects - nvidia-fs) Summary: Driver: Not Selected Toolkit: Installed in /usr/local/cuda-11.8/

export PATH="/usr/local/cuda-11.8/bin:$PATH" export LD_LIBRARY_PATH="/usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH"

curl -sL "https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh" > "Miniconda3.sh" bash Miniconda3.sh init yes exit

wsl ubuntu-22.04 conda create -n textgen python=3.10.9 conda activate textgen pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 git clone https://github.com/oobabooga/text-generation-webui cd text-generation-webui pip install -r requirements.txt mkdir repositories cd repositories git clone https://github.com/qwopqwop200/GPTQ-for-LLaMa.git cd GPTQ-for-LLaMa pip install -r requirements.txt

\wsl$\Ubuntu-22.04\home\username\miniconda3\envs\textgen\lib\python3.10\site-packages\bitsandbytes Renamed libbitsandbytes_cpu.so to libbitsandbytes_cpu.soOLD Copied libbitsandbytes_cuda118.so and renamed to libbitsandbytes_cpu.so

cd /home/username/text-generation-webui python server.py

Output: INFO:Gradio HTTP request redirected to localhost :) bin /home/username/miniconda3/envs/textgen/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so Traceback (most recent call last): File "/home/username/text-generation-webui/server.py", line 885, in create_interface() File "/home/username/text-generation-webui/server.py", line 472, in create_interface with gr.Blocks(css=ui.css if not shared.is_chat() else ui.css + ui.chat_css, analytics_enabled=False, title=title, theme=ui.theme) as shared.gradio['interface']: File "/home/username/miniconda3/envs/textgen/lib/python3.10/site-packages/gradio/blocks.py", line 1285, in exit self.config = self.get_config_file() File "/home/username/miniconda3/envs/textgen/lib/python3.10/site-packages/gradio/blocks.py", line 1261, in get_config_file "input": list(block.input_api_info()), # type: ignore File "/home/username/miniconda3/envs/textgen/lib/python3.10/site-packages/gradio_client/serializing.py", line 40, in input_api_info return (api_info["serialized_input"][0], api_info["serialized_input"][1]) KeyError: 'serialized_input'

Possible fix: https://github.com/oobabooga/text-generation-webui/issues/1825#issuecomment-1537074002

Edit: I ran these and then it worked (these first two may not be required if the gradio downgrade fixes it): Changed the line in requirements.txt: gradio==3.25.0 to gradio==3.28.3 python.exe -m pip install --force gradio==3.28.3 pip uninstall gradio_client && pip install gradio_client==0.1.0

GuruVirus avatar May 06 '23 19:05 GuruVirus

I just hit this too in a fresh install. Fixed for me with pip uninstall gradio_client && pip install gradio_client==0.1.0

homps avatar May 06 '23 19:05 homps

I just hit this too in a fresh install. Fixed for me with pip uninstall gradio_client && pip install gradio_client==0.1.0

Running this also fixes gallery causing a crash on initialization using gradio 3.28.3 (if you used python.exe -m pip install --force gradio==3.28.3) as gradio is reverted back to a previous version when update_windows.bat is run.

Gallery also works on this without having to update gradio, only gradio_client seems to need a change.

XenioxYT avatar May 06 '23 20:05 XenioxYT

I just hit this too in a fresh install. Fixed for me with pip uninstall gradio_client && pip install gradio_client==0.1.0

I had the same issue on a fresh install too. The only difference is that i'm running everything on a Apple silicon M2 chip with macOS Ventura (latest version).

I can confirm that downgrading from gradio_client v0.2 to v0.1 using @homps's command fixed the issue.

Manoz avatar May 06 '23 21:05 Manoz

I think that this should have solved it https://github.com/oobabooga/text-generation-webui/commit/81be7c2dd49708cf1c225ac01ea64f4e46e972ee

To fix manually:

pip install gradio_client==0.1.4

oobabooga avatar May 07 '23 00:05 oobabooga