Code Monkey home page Code Monkey logo

sd-webui-aspect-ratio-helper's Introduction

sd-webui-aspect-ratio-helper's People

Contributors

thomasasfk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sd-webui-aspect-ratio-helper's Issues

Add configurable pre-defined aspect ratio buttons/dropdown

Would like to add an option/setting that optionally displayed predefined aspect ratio buttons, to quickly switch between them.

  • This could potentially be it's own tab/feature
  • Could also be an optional dropdown menu that works with the existing "Scale to maximum width or height" functionality

If implemented, it should be done with these principles in mind:

  • Don't break the existing functionality
  • Use settings/options to make it configurable/optional
  • Intuitive to use and unobtrusive
  • Updated README.md to reflect changes

When webui starting, got this TypeError: 'type' object is not subscriptable

Error loading script: sd_webui_aspect_ratio_helper.py
Traceback (most recent call last):
  File "/home/sdw/stable-diffusion-webui/modules/scripts.py", line 248, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "/home/sdw/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/sdw/stable-diffusion-webui/extensions/sd-webui-aspect-ratio-helper/scripts/sd_webui_aspect_ratio_helper.py", line 1, in <module>
    from aspect_ratio_helper.main import AspectRatioStepScript
  File "/home/sdw/stable-diffusion-webui/extensions/sd-webui-aspect-ratio-helper/aspect_ratio_helper/main.py", line 6, in <module>
    import aspect_ratio_helper._settings as _settings
  File "/home/sdw/stable-diffusion-webui/extensions/sd-webui-aspect-ratio-helper/aspect_ratio_helper/_settings.py", line 4, in <module>
    import aspect_ratio_helper._components as _components
  File "/home/sdw/stable-diffusion-webui/extensions/sd-webui-aspect-ratio-helper/aspect_ratio_helper/_components.py", line 9, in <module>
    import aspect_ratio_helper._util as _util
  File "/home/sdw/stable-diffusion-webui/extensions/sd-webui-aspect-ratio-helper/aspect_ratio_helper/_util.py", line 6, in <module>
    def safe_opt_util(shared_opts, key, default_key_map: dict[str, object]):
TypeError: 'type' object is not subscriptable

[Feature Request] toggle to edit minimum dimension

I usually want my smaller dimension to be at least 512, and I lock image dimensions to the source. This is a bit of a pain when using images with different dimensions as source, as I have to adjust each time.

It would be nice if I could set the minimum dimension instead of the max, and the max would adjust accordingly. Maybe add a toggle to swap the editable dimension?

Support tab switching on img2img

At the time I wrote the JavaScript functionality, I stupidly didn't test it extensively on img2img - so there have been a few bugs.

This issue is related to the sub windows sketch, inpaint & sketch inpaint - would be nice to have the aspect ratio dynamically switch tabs, as at the moment it just works based on the resolution of the initial img2img subtab.

【FEATURE REQUEST】 About the image size over 2048pix

I imported an image in ControlNet with image size over 2048 pixels (e.g. 4096*3072) and then used "Send demensions to SD" to pass the image size into SD.
At this point, if I use the "aspect-ratio" extension again, I cannot lock the aspect ratio of the image in SD according to the ratio of the ControlNet image.

Can you improve this extension to handle this case?

I can't turn off the extension from the extensions tab in Auto1111

Aspect Helper 01
It is quite handy to be able to calculate the dimensions. But by default, it takes up several lines of space in txt2img, img2img tabs. So, I want to toggle off the feature sometimes to make it easy to work on the other extensions. The problem is that even when I check off the extension in the extensions tab, it still shows up on all the tabs. Is there a way to turn it off?

Indicator for exact aspect ratio

Due to the limitation of the possible sizes for width and height, the chosen aspect ratio is not always exact. It would be helpful to have an indicator that shows whether the aspect ratio is exact or not.

A small problem on UX Fork. if you can give-me some help i appreciate.

On this beauty fork - https://github.com/anapnoe/stable-diffusion-webui-ux
Only one thing is not working, the Locker is not changing the aspect radio in txt2img.
image
I know probably is annoying people using diferent forks with diferent UI but its just that problem and maybe is simple to fix. I can edit the file if let me know the code if want. I tried old versions to see if works but no luck. Thanks for the attention i appreciate.

