stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: ValueError: Invalid value for parameter `type`: bytes. Please choose from one of: ['file', 'binary']

Open chris-aeviator opened this issue 3 years ago • 6 comments
trafficstars

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

After loading a model checkpoint webui crashes

Steps to reproduce the problem

  1. follow the manual installation (https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-NVidia-GPUs/cec05501e3624d02df9e48f590356bf0db342b68#manual-installation)
  2. run python webui.py
  3. wait for the model to load

What should have happened?

Webui should have started

Commit where the problem happens

ac085628540d0ec6a988fad93f5b8f2154209571

What platforms do you use to access UI ?

Linux

What browsers do you use to access the UI ?

Mozilla Firefox

Command Line Arguments

No response

Additional information, context and logs

arning: CodeFormer not found at path /home/myuser/Development/SD/stable-diffusion-webui/repositories/CodeFormer/inference_codeformer.py
Warning: k_diffusion not found at path /home/myuser/Development/SD/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/sampling.py
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Downloading: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 939k/939k [00:00<00:00, 1.44MB/s]
Downloading: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 512k/512k [00:00<00:00, 982kB/s]
Downloading: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 389/389 [00:00<00:00, 162kB/s]
Downloading: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 905/905 [00:00<00:00, 381kB/s]
Downloading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.41k/4.41k [00:00<00:00, 1.69MB/s]
Downloading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.59G/1.59G [02:11<00:00, 13.0MB/s]
Loading weights [4bc05a7a] from /home/myuser/Development/SD/stable-diffusion-webui/models/Stable-diffusion/test-no-faces.ckpt
Applying cross attention optimization (Doggettx).
Model loaded.
Traceback (most recent call last):
    File "/home/myuser/Development/SD/stable-diffusion-webui/webui.py", line 202, in <module>
        webui()
      File "/home/myuser/Development/SD/stable-diffusion-webui/webui.py", line 149, in webui
        demo = modules.ui.create_ui(wrap_gradio_gpu_call=wrap_gradio_gpu_call)
      File "/home/myuser/Development/SD/stable-diffusion-webui/modules/ui.py", line 676, in create_ui
        txt_prompt_img = gr.File(label="", elem_id="txt2img_prompt_image", file_count="single", type="bytes", visible=False)
      File "/home/myuser/.conda/envs/diffusers/lib/python3.9/site-packages/gradio/components.py", line 2102, in __init__
        raise ValueError(
            ValueError: Invalid value for parameter `type`: bytes. Please choose from one of: ['file', 'binary']

chris-aeviator avatar Nov 10 '22 08:11 chris-aeviator

I have fixed this by changing the two occurences of byte with file

chris-aeviator avatar Nov 10 '22 08:11 chris-aeviator

Activate conda then do python -m pip install -r requirements_versions.txt

poseidonPLS avatar Nov 15 '22 12:11 poseidonPLS

@donseelim thanks - seems it's not part of https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-NVidia-GPUs/cec05501e3624d02df9e48f590356bf0db342b68#manual-installation

chris-aeviator avatar Nov 15 '22 12:11 chris-aeviator

No, its not. The requirements version just pushes all the package to the correct version. Should then fixes the type mismatch. Doesnt hurt since its in the conda env. No harm trying. Let me know if it helps.

poseidonPLS avatar Nov 15 '22 12:11 poseidonPLS

@donseelim Hi I get the same problem in Mac and I tried python -m pip install -r requirements_versions.txt. It successfully install but still can't solve the parameter issue. Is there any difference in Mac? Log: File "/opt/homebrew/anaconda3/envs/web-ui/lib/python3.10/site-packages/gradio/components.py", line 2112, in init raise ValueError( ValueError: Invalid value for parameter type: bytes. Please choose from one of: ['file', 'binary']

AlbertYisheng avatar Nov 19 '22 01:11 AlbertYisheng

@donseelim Hi I get the same problem in Mac and I tried python -m pip install -r requirements_versions.txt. It successfully install but still can't solve the parameter issue. Is there any difference in Mac? Log: File "/opt/homebrew/anaconda3/envs/web-ui/lib/python3.10/site-packages/gradio/components.py", line 2112, in init raise ValueError( ValueError: Invalid value for parameter type: bytes. Please choose from one of: ['file', 'binary']

You need to install within the conda env.

Do conda activate web-ui first then python -m pip install -r requirements_versions.txt

poseidonPLS avatar Nov 27 '22 11:11 poseidonPLS