d8ahazard / sd_dreambooth_extension

Other
1.86k stars 282 forks source link

ValueError: source code string cannot contain null bytes #114

Closed nagaisa closed 1 year ago

nagaisa commented 1 year ago

Have you read the Readme?

Have you completely restarted the stable-diffusion-webUI, not just reloaded the UI?

Have you updated Dreambooth to the latest revision?

Please find the following lines in the console (After "Installing Requirements for WebUI") and paste them below. If you don't see these lines in the console, then update Dreambooth

Dreambooth revision is 3b3a8002da3a780c276934e8bcf308aa822f1e22 Diffusers version is 0.8.0.dev0. Torch version is 1.12.1+cu116. Torch vision version is 0.13.1+cu116.

Describe the bug when starting web ui shortly affter when it trys to load the extion it says it fails with the flolwing

Provide logs Commit hash: ac085628540d0ec6a988fad93f5b8f2154209571 Installing requirements for Web UI Error running install.py for extension sd-dreambooth-extension. Command: "C:\Users\USER\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe" "extensions\sd-dreambooth-extension\install.py" Error code: 1 stdout: <empty> stderr: Traceback (most recent call last): File "E:\stable-diffusion-webui\extensions\sd-dreambooth-extension\install.py", line 7, in <module> from launch import run_pip, run ValueError: source code string cannot contain null bytes Launching Web UI with arguments: --listen --hypernetwork-dir modules/hypernetworks --enable-insecure-extension-access --xformers --opt-split-attention --precision full --medvram --no-half --deepdanbooru Error loading script: image_scorer.py Traceback (most recent call last): File "E:\stable-diffusion-webui\modules\scripts.py", line 170, in load_scripts exec(compiled, module.__dict__) File "E:\stable-diffusion-webui\extensions\aesthetic-image-scorer\scripts\image_scorer.py", line 18, in <module> from launch import is_installed, run_pip ValueError: source code string cannot contain null bytes Error loading script: main.py Traceback (most recent call last): File "E:\stable-diffusion-webui\modules\scripts.py", line 170, in load_scripts exec(compiled, module.__dict__) File "E:\stable-diffusion-webui\extensions\sd-dreambooth-extension\scripts\main.py", line 3, in <module> from dreambooth import conversion, dreambooth File "E:\stable-diffusion-webui\extensions\sd-dreambooth-extension\dreambooth\conversion.py", line 27, in <module> from dreambooth.dreambooth import get_db_models File "E:\stable-diffusion-webui\extensions\sd-dreambooth-extension\dreambooth\dreambooth.py", line 10, in <module> from dreambooth.train_dreambooth import main File "E:\stable-diffusion-webui\extensions\sd-dreambooth-extension\dreambooth\train_dreambooth.py", line 20, in <module> from accelerate import Accelerator ModuleNotFoundError: No module named 'accelerate'

Environment What OS? Windows10 If Windows - WSL or native? native What GPU are you using? GTX 1660 ti

mykeehu commented 1 year ago

Have you latest version? More info here.

nagaisa commented 1 year ago

Have you latest version? More info here.

yes

TIMETSS commented 1 year ago

I have the same problem (also in the latest version) Error loading script: main.py Traceback (most recent call last): File "E:\Work\AI\novelai-webui-aki\modules\scripts.py", line 170, in load_scripts exec(compiled, module.__dict__) File "E:\Work\AI\novelai-webui-aki\extensions\sd_dreambooth_extension\scripts\main.py", line 3, in <module> from dreambooth import conversion, dreambooth File "E:\Work\AI\novelai-webui-aki\extensions\sd_dreambooth_extension\dreambooth\conversion.py", line 27, in <module> from dreambooth.dreambooth import get_db_models File "E:\Work\AI\novelai-webui-aki\extensions\sd_dreambooth_extension\dreambooth\dreambooth.py", line 10, in <module> from dreambooth.train_dreambooth import main File "E:\Work\AI\novelai-webui-aki\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 20, in <module> from accelerate import Accelerator ModuleNotFoundError: No module named 'accelerate'

TIMETSS commented 1 year ago

And if I provide 'accelerate', it will eventually stop there (windows does not support 'termios') File "E:\Work\AI\novelai-webui-aki\py310\lib\site-packages\accelerate\commands\menu\keymap.py", line 22, in <module> import termios ModuleNotFoundError: No module named 'termios'

d8ahazard commented 1 year ago

Please try launching using the example webui-user-dreambooth.bat file (replace the contents of webui-user.bat.

This should probably install the necessary requirements.