kohya-ss / sd-webui-additional-networks

GNU Affero General Public License v3.0
1.78k stars 296 forks source link

AttributeError: 'ScriptClassData' object has no attribute 'module' #34

Open St33lMouse opened 1 year ago

St33lMouse commented 1 year ago

I'm getting this error in the terminal when I start the web ui

Error loading script: additional_networks.py Traceback (most recent call last): File "/home/mouse/stable-diffusion-webui/modules/scripts.py", line 195, in load_scripts module = script_loading.load_module(scriptfile.path) File "/home/mouse/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module exec(compiled, module.dict) File "/home/mouse/stable-diffusion-webui/extensions/sd-webui-additional-networks/scripts/additional_networks.py", line 419, in xy_grid = scriptDataTuple.module AttributeError: 'ScriptClassData' object has no attribute 'module'

Never mind: fixed by updating automatic1111

SpoffNinja commented 1 year ago

Here's mine

Error loading script: additional_networks.py Traceback (most recent call last): File "I:\SSD2\stable-diffusion-webui\modules\scripts.py", line 205, in load_scripts module = script_loading.load_module(scriptfile.path) File "I:\SSD2\stable-diffusion-webui\modules\script_loading.py", line 13, in load_module exec(compiled, module.dict) File "I:\SSD2\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\additional_networks.py", line 419, in xy_grid = scriptDataTuple.module AttributeError: 'ScriptClassData' object has no attribute 'module'

I get this even after updating Automatic1111 to the latest. Tried reinstalling this extension a few times as well, no change.

Is there maybe an additional extension that is required to be active like Dreambooth? I've tried turning off and on various extensions but keep getting the same error.

Any help would be appreciated.

kohya-ss commented 1 year ago

The latest web UI has module in ScriptClassData. https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/master/modules/scripts.py#L155

I'm not sure what cause the issue...

catboxanon commented 1 year ago

I'm going to guess at least one of you is pulling from the gitgud.io repo. The GitHub ban was less than a day long event and that repo is no longer maintained. Fix your origin URL.

git remote set-url origin https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

SpoffNinja commented 1 year ago

@kohya-ss hmmm thanks, i'll go open that file in a editor and make sure if it reflects that link you sent when I get home

@catboxanon Thanks for letting me know, as far as i know, I haven't changed my pull source when the ban happened as I only read about it the next day. Is there anyway to check it's pulling from the correct source? Any specific GIT command I can do to let it tell me which URL its going to use to check?

If all else fails, I'll try a complete reinstall of Automatic1111

catboxanon commented 1 year ago

git remote -v

icryo commented 1 year ago

git pulling the updated version of SD fixed this on my end

SpoffNinja commented 1 year ago

@catboxanon Thanks, tried that and it was indeed showing the github link for Automatic1111. then checked the script.py file and it was showing the correct entries as kohya pointed out.

Very odd, but did a complete new install of the WebGUI this morning and tried first thing this extension and it's working perfect. Just going migrate all my stuff over and delete the old install. Very odd, but looks like a fresh install did the trick.

Thanks both for the help!

Edit: Got the old install working, seems something was wrong with the venv, I deleted the venv folder and let is setup everything again there and the old install is now working with the WebGUI and Extension