light-and-ray / sd-webui-replacer

A tab for sd-webui for replacing objects in pictures or videos using detection prompt
208 stars 11 forks source link

ERROR Module load: extensions\sd-webui-replacer\scripts\replacer_api.py #108

Open monzroot opened 4 days ago

monzroot commented 4 days ago

23:52:47-620339 ERROR Module load: extensions\sd-webui-replacer\scripts\replacer_api.py: ImportError ╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮ │ D:\automatic\modules\script_loading.py:25 in load_module │ │ │ │ 24 │ │ │ │ with contextlib.redirect_stdout(io.StringIO()) as stdout: │ │ ❱ 25 │ │ │ │ │ module_spec.loader.exec_module(module) │ │ 26 │ │ │ setup_logging() # reset since scripts can hijaack logging │ │ in exec_module:883 │ │ in _call_with_frames_removed:241 │ │ │ │ D:\automatic\extensions\sd-webui-replacer\scripts\replacer_api.py:8 in │ │ │ │ 7 from modules.call_queue import queue_lock │ │ ❱ 8 from replacer.generate import generate │ │ 9 from replacer.generation_args import GenerationArgs, HiresFixArgs │ │ │ │ D:\automatic\extensions\sd-webui-replacer\replacer\generate.py:7 in │ │ │ │ 6 from modules import sd_models, errors │ │ ❱ 7 from replacer.mask_creator import MaskResult, NothingDetectedError, createMask │ │ 8 from replacer.generation_args import GenerationArgs, AppropriateData │ │ │ │ D:\automatic\extensions\sd-webui-replacer\replacer\mask_creator.py:4 in │ │ │ │ 3 from modules import devices │ │ ❱ 4 from replacer.extensions import replacer_extensions │ │ 5 from replacer.generation_args import GenerationArgs │ │ │ │ D:\automatic\extensions\sd-webui-replacer\replacer\extensions\replacer_extensions.py:5 in │ │ │ │ 4 │ │ ❱ 5 from replacer.extensions import controlnet │ │ 6 from replacer.extensions import inpaint_difference │ │ │ │ D:\automatic\extensions\sd-webui-replacer\replacer\extensions\controlnet.py:6 in │ │ │ │ 5 from modules import scripts, errors │ │ ❱ 6 from replacer.tools import limitImageByOneDimension, applyMaskBlur, applyMask, applyRotationFix │ │ 7 from replacer.generation_args import GenerationArgs │ │ │ │ D:\automatic\extensions\sd-webui-replacer\replacer\tools.py:10 in │ │ │ │ 9 from modules import errors, shared, masking │ │ ❱ 10 from modules.ui import versions_html │ │ 11 from replacer.generation_args import GenerationArgs │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ImportError: cannot import name 'versions_html' from 'modules.ui' (D:\automatic\modules\ui.py) 23:52:47-635986 ERROR Module load: extensions\sd-webui-replacer\scripts\replacer_main_ui.py: ImportError ╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮ │ D:\automatic\modules\script_loading.py:25 in load_module │ │ │ │ 24 │ │ │ │ with contextlib.redirect_stdout(io.StringIO()) as stdout: │ │ ❱ 25 │ │ │ │ │ module_spec.loader.exec_module(module) │ │ 26 │ │ │ setup_logging() # reset since scripts can hijaack logging │ │ in exec_module:883 │ │ in _call_with_frames_removed:241 │ │ │ │ D:\automatic\extensions\sd-webui-replacer\scripts\replacer_main_ui.py:7 in │ │ │ │ 6 ) │ │ ❱ 7 from replacer.ui.tools_ui import IS_WEBUI_1_5 │ │ 8 from replacer.ui import replacer_main_ui │ │ │ │ D:\automatic\extensions\sd-webui-replacer\replacer\ui\tools_ui.py:9 in │ │ │ │ 8 ) │ │ ❱ 9 from replacer.tools import limitImageByOneDimension, generateSeed, pil_to_base64_jpeg │ │ 10 from replacer.generation_args import GenerationArgs │ │ │ │ D:\automatic\extensions\sd-webui-replacer\replacer\tools.py:10 in │ │ │ │ 9 from modules import errors, shared, masking │ │ ❱ 10 from modules.ui import versions_html │ │ 11 from replacer.generation_args import GenerationArgs │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ImportError: cannot import name 'versions_html' from 'modules.ui' (D:\automatic\modules\ui.py) 23:52:47-651710 ERROR Module load: extensions\sd-webui-replacer\scripts\replacer_script.py: ImportError ╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮ │ D:\automatic\modules\script_loading.py:25 in load_module │ │ │ │ 24 │ │ │ │ with contextlib.redirect_stdout(io.StringIO()) as stdout: │ │ ❱ 25 │ │ │ │ │ module_spec.loader.exec_module(module) │ │ 26 │ │ │ setup_logging() # reset since scripts can hijaack logging │ │ in exec_module:883 │ │ in _call_with_frames_removed:241 │ │ │ │ D:\automatic\extensions\sd-webui-replacer\scripts\replacer_script.py:3 in │ │ │ │ 2 import gradio as gr │ │ ❱ 3 from modules import scripts, scripts_postprocessing, errors, ui_settings, shared │ │ 4 from modules.processing import Processed, StableDiffusionProcessingTxt2Img │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ImportError: cannot import name 'ui_settings' from 'modules' (unknown location)

light-and-ray commented 4 days ago

There are some possible reasons:

Which version you use?

monzroot commented 3 days ago

Captura de tela 2024-11-22 205201

light-and-ray commented 3 days ago

Yes, you use a wrong webui. To use replacer install this https://github.com/AUTOMATIC1111/stable-diffusion-webui (if you have nvidia gpu)

monzroot commented 3 days ago

unfortunately I only have arc, But I will try, apparently there is an Intel version now.

monzroot commented 3 days ago

This version has both versions, and the "replacer" appears in the settings, but only these options appear. https://github.com/AUTOMATIC1111/stable-diffusion-webui

Captura de tela 2024-11-22 211740

*** Error loading script: replacer_main_ui.py Traceback (most recent call last): File "D:\stable-diffusion-webui\modules\scripts.py", line 382, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "D:\stable-diffusion-webui\modules\script_loading.py", line 10, 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:\stable-diffusion-webui\extensions\sd-webui-replacer\scripts\replacer_main_ui.py", line 8, in from replacer.ui import replacer_main_ui File "D:\stable-diffusion-webui\extensions\sd-webui-replacer\replacer\ui\replacer_main_ui.py", line 2, in from modules import infotext_utils ImportError: cannot import name 'infotext_utils' from 'modules' (unknown location)


*** Error loading script: replacer_script.py Traceback (most recent call last): File "D:\stable-diffusion-webui\modules\scripts.py", line 382, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "D:\stable-diffusion-webui\modules\script_loading.py", line 10, 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:\stable-diffusion-webui\extensions\sd-webui-replacer\scripts\replacer_script.py", line 6, in from replacer.ui import replacer_main_ui File "D:\stable-diffusion-webui\extensions\sd-webui-replacer\replacer\ui\replacer_main_ui.py", line 2, in from modules import infotext_utils ImportError: cannot import name 'infotext_utils' from 'modules' (unknown location)