sd-webui-roop icon indicating copy to clipboard operation
sd-webui-roop copied to clipboard

Traceback (most recent call last):

Open poorshu opened this issue 1 year ago • 7 comments

Error calling: D:\AI\extensions\sd-webui-roop\scripts\faceswap.py/ui Traceback (most recent call last): File "D:\AI\modules\scripts.py", line 283, in wrap_call res = func(*args, **kwargs) File "D:\AI\extensions\sd-webui-roop\scripts\faceswap.py", line 64, in ui models = get_models() File "D:\AI\extensions\sd-webui-roop\scripts\faceswap.py", line 21, in get_models models = glob.glob(models_path) UnboundLocalError: local variable 'models_path' referenced before assignment 提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

poorshu avatar Jun 21 '23 15:06 poorshu

image

Ling-APE avatar Jun 21 '23 15:06 Ling-APE

image

same here

Ling-APE avatar Jun 21 '23 15:06 Ling-APE

image

我也是

rollback version ccca35e 回退版本ccca35e

poorshu avatar Jun 21 '23 16:06 poorshu

Just edit faceswap.py and swap lines 21 and 22 From this: Screenshot 2023-06-21 122137

To This: Screenshot 2023-06-21 122108

icepickgit avatar Jun 21 '23 16:06 icepickgit

Yes, that's exactly what I did too. It was logical, define the path first :)

Zdeto avatar Jun 21 '23 16:06 Zdeto

Just edit faceswap.py and swap lines 21 and 22 From this: Screenshot 2023-06-21 122137

To This: Screenshot 2023-06-21 122108

谢谢大佬,已经正常工作了。 Thank you boss, it's working fine now

poorshu avatar Jun 21 '23 16:06 poorshu

i had to do this too.... looks like it was explicitly changed around in today's patch to where it broke.

alenknight avatar Jun 21 '23 17:06 alenknight

Just edit faceswap.py and swap lines 21 and 22 From this: Screenshot 2023-06-21 122137

To This: Screenshot 2023-06-21 122108

thnks bro

alieverlove avatar Jun 21 '23 21:06 alieverlove

This issue has been fixed, my fault.

s0md3v avatar Jun 22 '23 02:06 s0md3v

def get_models(): models_path = os.path.join(scripts.basedir(), "models/roop/*") models = glob.glob(models_path) models = [x for x in models if x.endswith(".onnx") or x.endswith(".pth")] return models

IS MY LINE 23 MISSING???

I AM GETTING THIS ERROR

Error running postprocess_batch: C:\Users\VIPER PC\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py

hiten46 avatar Jun 22 '23 21:06 hiten46