Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error loading script: m2m_ui.py #146

Open
158zd opened this issue Apr 14, 2024 · 15 comments
Open

Error loading script: m2m_ui.py #146

158zd opened this issue Apr 14, 2024 · 15 comments

Comments

@158zd
Copy link

158zd commented Apr 14, 2024

Windows:10
Python:3.10.6
Version:v1.9.0
image
"I followed this method to reinstall m2m_ui.py, but the same error persists."
image

@jcvijr
Copy link

jcvijr commented Apr 14, 2024

Same here

Edit: I've created a very rough workaround for this issue, since I don't know mov2mov code. I've noticed lots of changes happened in A1111 implementation, and the create_sampler_and_steps_selection() function in A1111 ui.py just vanished.

I created the same function again inside m2m_ui.py, getting those settings from txt2img tab.
m2m_ui.zip

You will need to set in txt2img tab those settings too, in order to mov2mov work.

@bahamute00
Copy link

*** Error loading script: m2m_ui.py
Traceback (most recent call last):
File "D:\01-유틸\99-SD_webUI\sd.webui\webui\modules\scripts.py", line 508, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "D:\01-유틸\99-SD_webUI\sd.webui\webui\modules\script_loading.py", line 14, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "D:\01-유틸\99-SD_webUI\sd.webui\webui\extensions\sd-webui-mov2mov\scripts\m2m_ui.py", line 23, in
from modules.ui import (
ImportError: cannot import name 'create_sampler_and_steps_selection' from 'modules.ui' (D:\01-유틸\99-SD_webUI\sd.webui\webui\modules\ui.py)

same here

@BigShaka77
Copy link

Yes, it worked! Thank you.......I didn't do the last step and it worked perfectly.

@mickmick69
Copy link

Same here

Edit: I've created a very rough workaround for this issue, since I don't know mov2mov code. I've noticed lots of changes happened in A1111 implementation, and the create_sampler_and_steps_selection() function in A1111 ui.py just vanished.

I created the same function again inside m2m_ui.py, getting those settings from txt2img tab. m2m_ui.zip

You will need to set in txt2img tab those settings too, in order to mov2mov work.

Thanx, Now I have mov2mov tab in my interface but I am not sure what do you mean by "need to set in txt2img tab those settings too, in order to mov2mov work"

What should I change in txt2img tab ?

@tshr-d-dragon
Copy link

Just copy this function in modules/ui.py

def create_sampler_and_steps_selection(choices, tabname):
    return scripts.scripts_txt2img.script('Sampler').steps, scripts.scripts_txt2img.script('Sampler').sampler_name

@gsw85
Copy link

gsw85 commented May 1, 2024

Just copy this function in modules/ui.py

def create_sampler_and_steps_selection(choices, tabname):
    return scripts.scripts_txt2img.script('Sampler').steps, scripts.scripts_txt2img.script('Sampler').sampler_name

This solved! Thanks
I just add this

def create_sampler_and_steps_selection(choices, tabname):
    return scripts.scripts_txt2img.script('Sampler').steps, scripts.scripts_txt2img.script('Sampler').sampler_name

in \Stable Diffusion WebUI\modules\ui.py

@tshr-d-dragon
Copy link

@158zd close the issue

@xiaoooan
Copy link

xiaoooan commented May 3, 2024

只需將這個函數複製到modules/ui.py中

def create_sampler_and_steps_selection(choices, tabname):
    return scripts.scripts_txt2img.script('Sampler').steps, scripts.scripts_txt2img.script('Sampler').sampler_name

I just copy m2m_ui.py to extensions\sd-webui-mov2mov\scripts to overwrite the old one, and enable Stable Diffusion to display M2M normally.

@tshr-d-dragon
Copy link

只需將這個函數複製到modules/ui.py中

def create_sampler_and_steps_selection(choices, tabname):
    return scripts.scripts_txt2img.script('Sampler').steps, scripts.scripts_txt2img.script('Sampler').sampler_name

I just copy m2m_ui.py to extensions\sd-webui-mov2mov\scripts to overwrite the old one, and enable Stable Diffusion to display M2M normally.

You can try stable diffusion webui version 1.7.0 too.

@theSplund
Copy link

theSplund commented May 4, 2024

I can confirm that the 'two-part'* solution has it working in 1.9.3, (at least for me) - and it wasn't as tricky as it first looked!
(* replacing m2m_ui.py with the one in the zip, and editing ui.py to add an extra line)

@benknam
Copy link

benknam commented May 9, 2024

Just copy this function in modules/ui.py

def create_sampler_and_steps_selection(choices, tabname):
    return scripts.scripts_txt2img.script('Sampler').steps, scripts.scripts_txt2img.script('Sampler').sampler_name

Works PERFECTLY!! 厉害了老铁!!!👍🏻

@servicexyz123
Copy link

very much useful, For https://github.com/Scholar01/sd-webui-mov2mov, just replace script m2m_ui.py with m2m_ui.zip
For https://github.com/DavG25/sd-webui-mov2mov
insert:
def create_sampler_and_steps_selection(choices, tabname):
return scripts.scripts_txt2img.script('Sampler').steps, scripts.scripts_txt2img.script('Sampler').sampler_name
s

@DarshanSahay
Copy link

Nothing seems to work for me tbh. Tried pasting code , tried replacing the file but still no success. SD version 1.9.3

@EdnaMode22
Copy link

Nothing seems to work for me tbh. Tried pasting code , tried replacing the file but still no success. SD version 1.9.3

Yeah I'm having the same issue I've tried everything mentioned with a similar error code,

@woojoo87
Copy link

how can i fix this error??

*** Error loading script: mov2mov.py
Traceback (most recent call last):
File "E:\sd\stable-diffusion-webui\modules\scripts.py", line 515, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "E:\sd\stable-diffusion-webui\modules\script_loading.py", line 13, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "E:\sd\stable-diffusion-webui\extensions\sd-webui-mov2mov\scripts\mov2mov.py", line 24, in
from ebsynth import EbsynthGenerate, Keyframe
File "E:\sd\stable-diffusion-webui\extensions\sd-webui-mov2mov\ebsynth_init
.py", line 2, in
from .ebsynth_generate import EbsynthGenerate, Keyframe, Sequence, EbSynthTask
File "E:\sd\stable-diffusion-webui\extensions\sd-webui-mov2mov\ebsynth\ebsynth_generate.py", line 5, in
from toolz import groupby
ModuleNotFoundError: No module named 'toolz'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests