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

fix xyz for 1.9 #589

Closed
wants to merge 2 commits into from
Closed

fix xyz for 1.9 #589

wants to merge 2 commits into from

Conversation

w-e-w
Copy link

@w-e-w w-e-w commented Apr 22, 2024

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 22, 2024
Copy link

sonarcloud bot commented Apr 22, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@w-e-w
Copy link
Author

w-e-w commented Apr 22, 2024

not sure what is this lint
https://github.com/Bing-su/adetailer/actions/runs/8779110515

@w-e-w
Copy link
Author

w-e-w commented Apr 22, 2024

Update
AUTO as pushed a fix to issue in webui 1.9.2 reverting the behavior back to 1.8
see https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases/tag/v1.9.2

this PR now not as important and only applicable to those that are on 1.9.0 and did not updata to 1.9.2
if merged this will fix the for 1.9.0 but if not, it will still work for <=1.8 and >=1.9.2

@Bing-su
Copy link
Owner

Bing-su commented Apr 22, 2024

Thanks for your attention to this issue, but I'm questioning whether this issue actually existed.

Below is logs from 1.9.0, which I haven't updated yet.

Python 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:40:08) [MSC v.1938 64 bit (AMD64)]
Version: v1.9.0-112-gd982c75d
Commit hash: d982c75da9a1647770b3226edaa0a603d20e3a8b
Launching Web UI with arguments: --xformers --api
Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.
[-] ADetailer initialized. version: 24.4.2, num models: 13
ControlNet preprocessor location: D:\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2024-04-22 19:49:06,465 - ControlNet - INFO - ControlNet v1.1.443
2024-04-22 19:49:06,607 - ControlNet - INFO - ControlNet v1.1.443
Loading weights [5998292c04] from D:\stable-diffusion-webui\models\Stable-diffusion\Counterfeit-V3.0_fp16-no-ema.safetensors
extensions\adetailer\scripts\!adetailer.py:939 make_axis_on_xyz_grid
    script.script_class.__module__: 'custom_code.py' (str) len=14
extensions\adetailer\scripts\!adetailer.py:939 make_axis_on_xyz_grid
    script.script_class.__module__: 'img2imgalt.py' (str) len=13
extensions\adetailer\scripts\!adetailer.py:939 make_axis_on_xyz_grid
    script.script_class.__module__: 'loopback.py' (str) len=11
extensions\adetailer\scripts\!adetailer.py:939 make_axis_on_xyz_grid
    script.script_class.__module__: 'outpainting_mk_2.py' (str) len=19
extensions\adetailer\scripts\!adetailer.py:939 make_axis_on_xyz_grid
    script.script_class.__module__: 'poor_mans_outpainting.py' (str) len=24
extensions\adetailer\scripts\!adetailer.py:939 make_axis_on_xyz_grid
    script.script_class.__module__: 'prompt_matrix.py' (str) len=16
extensions\adetailer\scripts\!adetailer.py:939 make_axis_on_xyz_grid
    script.script_class.__module__: 'prompts_from_file.py' (str) len=20
extensions\adetailer\scripts\!adetailer.py:939 make_axis_on_xyz_grid
    script.script_class.__module__: 'sd_upscale.py' (str) len=13
extensions\adetailer\scripts\!adetailer.py:939 make_axis_on_xyz_grid
    script.script_class.__module__: 'xyz_grid.py' (str) len=11
2024-04-22 19:49:07,178 - ControlNet - INFO - ControlNet UI callback registered.
Creating model from config: D:\stable-diffusion-webui\configs\v1-inference.yaml
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 75.3s (prepare environment: 2.9s, import torch: 4.8s, import gradio: 1.6s, setup paths: 0.7s, initialize shared: 0.3s, other imports: 0.7s, load scripts: 62.6s, scripts before_ui_callback: 0.2s, create ui: 0.7s, gradio launch: 0.2s, add APIs: 0.6s).
Loading VAE weights specified in settings: D:\stable-diffusion-webui\models\VAE\kl-f8-anime2.safetensors
Applying attention optimization: xformers... done.
Model loaded in 4.7s (load weights from disk: 0.4s, create model: 1.3s, apply weights to model: 2.3s, load VAE: 0.2s, calculate empty prompt: 0.2s).

It seems to be captured in 1.8.0 style, at least in my environment.

@w-e-w
Copy link
Author

w-e-w commented Apr 22, 2024

let me double check
I was multitasking so I could have made a mistake


but this seems a bit odd

Version: v1.9.0-112-gd982c75d
Commit hash: d982c75da9a1647770b3226edaa0a603d20e3a8b

112 meant that you have 112 commits on tip of 1.9.0
but from my count 1.9 -> 1.9.2 I only have about a total of 42 commits
I also can't find the hush
d982c75da9a1647770b3226edaa0a603d20e3a8b

@Bing-su
Copy link
Owner

Bing-su commented Apr 22, 2024

Because it's my personal fork. The source code is the same as 1.9.0.

gitkraken_Ucye27ClNq

@w-e-w
Copy link
Author

w-e-w commented Apr 22, 2024

tldr:
it should be fine to NOT merge this
but merging it doesn't hurt and might be slightly better


long version

I think I figured out
turns out in this particular issue will only affect a proportion of extensions that checks for script_class.__module__
it depends on the timing when the check is performed

the breaking change in one 1.9.0 was is not widespread as only we have thought
and it doesn't seem to impact this extension in particular

so thers 2 commit that cases this issue
one in 1.9.0
AUTOMATIC1111/stable-diffusion-webui@23c06a5
and between 1.9.0 ~ 1.9.1
AUTOMATIC1111/stable-diffusion-webui#15532

the commit in 1.9.0 causes some checks of if script.script_class.__module__ == "xyz_grid.py": to break
and the later commit in 1.9.0~1.9.1 AUTOMATIC1111/stable-diffusion-webui#15532
casues every use of if script.script_class.__module__ == "xyz_grid.py": to break

we have reverted this in 1.9.2
so the issue should only impact a small portion of people that uses 1.9.0 + dev branch (for this particularly extension)
about 40~ commits 9 days


when we were testing I was actually testing with 1.9.0~1.9.1 (dev at the time) I forgot to switch back to 1.9.0 master
I didn't realize the second commitment was the one that causes "every" extension is that checks for script.script_class.__module__ to break

so when I tested it adetailer xyz on the dev branch with the second commit it was definitely broken
see webui 1.9.0+ e6a8d0b4e65b365a684bd7539cf5b2cd16f9c44c
image

you can see the if None retrun break point was hit

    if xyz_grid is None:
        return

so you can decide if you want to merge it or not it doesn't matter that much now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants