CivArchive
    ← All articles
    Published October 10, 2024by zentrocdot

    AUTOMATIC1111 Extension Aspect Ratio Calculator

    71 views3 reactions0 comments on CivitAI0 collected
    tool guideaspect ratio

    Preface

    I started with Easy Diffusion for AI image generation. After a while, however, I realised that AUTOMATIC1111, for example, would probably bring me some advantages. And that is what happened.

    After playing around with all the features of AUTOMATIC1111, I started programming an extension myself. One result can be seen here.

    The driving force was that I always needed aspect ratios and had to calculate them outside AUTOMATIC1111.

    Motivation

    Until now, I always had to use bash scripts or a calculator outside AUTOMATIC1111 to calculate aspect ratios. With this extension, this is no longer necessary.

    What the Extension Does

    The Extension is able to calculate aspect ratios from within AUTOMATIC1111 in a quite easy way.

    AUTOMATIC1111 like Look and Feel

    When creating the extension, I made sure that it would fit unobtrusively into the existing structure after installation.

    Figure 1

    Figure 1 shows how the the Extension looks, when it is opened the first time. Width and Height have predefined values. -1.0 shows, that so far no calculation was done.

    Special Feature

    I added the feature , that the output precision can be set. The floating point aspect ratios are given with 2 decimal places. Changing the precision one can check if a aspect ratio has a fixed number of decimal places.

    Installation

    The installation link is:

    https://github.com/zentrocdot/sd-webui-aspect_ratio_calc

    Limitations

    So far it is possible, that width and height can be floating point values. I see not solution taking a look in the gradio documentation to prevent this in an easy way.

    To-Do

    Some work is still to do like writing a good documentation.

    Final words

    Have a nice day. Have fun. Be inspired!

    Reference

    [1] https://github.com/zentrocdot/sd-webui-aspect_ratio_calc