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

[Bug]: ValueError: source code string cannot contain null bytes

Open 1119580168 opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

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

What happened?

Launching Web UI with arguments: --opt-sub-quad-attention --medvram failed

Steps to reproduce the problem

started webui-user.bat

What should have happened?

Launching Web UI

Commit where the problem happens

stable-diffusion-webui-directml

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Microsoft Edge

Command Line Arguments

--opt-sub-quad-attention --medvram && no

List of extensions

no

Console logs

venv "N:\stable-diffusion-webui-directml\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: ff558348682fea569785dcfae1f1282cfbefda6b
Installing requirements for Web UI
Launching Web UI with arguments: --opt-sub-quad-attention --medvram
Traceback (most recent call last):
  File "N:\stable-diffusion-webui-directml\launch.py", line 357, in <module>
    start()
  File "N:\stable-diffusion-webui-directml\launch.py", line 348, in start
    import webui
  File "N:\stable-diffusion-webui-directml\webui.py", line 15, in <module>
    from modules import import_hook, errors, extra_networks, ui_extra_networks_checkpoints
  File "N:\stable-diffusion-webui-directml\modules\ui_extra_networks_checkpoints.py", line 6, in <module>
    from modules import shared, ui_extra_networks, sd_models
  File "N:\stable-diffusion-webui-directml\modules\shared.py", line 12, in <module>
    import modules.interrogate
  File "N:\stable-diffusion-webui-directml\modules\interrogate.py", line 8, in <module>
    import torch
ValueError: source code string cannot contain null bytes
Press any key to continue . . .

Additional information

No response

1119580168 avatar Mar 13 '23 02:03 1119580168

check out: https://stackoverflow.com/questions/31233777/python-source-code-string-cannot-contain-null-bytes

This kind of error is not from your project source code. This kind of error emerges from your python interpreter. So the best solution is to set your python interpreter in your project env directory. or set the interpreters virtual env properly using your IDE's interpreter configuration.

hananbeer avatar Mar 14 '23 10:03 hananbeer

Wrong repo. Report in the correct one if the problem persists. https://github.com/lshqqytiger/stable-diffusion-webui-directml

catboxanon avatar Aug 11 '23 14:08 catboxanon