-->> Shark's website <<--

Shark's Help Forum

Search
  Create an account  
Stable diffusion and SharkCodecs Error

#1
Hey Sharky, 
I have been using your tools for many years without issues so well done for the fantastic tools you provide.

 I have recently started looking at an AI application called Stable-diffusion.
https://www.youtube.com/watch?v=6MeJKnbv...NU&index=3

I create it in a folder on the C:AI directory. It also uses Git and Python 3.10.6

The environment is :
@echo off
set DIR=%~dp0system
set PATH=%DIR%\git\bin;%DIR%\python;%DIR%\python\Scripts;%PATH%
set PY_LIBS=%DIR%\python\Scripts\Lib;%DIR%\python\Scripts\Lib\site-packages
set PY_PIP=%DIR%\python\Scripts
set SKIP_VENV=1
set PIP_INSTALLER_LOCATION=%DIR%\python\get-pip.py
set TRANSFORMERS_CACHE=%DIR%\transformers-cache


Before installing SharkCodecs Stable Diffusion runs fine via the command line starting the run.bat:


Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.10.1
Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2
Launching Web UI with arguments:
C:\AI\system\python\lib\site-packages\timm\models\layers\__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
  warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning)
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Loading weights [fe4efff1e1] from C:\AI\webui\models\Stable-diffusion\sd-v1-4.ckpt
Running on local URL:  http://127.0.0.1:7860


The problem is that as soon as I launch the launcher64.exe: C:\Codecs\Shark007Codecs\Launcher64.exe
the desktop icons appears to refresh (even before running reset option) the process for Stable Diffusion is broken:

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.10.1
Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2
Launching Web UI with arguments:
Traceback (most recent call last):
  File "C:\AI\webui\launch.py", line 48, in <module>
    main()
  File "C:\AI\webui\launch.py", line 44, in main
    start()
  File "C:\AI\webui\modules\launch_utils.py", line 465, in start
    import webui
  File "C:\AI\webui\webui.py", line 13, in <module>
    initialize.imports()
  File "C:\AI\webui\modules\initialize.py", line 23, in imports
    import gradio  # noqa: F401
  File "C:\AI\system\python\lib\site-packages\gradio\__init__.py", line 3, in <module>
    import gradio.components as components
  File "C:\AI\system\python\lib\site-packages\gradio\components\__init__.py", line 1, in <module>
    from gradio.components.annotated_image import AnnotatedImage
  File "C:\AI\system\python\lib\site-packages\gradio\components\annotated_image.py", line 13, in <module>
    from gradio.components.base import IOComponent, _Keywords
  File "C:\AI\system\python\lib\site-packages\gradio\components\base.py", line 29, in <module>
    from gradio.blocks import Block, BlockContext
  File "C:\AI\system\python\lib\site-packages\gradio\blocks.py", line 28, in <module>
    from gradio import (
  File "C:\AI\system\python\lib\site-packages\gradio\networking.py", line 18, in <module>
    from gradio.routes import App
  File "C:\AI\system\python\lib\site-packages\gradio\routes.py", line 60, in <module>
    mimetypes.init()
  File "mimetypes.py", line 368, in init
  File "mimetypes.py", line 253, in read_windows_registry
PermissionError: [WinError 5] Access is denied
Press any key to continue . . .

Seems to affect the permissions of the C:AI folder or somehow screws up the python pip stuff.. 

When I first installed Stable-diffusion it just never worked. Spent a week trying to look at permissions and Python and PIP's. lol.
Its only cus I did a clean install - I got it to work. Then it failed - so I worked backwards to find out what it was causing the issue. 

I am running Windows 11 24H2 Build 26100.2152

Any help on this would be greatly appreciated. 

Kind Regards,
Kenny Balharry
Reply

#2
On the Configure TAB, try [x] Disable Subtitles
Reply

#3
(11-05-2024, 04:09 AM)Shark007 Wrote: On the Configure TAB, try [x] Disable Subtitles

Hey Sharky,
Sorry that doesnt work. I have been able to replicate the issue on both a windows 10 and 11 build (with no windows defender installed). Its just really odd. I have also raised a support call on the Stable Diffusion Git page. 
By default Python 3.10.6 is needed for SD to run. Others say 3.10.11 can be used. I dont think you can go any higher as it needs to run Python toad or something. 

Anywayzzz... 

SD runs perfectly fine but as soon as I launch the launcher64.exe or even the tools/Settings64_portable.exe The codecs window appears. The desktop kinda look like it refreshes (I can see the icons like flash) and then I close the codec window. 

I go back to SD and - it stops working.  The SD cmd line shows the error: 

:\Users\Admin>

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.10.1
Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2
Launching Web UI with arguments:
Traceback (most recent call last):
  File "C:\AI\webui\launch.py", line 48, in <module>
    main()
  File "C:\AI\webui\launch.py", line 44, in main
    start()
  File "C:\AI\webui\modules\launch_utils.py", line 465, in start
    import webui
  File "C:\AI\webui\webui.py", line 13, in <module>
    initialize.imports()
  File "C:\AI\webui\modules\initialize.py", line 23, in imports
    import gradio  # noqa: F401
  File "C:\AI\system\python\lib\site-packages\gradio\__init__.py", line 3, in <module>
    import gradio.components as components
  File "C:\AI\system\python\lib\site-packages\gradio\components\__init__.py", line 1, in <module>
    from gradio.components.annotated_image import AnnotatedImage
  File "C:\AI\system\python\lib\site-packages\gradio\components\annotated_image.py", line 13, in <module>
    from gradio.components.base import IOComponent, _Keywords
  File "C:\AI\system\python\lib\site-packages\gradio\components\base.py", line 29, in <module>
    from gradio.blocks import Block, BlockContext
  File "C:\AI\system\python\lib\site-packages\gradio\blocks.py", line 28, in <module>
    from gradio import (
  File "C:\AI\system\python\lib\site-packages\gradio\networking.py", line 18, in <module>
    from gradio.routes import App
  File "C:\AI\system\python\lib\site-packages\gradio\routes.py", line 60, in <module>
    mimetypes.init()
  File "mimetypes.py", line 368, in init
  File "mimetypes.py", line 253, in read_windows_registry
PermissionError: [WinError 5] Access is denied
Press any key to continue . . .


Are you able to tell me what the launcher/portable exe does? like permissions or registry changes? or anything?
I have re-checked PATHS and env and everything looks OK but yeah Python wont run and for the life of me - I cannot see why running your Codecs launcher would change anything???

It could be something in windows 10 or 11 but currently I cannot put my finger on it. I'll keep looking but yeah if you can tell me what the codec launcher64.exe >  Settings64_portable.exe does 
/Changes this ?/ Adds this ? / Amends that???? I might be in a better place to find something. For reference the SD is installed in a folder on C:\AI and the codecs on C:\Codes (as per your recommendations). 
Tried it on D: and also from the downloads folder - but same issues.

Is there a new codec package that can be installed like the old ones used to? I know you did offer both for a while. Would be a good test to run.

Kind Regards,
Kenny Balharry

Kind Regards,
Kenny
Reply

#4
Best I can offer is another suggestion
On the Configure TAB, try [x] Disable LAV Splitter
Let me know if that works. If it does work, I have a few other changes that need to be made to compensate for disabling that splitter.
Reply





Users browsing this thread:
1 Guest(s)