Add different display options for aspect ratios

At the moment we display aspect ratios in the following format: 1:1, 16:9, 4:3

It may be nice to be able to configure this, if users aren't happy with that format. (although most people probably don't care)

We have a placeholder function which returns nothing at the moment.
We could add an option allowing users to select a different display format of their choice.

@property
def display_func(self) -> callable:
return lambda _: None # todo: different displays for aspect ratios.

This has already been done for pre-defined percentages, you can see how here:

@property
def display_func(self) -> callable:
return _settings.PREDEFINED_PERCENTAGES_DISPLAY_MAP.get(
_settings.safe_opt(
_constants.ARH_PREDEFINED_PERCENTAGES_DISPLAY_KEY,
),
)

PREDEFINED_PERCENTAGES_DISPLAY_MAP = {
_constants.DEFAULT_PERCENTAGES_DISPLAY_KEY: _util.display_minus_and_plus,
'Raw percentage (50%, 150%)': _util.display_raw_percentage,
'Multiplication (x0.5, x1.5)': _util.display_multiplication,
}

def display_multiplication(num) -> str:
return f'x{round(num / 100, 3)}'
def display_raw_percentage(num) -> str:
return f'{num}%'
def display_minus_and_plus(num) -> str:
num -= 100
if num > 0:
return f'+{num}%'
return f'{num}%'

  • Determine different display options for aspect ratios (16 by 9, 16x9, 16/9, etc...)
  • Implement similarly to how pre-defined percentage display is

This may not even be worth doing, but it's relatively simple.
If someone wants a good first issue to contribute feel free to take this!

[BUG] Getting "image do not match" In Img2img Inpainting when using width or height that isn't a multiple of 64

Using this extension(which I love by the way) causes an error if I have a height and width not a multiple of 64, which usually happens if I lock the aspect to the image width+height.

Traceback (most recent call last):
  File "X:\Program Files\Stable Diffusion\stable-diffusion-webui\modules\call_queue.py", line 56, in f
    res = list(func(*args, **kwargs))
  File "X:\Program Files\Stable Diffusion\stable-diffusion-webui\modules\call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "X:\Program Files\Stable Diffusion\stable-diffusion-webui\modules\img2img.py", line 171, in img2img
    processed = process_images(p)
  File "X:\Program Files\Stable Diffusion\stable-diffusion-webui\modules\processing.py", line 486, in process_images
    res = process_images_inner(p)
  File "X:\Program Files\Stable Diffusion\stable-diffusion-webui\modules\processing.py", line 694, in process_images_inner
    image_mask_composite = Image.composite(image.convert('RGBA').convert('RGBa'), Image.new('RGBa', image.size), p.mask_for_overlay.convert('L')).convert('RGBA')
  File "X:\Program Files\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\PIL\Image.py", line 3341, in composite
    image.paste(image1, None, mask)
  File "X:\Program Files\Stable Diffusion\stable-diffusion-webui\venv\lib\site-packages\PIL\Image.py", line 1731, in paste
    self.im.paste(im, box, mask.im)
ValueError: images do not match

Create automated UI tests so we can be confident changes aren't breaking

I want to write some UI tests so I don't need to manually do testing during development cycles.

Due to the nature of the project, it may be difficult to get the webui working in a github action...

I think the plan will be to develop something that is ran locally against an already running webui, just so it can be quickly run upon changes to verify nothing has broken and image generation etc works fine - potentially could use the --share option to launch an ad-hoc webui on one of my idle computers, but would need a key as they can't run in parallel.

[Feature Request] - Presets (or cycle button?) to snap to the 9 resolutions SDXL was trained on

Hello!

Per the Stability AI, SDXL was trained on images with the resolutions listed below (1024x1024 , 1152x96, 896x1152, 1216x832, 832x1216, 1344x768, 768x1344, 1536x640, 640x1536). I was wondering if there could be a way to make those resolutions easier to "snap to"? Either an option to provide presets, or maybe a button that would cycle through them? I'm not exactly sure how it'd work best, but I find myself struggling to try and remember "896x1152" et al cause they're non-standard, but meanwhile they're probably the best resolutions to generate at since the model knows them best.

Anyway, just an idea. I use your extension any time I use A1111 - so thanks again for building it!

image (2)

Seems broken

The extension won't load. Latest commit on Auto1111

Error loading script: sd_webui_aspect_ratio_helper.py
Traceback (most recent call last):
  File "/media/ovo/Données/AI/SD/modules/scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "/media/ovo/Données/AI/SD/modules/script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/media/ovo/Données/AI/SD/extensions/sd-webui-aspect-ratio-helper/scripts/sd_webui_aspect_ratio_helper.py", line 1, in <module>
    from aspect_ratio_helper.main import AspectRatioStepScript
  File "/media/ovo/Données/AI/SD/extensions/sd-webui-aspect-ratio-helper/aspect_ratio_helper/main.py", line 6, in <module>
    import aspect_ratio_helper._settings as _settings
  File "/media/ovo/Données/AI/SD/extensions/sd-webui-aspect-ratio-helper/aspect_ratio_helper/_settings.py", line 6, in <module>
    import aspect_ratio_helper._components as _components
  File "/media/ovo/Données/AI/SD/extensions/sd-webui-aspect-ratio-helper/aspect_ratio_helper/_components.py", line 10, in <module>
    import aspect_ratio_helper._util as _util
  File "/media/ovo/Données/AI/SD/extensions/sd-webui-aspect-ratio-helper/aspect_ratio_helper/_util.py", line 6, in <module>
    def safe_opt_util(shared_opts, key, default_key_map: dict[str, object]):
TypeError: 'type' object is not subscriptable

Gradio Dependency problem?

I think that Gradio has had an update and some are deprecated.
I keep on getting the following warning from A1111

