light-and-ray / sd-webui-replacer

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

No Replacer Tab showing up in my web ui. #90

Closed x0rage closed 1 month ago

x0rage commented 1 month ago

Screenshot 2024-07-20 110144

light-and-ray commented 1 month ago

Hello, show please console log. This is not the primary error text

x0rage commented 1 month ago

Hello, show please console log. This is not the primary error text

where is the console log

light-and-ray commented 1 month ago

In cmd windows

x0rage commented 1 month ago

*** Error executing callback before_ui for E:\Misc Programs\Stable\Stable Forge\webui\extensions\sd-webui-replacer\scripts\replacer_main_ui.py Traceback (most recent call last): File "E:\Misc Programs\Stable\Stable Forge\webui\modules\script_callbacks.py", line 297, in before_ui_callback c.callback() File "E:\Misc Programs\Stable\Stable Forge\webui\extensions\sd-webui-replacer\replacer\ui\replacer_tab_ui.py", line 556, in initMainUI replacerMainUI = ReplacerMainUI(isDedicatedPage=False) File "E:\Misc Programs\Stable\Stable Forge\webui\extensions\sd-webui-replacer\replacer\ui\replacer_tab_ui.py", line 34, in init self.init_tab(isDedicatedPage) File "E:\Misc Programs\Stable\Stable Forge\webui\extensions\sd-webui-replacer\replacer\ui\replacer_tab_ui.py", line 126, in init_tab makeAdvancedOptions(comp, isDedicatedPage) File "E:\Misc Programs\Stable\Stable Forge\webui\extensions\sd-webui-replacer\replacer\ui\make_advanced_options.py", line 157, in makeAdvancedOptions comp.integer_only_masked = ui_settings.create_setting_component('integer_only_masked') File "E:\Misc Programs\Stable\Stable Forge\webui\modules\ui_settings.py", line 25, in create_setting_component info = opts.data_labels[key] KeyError: 'integer_only_masked'


2024-07-20 11:11:15,551 - ControlNet - INFO - ControlNet UI callback registered. model_type EPS UNet ADM Dimension 0 *** Error executing callback ui_tabs_callback for E:\Misc Programs\Stable\Stable Forge\webui\extensions\sd-webui-replacer\scripts\replacer_main_ui.py Traceback (most recent call last): File "E:\Misc Programs\Stable\Stable Forge\webui\modules\script_callbacks.py", line 183, in ui_tabs_callback res += c.callback() or [] File "E:\Misc Programs\Stable\Stable Forge\webui\extensions\sd-webui-replacer\scripts\replacer_main_ui.py", line 17, in on_ui_tabs tab = replacer_tab_ui.replacerMainUI.getReplacerTabUI() AttributeError: 'NoneType' object has no attribute 'getReplacerTabUI'


Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch(). *** [Replacer] error while creating dedicated page: 'NoneType' object has no attribute 'getReplacerTabUI' Traceback (most recent call last): File "E:\Misc Programs\Stable\Stable Forge\webui\extensions\sd-webui-replacer\scripts\replacer_main_ui.py", line 37, in mountDedicatedPage tab = replacer_tab_ui.replacerMainUI_dedicated.getReplacerTabUI() AttributeError: 'NoneType' object has no attribute 'getReplacerTabUI'

x0rage commented 1 month ago

this?

Th1nhNg0 commented 1 month ago

I have the same error after update the package:

*** Error executing callback ui_tabs_callback for D:\Code\sdwebui\webui\extensions\sd-webui-replacer\scripts\replacer_main_ui.py
    Traceback (most recent call last):
      File "D:\Code\sdwebui\webui\modules\script_callbacks.py", line 283, in ui_tabs_callback
        res += c.callback() or []
      File "D:\Code\sdwebui\webui\extensions\sd-webui-replacer\scripts\replacer_main_ui.py", line 17, in on_ui_tabs
        tab = replacer_tab_ui.replacerMainUI.getReplacerTabUI()
    AttributeError: 'NoneType' object has no attribute 'getReplacerTabUI'
x0rage commented 1 month ago

installing a fork https://github.com/silveroxides/sd-webui-replacer fixes the issue

light-and-ray commented 1 month ago

Oh thanks, my bad. I've broken it accidently

light-and-ray commented 1 month ago

Thanks for reporting again. I've made a PR in dev branch of webui which fixes bug when masked content is shifted, in hires fix it's shifted very strong. But this patch has not been ever merged in dev branch, and I forget than nobody except me has this setting XD

Does it work after pulling update?

light-and-ray commented 1 month ago

For people who don't know how to fix - add this flag in webui-user.bat --disable-extra-extensions, update extension, and then remove this flag

Ah I forgot it doesn't stop webui loading, just no tab

x0rage commented 1 month ago

Thanks for reporting again. I've made a PR in dev branch of webui which fixes bug when masked content is shifted, in hires fix it's shifted very strong. But this patch has not been ever merged in dev branch, and I forget than nobody except me has this setting XD

Does it work after pulling update?

fixed!

Th1nhNg0 commented 1 month ago

The tab is show again but got this error when run:

Running GroundingDINO Inference
Initializing GroundingDINO GroundingDINO_SwinB (938MB)
final text_encoder_type: bert-base-uncased
Initializing SAM to cuda
<All keys matched successfully>
Running SAM Inference (1280, 876, 3)
SAM inference with 3 boxes, point prompts discarded
Creating output image
SAM inference with 3 boxes, point prompts discarded done.
Dilation Amount:  35
Dilation Amount:  35
Dilation Amount:  35
MasksCreator cached
    [Replacer]    Exception: 'integer_only_masked'
*** ***
    Traceback (most recent call last):
      File "D:\Code\sdwebui\webui\extensions\sd-webui-replacer\replacer\generate.py", line 131, in generate
        processed, extraImages = generateSingle(image, gArgs, saveDir_, saveSuffix,
      File "D:\Code\sdwebui\webui\extensions\sd-webui-replacer\replacer\generate.py", line 45, in generateSingle
        processed, scriptImages = inpaint(image, gArgs, savePath, saveSuffix, save_to_dirs,
      File "D:\Code\sdwebui\webui\extensions\sd-webui-replacer\replacer\inpaint.py", line 96, in inpaint
        processed = process_images(p)
      File "D:\Code\sdwebui\webui\modules\processing.py", line 835, in process_images
        opts.set(k, v, is_api=True, run_callbacks=False)
      File "D:\Code\sdwebui\webui\modules\options.py", line 151, in set
        option = self.data_labels[key]
    KeyError: 'integer_only_masked'
light-and-ray commented 1 month ago

Thanks, fixed

x0rage commented 1 month ago

solved