fast-stable-diffusion
fast-stable-diffusion copied to clipboard
TypeError: check_deprecated_parameters() missing 1 required keyword-only argument: 'kwargs'
When try to use this Google Collab https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast-DreamBooth.ipynb : Running from Connect to Drive until Training is working properly without any erros. BUT when running the Test The Trained Model, error below occurs:
Calculating sha256 for /content/gdrive/MyDrive/Fast-Dreambooth/Sessions/mltst/mltst.ckpt: 218063197008fa54ed8ec46690bfc86e2a8de66918f849f78d026c31c076bca4
Loading weights [2180631970] from /content/gdrive/MyDrive/Fast-Dreambooth/Sessions/mltst/mltst.ckpt
Creating model from config: /content/gdrive/MyDrive/sd/stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Downloading vocab.json100% 961k/961k [00:00<00:00, 2.95MB/s]
Downloading merges.txt100% 525k/525k [00:00<00:00, 37.8MB/s]
Downloading (…)cial_tokens_map.json100% 389/389 [00:00<00:00, 2.49MB/s]
Downloading tokenizer_config.json100% 905/905 [00:00<00:00, 4.50MB/s]
Downloading config.json100% 4.52k/4.52k [00:00<00:00, 25.6MB/s]
Applying scaled dot product cross attention optimization.
Textual inversion embeddings loaded(0):
Model loaded in 19.2s (calculate hash: 7.9s, load weights from disk: 5.6s, create model: 2.6s, apply weights to model: 1.6s, apply half(): 0.7s, move model to device: 0.7s).
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 337, in <module>
webui()
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 240, in webui
shared.demo = modules.ui.create_ui();shared.demo.queue(concurrency_count=999999,status_update_rate=0.1)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui.py", line 460, in create_ui
with gr.Blocks(analytics_enabled=False) as txt2img_interface:
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 486, in __init__
super().__init__(render=False, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 274, in __init__
super().__init__(visible=visible, render=render, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 80, in __init__
check_deprecated_parameters(self.__class__.__name__, **kwargs)
TypeError: check_deprecated_parameters() missing 1 required keyword-only argument: 'kwargs'
I Using Python 3 Google Compute Engine backend (GPU) (Collab Pro)
Please help to advice. Thank you!
make sure gradio==3.16.2 is installed
Hi @TheLastBen , please see the screenshot above. The gradio version is already installed with version 3.16.2, do you have any idea what should I do?
thank you
try the latest notebook https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast-DreamBooth.ipynb, test it without the first, cell, do a test training for 20 steps and see if the error persists
Hi @TheLastBen , I am facing the same problem using the latest notebook. What do you mean by "test it without the first, cell"? The first cell is loading the GDrive? And do I load my trained model to do the test training or do I test-train a new model? Thanks a lot!
Hi @TheLastBen , I am facing the same problem using the latest notebook. What do you mean by "test it without the first, cell"? The first cell is loading the GDrive? And do I load my trained model to do the test training or do I test-train a new model? Thanks a lot!
run it without the gdrive cell, use the default model, train for 20 steps just to be able to run the testing cell, and see if the error is the same
Hi @TheLastBen , I followed your latest instructions and it worked. No error reported for Test The Trained Model cell.
I can't load the previous session/test model without mounting GDrive, so what should we do? Very much appreciated!
rename your sd folder to sd_old
I'm facing the same "TypeError: check_deprecated_parameters() missing 1 required keyword-only argument: 'kwargs'" error on Colab, but deleting the sd folder and letting it regenerate does not resolve the problem.
@chepy21 did you find a solution here?
use the latest notebook
its incompatibility w stable-diffusion-webui. u can try using updated gradio
!pip install cchardet
!pip install gradio==3.23.0 --no-deps -qq
try using gradio 3.23 and it works
its incompatibility w stable-diffusion-webui. u can try using updated gradio
!pip install cchardet !pip install gradio==3.23.0 --no-deps -qq
try using gradio 3.23 and it works
The same problem. I installed gradio 3.23.0 and now there is such an error
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 22, in <module>
import gradio
File "/usr/local/lib/python3.10/dist-packages/gradio/__init__.py", line 3, in <module>
import gradio.components as components
File "/usr/local/lib/python3.10/dist-packages/gradio/components.py", line 33, in <module>
from gradio.blocks import Block, BlockContext
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 23, in <module>
from gradio import (
ImportError: cannot import name 'encryptor' from partially initialized module 'gradio' (most likely due to a circular import) (/usr/local/lib/python3.10/dist-packages/gradio/__init__.py)
i had that same error, you have to run the notebook from scratch. or uninstall the old gradio before you install the updated version.
I got the same error, uninstalled and installed gradio - still didnt work. Same error persists,
Same issue here - looks like the webui.py is throwing the error:
Traceback (most recent call last):
File "/content/drive/MyDrive/sd/stable-diffusion-webui/webui.py", line 337, in
Having the same problem, tried with gradio==3.23.0 and the problem persists
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 22, in <module>
import gradio
File "/usr/local/lib/python3.10/dist-packages/gradio/__init__.py", line 3, in <module>
import gradio.components as components
File "/usr/local/lib/python3.10/dist-packages/gradio/components/__init__.py", line 1, in <module>
from gradio.components.annotated_image import AnnotatedImage
File "/usr/local/lib/python3.10/dist-packages/gradio/components/annotated_image.py", line 13, in <module>
from gradio.components.base import IOComponent, _Keywords
File "/usr/local/lib/python3.10/dist-packages/gradio/components/base.py", line 29, in <module>
from gradio.blocks import Block, BlockContext
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 23, in <module>
from gradio import (
ImportError: cannot import name 'encryptor' from partially initialized module 'gradio' (most likely due to a circular import) (/usr/local/lib/python3.10/dist-packages/gradio/__init__.py)```
Same here after installing gradio==3.23.0
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 22, in <module>
import gradio
File "/usr/local/lib/python3.10/dist-packages/gradio/__init__.py", line 3, in <module>
import gradio.components as components
File "/usr/local/lib/python3.10/dist-packages/gradio/components/__init__.py", line 1, in <module>
from gradio.components.annotated_image import AnnotatedImage
File "/usr/local/lib/python3.10/dist-packages/gradio/components/annotated_image.py", line 13, in <module>
from gradio.components.base import IOComponent, _Keywords
File "/usr/local/lib/python3.10/dist-packages/gradio/components/base.py", line 29, in <module>
from gradio.blocks import Block, BlockContext
File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 23, in <module>
from gradio import (
ImportError: cannot import name 'encryptor' from partially initialized module 'gradio' (most likely due to a circular import) (/usr/local/lib/python3.10/dist-packages/gradio/__init__.py)
When attempting to use the "Test The Trained Model" cell to test a previously trained model, the following error occurs:
File "/usr/local/lib/python3.10/dist-packages/aiohttp/client_reqrep.py", line 70, in <module>
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 <module>
import gradio
File "/usr/local/lib/python3.10/dist-packages/gradio/__init__.py", line 3, in <module>
import gradio.components as components
File "/usr/local/lib/python3.10/dist-packages/gradio/components.py", line 34, in <module>
from gradio import media_data, processing_utils, utils
File "/usr/local/lib/python3.10/dist-packages/gradio/processing_utils.py", line 23, in <module>
from gradio import encryptor, utils
File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 38, in <module>
import aiohttp
File "/usr/local/lib/python3.10/dist-packages/aiohttp/__init__.py", line 6, in <module>
from .client import (
File "/usr/local/lib/python3.10/dist-packages/aiohttp/client.py", line 59, in <module>
from .client_reqrep import (
File "/usr/local/lib/python3.10/dist-packages/aiohttp/client_reqrep.py", line 72, in <module>
import charset_normalizer as chardet # type: ignore[no-redef]
File "/usr/local/lib/python3.10/dist-packages/charset_normalizer/__init__.py", line 24, in <module>
from .api import from_bytes, from_fp, from_path
File "/usr/local/lib/python3.10/dist-packages/charset_normalizer/api.py", line 5, in <module>
from .cd import (
File "/usr/local/lib/python3.10/dist-packages/charset_normalizer/cd.py", line 9, in <module>
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)