D:\stable-diffusion-webui\extensions\sd-webui-aspect-ratio-helper\aspect_ratio_helper\_components.py:50: GradioDeprecationWarning: Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components max_dimension_slider = gr.inputs.Slider( D:\stable-diffusion-webui\modules\gradio_extensons.py:25: GradioDeprecationWarning: optionalparameter is deprecated, and it has no effect res = original_IOComponent_init(self, *args, **kwargs) D:\stable-diffusion-webui\extensions\sd-webui-aspect-ratio-helper\aspect_ratio_helper\_components.py:129: GradioDeprecationWarning: Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components min_dimension_slider = gr.inputs.Slider( Creating model from config: D:\stable-diffusion-webui\repositories\generative-models\configs\inference\sd_xl_base.yaml 2024-06-12 17:20:09,864 - ControlNet - INFO - ControlNet UI callback registered. D:\stable-diffusion-webui\venv\lib\site-packages\huggingface_hub\file_download.py:1132: FutureWarning:resume_downloadis deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, useforce_download=True. warnings.warn(

request update

image
webui has updated gradio 3.23, the UI interface has changed

BUG with resolution calculations

Hi. 16:9 standard HD resolution is 1920x1080. So if divided by 2 then should be 960x540, but slider shows 960x536. Didn't check other ratios, but if this has issue, so probably other ratios also.

Feature Request: Setting option to show only lock button as On/Off (w/o the pull down + A/R list)

Hello,

Love the extension - thanks again for the time/effort.

I was curious if it'd ever be possible to add a setting option to make the java script button (by the height/width) be only the lock icon w/o the AR drop down. If enabled the button would just be a simple on/off for locking the height and width at the current setting. I know you can do that now if you open the pulldown and click the lock icon. However, sometimes I find myself mainly using the lock, and having it as a simple on/off (1 click) vs. click to open panel/selecting the lock icon on the list is maybe slightly less optimal.

I know it's a minor nuance thing, but one feature I know I'd find helpful for certain times when I'm just playing around.

One other thing that maybe I should have started a new thread for is that the red overlay in the IMG2IMG tab doesn't respond accurately when the height/width are locked and you adjust the resolution slider. The slider you move adjusts the red overlay as it should, but the snapping of the other slider into proper AR does not move the red overlay which leaves it "out of sync" with the resolution setting. I know the red overlay has been buggy recently in general (it disappears at times), so maybe a fix for this isn't possible (or at this time). Just wanted to mention though.

Thanks!

SD.Next

Hi, really really minior issue but was wondering if the Ratio Helper button on SD.Next (Vlads A1111) could be aligned to the center? it currently sits to the left. I've included a screenshot to show:

Screenshot 2023-12-30 024854

Add localisation

  • Figure out how localisation works
  • Get a proof of concept working, and add README.md steps to allow others to contribute their own

lock button gone

after recent updates the drop down button ... with the lock ratio and multiple custom ratios seems to be missing completely.
Screenshot 2023-06-02 at 12 18 51 PM

Support more comprehensive events of img2img upload

On img2img, there are many ways to select an image, for example using the upload box, dragging or dropping, pasting onto the page...

At the moment, we support manual upload & drag and drop:

inputElement.parentElement.addEventListener('drop', scaleToImg2ImgImage);
inputElement.addEventListener('input', scaleToImg2ImgImage);

It would be nice to support ALL options, the one I know and use, that isn't currently supported - is pasting, however there are probably more.

Sliders auto level lock when selecting an aspect ratio

As shown below, when you select any aspect ratio the sliders will automatically level lock, i know its not affecting the outcome but its just annoying to how it was before, you could visually see the difference, not sure it this was intentional or a bug but posting anyway, really hoping its a bug.

1

2

3

21:9 and 32:9

Please add 21:9 and 32:9 aspect ratios for us wallpaper diffusers. :)

Automatic image size according to input image ratio does not work

Hello,
Since last few update, the automatic image size based on the input image ratio does not work.
See below :

gif

And here the javascript error I got :

aspectRatioController.js?1681108525.8360796:430 Uncaught TypeError: Cannot read properties of null (reading 'querySelector')
    at aspectRatioController.js?1681108525.8360796:430:45
    at Array.forEach (<anonymous>)
    at postImageControllerSetupFunction (aspectRatioController.js?1681108525.8360796:428:32)
    at MutationObserver.<anonymous> (aspectRatioController.js?1681108525.8360796:390:17)

aspectRatioController.js?1681108525.8360796:20 Uncaught TypeError: Cannot read properties of null (reading 'textContent')
    at getSelectedImage2ImageTab (aspectRatioController.js?1681108525.8360796:20:85)
    at getCurrentImage (aspectRatioController.js?1681108525.8360796:24:24)
    at AspectRatioController.setAspectRatio (aspectRatioController.js?1681108525.8360796:321:25)
    at HTMLSelectElement.<anonymous> (aspectRatioController.js?1681108525.8360796:118:24)

The aspect ratio sliders are broken

The extension breaks the resolution selection.
My resolution selectors are limited to 512 and 2560. With this extension I somehow can set it less than 512, but it warps back to 512. And I can't select higher that 2048.

image

There are no errors in the console log.

How it shouldn't work:
Q6dvSbS

How it should work:
fea3383f-915d-498a-b995-5963ea5ab963

Add/poll community for "sane defaults"

At the moment the defaults are the non-JavaScript accordion functionality.

It would be nice to poll users and see how many use the accordion vs JavaScript.

We should probably update the default settings to that of the most used, which I suspect is the JavaScript functionality - so new users get the best experience out of the box.

Add configuration setting to change ordering of components

At the time of writing this we have an Accordion with two "Rows" - we may have three depending how/if #7 is implemented.

  • Accordion:

  • First row:

  • Second row:

with gr.Column(variant='panel'), gr.Row(variant='compact'):

Order is determined by execution order of the context managers, so we may have to make each an abstraction allowing us to sort them.

It would be good to assign each row a unique name or key, and add an option allowing users to change the ordering of the components. We could use a comma separated list of keys, or some more complex gradio component, open to whatever works.

request that tensor works more free

hey,

so finaly tensor runing on my system ;)

may its not possible for tensor, but an error appears if the resolution ist not divisible by 64
so if i use 3:2 -> 1024*680, 680 ist not divisible by 64
may you can add any option to get the nearest number to avoid that error

How I can switch blocked size

By default the extension block one side as we can at screenshot see this is width. It's mean if the height will be changed width will be recalculated.

2023-05-19_13-13

I have question how can I change blocked side if I don't want to change orientation of finally picture?

I.e. I want to set width to 1024 and height must recalculate to ~2300px in this case.

[Bug] - Unable to add 8:11 as an Aspect Ratio to the drop-down / Keeps reverting to 11:8 regardless of settings (May happen w/ other ratios where H/W flip in spite of settings)

Hello and thanks again for a fantastic extension.

I'm having a problem at the moment trying to add the ratio of 8:11 to the drop-down. I use the resolution 512x704 often for poster size / vertical images. I've tried multiple attempts to add 8:11 to the dropdown menu of selectable ARs via the settings page, but each time it somehow reverts to 11:8 or 704x512 (I toggle that over with the height/width swap button).

I'm curious if maybe I'm doing something wrong or if this is in fact a bug that others can reproduce. I've put 8:11 all over the settings list, and even on the list alone, and regardless of where it is, or if it's on there twice/both ways (11:8 & 8:11) it'll always end up w/ only 11:8 on the list after using it a time or two after reloading the UI (switching to IMG2IMG opening pulldown, going back to txt2img opening pulldown usually is enough to notice the flip).

Update: I did just try adding 6:11 and it seems like the same thing happens for me w/ that ratio where after a short moment that 6:11 appears on the dropdown after Reloading UI, it flips over to 11:6 which remains until adjustments are made in settings and resaved.

Thanks for any insight!

aspect-retry-stilllisted-as-8-11-only
apect-retry-img2img-reversted -reverted-on-txt2imgnowjpg
apect-retry-img2img-reversted
aspect-retry
64414
aspect2
aspect1

My Sys info from settings:

"Platform": "Windows-10-10.0.19045-SP0",
"Python": "3.10.9",
"Version": "v1.4.0-RC",
"Commit": "3b11f17a374520e493e120e7f47443acd97393c8",
"Script path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui",
"Data path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui",
"Extensions dir": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions",
"Checksum": "8e714c80b289f8ba4bebbb32eeefb099cc1dc91749e7d2e81d214f52e00808a1",
"Commandline": [
"launch.py",
"--opt-sdp-attention",
"--no-half-vae",
"--opt-channelslast",
"--skip-torch-cuda-test",
"--skip-version-check",
"--ckpt-dir",
"e:\Stable Diffusion Checkpoints"
],
"Torch env info": {
"torch_version": "2.0.1+cu118",
"is_debug_build": "False",
"cuda_compiled_version": "11.8",
"gcc_version": null,
"clang_version": null,
"cmake_version": null,
"os": "Microsoft Windows 10 Pro",
"libc_version": "N/A",
"python_version": "3.10.9 | packaged by Anaconda, Inc. | (main, Mar 1 2023, 18:18:15) [MSC v.1916 64 bit (AMD64)] (64-bit runtime)",
"python_platform": "Windows-10-10.0.19045-SP0",
"is_cuda_available": "True",
"cuda_runtime_version": "11.8.89\r",
"cuda_module_loading": "LAZY",
"nvidia_driver_version": "531.68",
"nvidia_gpu_models": "GPU 0: NVIDIA GeForce RTX 4090",
"cudnn_version": null,
"pip_version": "pip3",
"pip_packages": [
"numpy==1.23.5",
"open-clip-torch==2.7.0",
"pytorch-lightning==1.9.4",
"torch==2.0.1+cu118",
"torchdiffeq==0.2.3",
"torchmetrics==0.11.4",
"torchsde==0.2.5",
"torchvision==0.15.2+cu118"
],
"conda_packages": null,
"hip_compiled_version": "N/A",
"hip_runtime_version": "N/A",
"miopen_runtime_version": "N/A",
"caching_allocator_config": "",
"is_xnnpack_available": "True",
"cpu_info": [
"Architecture=9",
"CurrentClockSpeed=3000",
"DeviceID=CPU0",
"Family=207",
"L2CacheSize=16384",
"L2CacheSpeed=",
"Manufacturer=GenuineIntel",
"MaxClockSpeed=3000",
"Name=13th Gen Intel(R) Core(TM) i9-13900K",
"ProcessorType=3",
"Revision="
]
},
"Exceptions": [],
"CPU": {
"model": "Intel64 Family 6 Model 183 Stepping 1, GenuineIntel",
"count logical": 32,
"count physical": 24
},
"RAM": {
"total": "64GB",
"used": "15GB",
"free": "49GB"
},
"Extensions": [
{
"name": "a1-sd-dynamic-thresholding",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\a1-sd-dynamic-thresholding",
"version": "fa12a88e",
"branch": "master",
"remote": "https://github.com/mcmonkeyprojects/sd-dynamic-thresholding.git"
},
{
"name": "a2-sd-dynamic-prompts",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\a2-sd-dynamic-prompts",
"version": "525ee62a",
"branch": "main",
"remote": "https://github.com/adieyal/sd-dynamic-prompts.git"
},
{
"name": "b1111-sd-webui-tagcomplete",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\b1111-sd-webui-tagcomplete",
"version": "7f188563",
"branch": "main",
"remote": "https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git"
},
{
"name": "canvas-zoom",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\canvas-zoom",
"version": "4e2ab25a",
"branch": "main",
"remote": "https://github.com/richrobber2/canvas-zoom.git"
},
{
"name": "clip-interrogator-ext",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\clip-interrogator-ext",
"version": "c0bf9005",
"branch": "main",
"remote": "https://github.com/pharmapsychotic/clip-interrogator-ext.git"
},
{
"name": "sd-extension-system-info",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\sd-extension-system-info",
"version": "b30e3245",
"branch": "main",
"remote": "https://github.com/vladmandic/sd-extension-system-info.git"
},
{
"name": "sd-webui-aspect-ratio-helper",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\sd-webui-aspect-ratio-helper",
"version": "99fcf9b0",
"branch": "main",
"remote": "https://github.com/thomasasfk/sd-webui-aspect-ratio-helper.git"
},
{
"name": "sd-webui-controlnet",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\sd-webui-controlnet",
"version": "8e143d35",
"branch": "main",
"remote": "https://github.com/Mikubill/sd-webui-controlnet.git"
},
{
"name": "sd-webui-inpaint-anything",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\sd-webui-inpaint-anything",
"version": "5e88726f",
"branch": "main",
"remote": "https://github.com/Uminosachi/sd-webui-inpaint-anything.git"
},
{
"name": "sd-webui-stablesr",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\sd-webui-stablesr",
"version": "17b75e98",
"branch": "master",
"remote": "https://github.com/pkuliyi2015/sd-webui-stablesr.git"
},
{
"name": "sd-webui-supermerger",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\sd-webui-supermerger",
"version": "5e29503c",
"branch": "main",
"remote": "https://github.com/hako-mikan/sd-webui-supermerger.git"
},
{
"name": "sd-webui-text2video",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\sd-webui-text2video",
"version": "6d07e609",
"branch": "main",
"remote": "https://github.com/kabachuha/sd-webui-text2video.git"
},
{
"name": "stable-diffusion-webui-model-toolkit",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\stable-diffusion-webui-model-toolkit",
"version": "4d8fea77",
"branch": "master",
"remote": "https://github.com/arenasys/stable-diffusion-webui-model-toolkit.git"
},
{
"name": "stable-diffusion-webui-rembg",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\stable-diffusion-webui-rembg",
"version": "3d9eedbb",
"branch": "master",
"remote": "https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg.git"
},
{
"name": "ultimate-upscale-for-automatic1111",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\ultimate-upscale-for-automatic1111",
"version": "c99f382b",
"branch": "master",
"remote": "https://github.com/Coyote-A/ultimate-upscale-for-automatic1111.git"
}
],
"Inactive extensions": [
{
"name": "multidiffusion-upscaler-for-automatic1111",
"path": "D:\Stable-Diffusion-Webui-Dev\stable-diffusion-webui\extensions\multidiffusion-upscaler-for-automatic1111",
"version": "de488810",
"branch": "main",
"remote": "https://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111.git"
}
],
"Environment": {
"COMMANDLINE_ARGS": "--opt-sdp-attention --no-half-vae --opt-channelslast --skip-torch-cuda-test --skip-version-check --ckpt-dir "e:\Stable Diffusion Checkpoints"",
"GRADIO_ANALYTICS_ENABLED": "False"
},

This extension won't let me Restart UI

Every single time I install this extension, I am unable to click the "Restart UI" app to restart the WebUI.
I have pinned it down to this exact extension.
I don't even get any helpful logs. All it says is, "restarting UI..." and it freezes.
As soon as I get rid of this extension, I am able to Restart the WebUI completely fine.
Hopefully someone can help me with this. Maybe there is just a bracket missing somewhere that we can fill in. I really like the "Percentage Ratio Buttons" feature, which only this extension has. But it messes up my Web UI... Damn it

Add test coverage for _settings.py

Would like to add a tests/_settings_test.py file which tests the following function:

# todo: add test coverage to this?..
def _safe_opt(key):
# attempt to retrieve key from shared options
with contextlib.suppress(AttributeError):
return shared.opts.__getattr__(key)
# attempt to retrieve default, and last resort the constant default
return shared.opts.get_default(key) or _OPT_KEY_TO_DEFAULT_MAP.get(key)

Aspect Ratio Helper not showing up

Hi, I deleted the subfolder under the extension folder and reinstalled the extension from the URL but it isn't showing up on any of the interfaces. What should I do?

I got this error when open webui-user.bat

Error calling: F:\Stable\stable-diffusion-webui\extensions\sd-webui-aspect-ratio-helper\scripts\sd-webui-aspect-ratio-helper.py/ui
Traceback (most recent call last):
File "F:\Stable\stable-diffusion-webui\modules\scripts.py", line 262, in wrap_call
res = func(*args, **kwargs)
File "F:\Stable\stable-diffusion-webui\extensions\sd-webui-aspect-ratio-helper\scripts\sd-webui-aspect-ratio-helper.py", line 98, in ui
opts.arh_show_max_width_or_height,
File "F:\Stable\stable-diffusion-webui\modules\shared.py", line 552, in getattr
return super(Options, self).getattribute(item)
AttributeError: 'Options' object has no attribute 'arh_show_max_width_or_height'

Extension does not seem to work in 1.3.0 of auto1111 webui

Error calling: B:\AIimages\stable-diffusion-webui\extensions\sd-webui-aspect-ratio-helper\scripts\sd_webui_aspect_ratio_helper.py/ui
Traceback (most recent call last):
  File "B:\AIimages\stable-diffusion-webui\modules\scripts.py", line 283, in wrap_call
    res = func(*args, **kwargs)
  File "B:\AIimages\stable-diffusion-webui\extensions\sd-webui-aspect-ratio-helper\aspect_ratio_helper\main.py", line 54, in ui
    component.render()
  File "B:\AIimages\stable-diffusion-webui\extensions\sd-webui-aspect-ratio-helper\aspect_ratio_helper\_components.py", line 66, in render
    gr.Button(
  File "B:\AIimages\stable-diffusion-webui\venv\lib\site-packages\gradio\events.py", line 132, in __call__
    dep, dep_index = self.trigger.set_event_trigger(
  File "B:\AIimages\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 267, in set_event_trigger
    "inputs": [block._id for block in inputs],
  File "B:\AIimages\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 267, in <listcomp>
    "inputs": [block._id for block in inputs],
AttributeError: 'NoneType' object has no attribute '_id'

Its not working with UX Fork and Lobe UI the old Kitchen Theme.

I like alot your extension but stopped work after some updates of UX fork from anapnoe and also its not working with Lobe UI which is a very good interface. Not sure if you are updating yet, they don't have added any function so good like your extension so, i hope you update it, i will like alot. Thank You for the amazing work! Ah, if is not possible to update something cause is related to other extension let me know and i will see with the lobe ui creator, thanks!

Edit: i forget to say what is the problem, the problem is the locker not showing.
chrome_fMmFIog5bd

Add javascript aspect ratio synchronization

  • Add an option to use javascript to sync the width/height to an aspect ratio
  • Useful for users who don't want to use the sub UI, and want it to natively work
  • Should make sure changes are reflected on the back-end, and not just front-end
  • Add a drop down menu where the user can set
    • Locked, which will calculate the current aspect ratio from their current height width and retain that
    • Custom aspect ratios, pre-defined from an option in the settings (create this)

Perhaps can re-use code from https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/7601/files

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.