TheLastBen / fast-stable-diffusion

fast-stable-diffusion + DreamBooth
MIT License
7.55k stars 1.31k forks source link

(HELP) Cannot Launch Testing of Trained Model #2889

Open blooddragonhero opened 4 months ago

blooddragonhero commented 4 months ago

So after i make all the right steps this is the response after i try to test the trained model, ( i downloaded the 1.5 stable diffusion and trained it successfully ) :

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/aiohttp/client_reqrep.py", line 70, in import cchardet as chardet ModuleNotFoundError: No module named 'cchardet'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 22, in import gradio File "/usr/local/lib/python3.10/dist-packages/gradio/init.py", line 3, in import gradio.components as components File "/usr/local/lib/python3.10/dist-packages/gradio/components.py", line 34, in from gradio import media_data, processing_utils, utils File "/usr/local/lib/python3.10/dist-packages/gradio/processing_utils.py", line 23, in from gradio import encryptor, utils File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 38, in import aiohttp File "/usr/local/lib/python3.10/dist-packages/aiohttp/init.py", line 6, in from .client import ( File "/usr/local/lib/python3.10/dist-packages/aiohttp/client.py", line 59, in from .client_reqrep import ( File "/usr/local/lib/python3.10/dist-packages/aiohttp/client_reqrep.py", line 72, in import charset_normalizer as chardet # type: ignore[no-redef] File "/usr/local/lib/python3.10/dist-packages/charset_normalizer/init.py", line 24, in from .api import from_bytes, from_fp, from_path File "/usr/local/lib/python3.10/dist-packages/charset_normalizer/api.py", line 5, in from .cd import ( File "/usr/local/lib/python3.10/dist-packages/charset_normalizer/cd.py", line 9, in from .md import is_suspiciously_successive_range AttributeError: partially initialized module 'charset_normalizer' has no attribute 'md__mypyc' (most likely due to a circular import)

TheLastBen commented 4 months ago

try pip install cchardet

blooddragonhero commented 4 months ago

Did it and got this error now when testing the trained model:

Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 28, in from modules import extra_networks, ui_extra_networks_checkpoints File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui_extra_networks_checkpoints.py", line 5, in from modules import shared, ui_extra_networks, sd_models File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/shared.py", line 12, in import modules.interrogate File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/interrogate.py", line 15, in from modules import devices, paths, shared, lowvram, modelloader, errors File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/modelloader.py", line 7, in from basicsr.utils.download_util import load_file_from_url File "/usr/local/lib/python3.10/dist-packages/basicsr/init.py", line 4, in from .data import * File "/usr/local/lib/python3.10/dist-packages/basicsr/data/init.py", line 22, in _dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames] File "/usr/local/lib/python3.10/dist-packages/basicsr/data/init.py", line 22, in _dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames] File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/usr/local/lib/python3.10/dist-packages/basicsr/data/realesrgan_dataset.py", line 11, in from basicsr.data.degradations import circular_lowpass_kernel, random_mixed_kernels File "/usr/local/lib/python3.10/dist-packages/basicsr/data/degradations.py", line 8, in from torchvision.transforms.functional_tensor import rgb_to_grayscale ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'

emilkromminga commented 3 months ago

Same problem here

noiseorigin commented 3 months ago

same here

sethcwhiting commented 2 months ago

I finally got it running after entering the following into the terminal:

pip install charset_normalizer==3.2.0 aiohttp==3.8.5 torch==1.12.1 torchvision==0.13.1
pip cache purge

Not sure if the 2nd part is necessary, but it doesn't hurt.

I get some warnings/ incompatibility errors, but I just ignored them and it does actually end up running for me. Hopefully it will run for you too.