Coder Social home page Coder Social logo

sd-infinity-grid-generator-script's People

Contributors

brendanhoar avatar filexor avatar garrettsutula avatar mcmonkey4eva avatar micky2be avatar senelya avatar skfoo avatar smusamashah avatar w-e-w avatar yggdrasil75 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  avatar  avatar

sd-infinity-grid-generator-script's Issues

Request: Single-Image Flipbook Comparison

I would love to see a mode with the generated webpage where it only shows a single image at a time, but gives you sliders next to the image for each grid axis. The idea being that as you change the slider, it swaps the image to the corresponding one in the grid.

Obviously that would take the "grid' part out of it, but I often find that even a small grid with images side-by-side I end up missing details. Whereas if I take all the images into something like Photoshop and stack them all on top of each other, I can much easier tell differences as I enable and disable different layers.

As of right now, this functionality is somewhat possible, but only if you have a grid with 3 or more axis and use tabs or autocycle. It totally works, but is a bit more cumbersome than what I'm describing.

request: time taken

I would like to be able to know how slow a particular model or sampler is. some models are really slow and produce good art, but some are really fast and are not much worse. some samplers are really fast and amazing but on some models those samplers produce trash. a way to add automatically in a model and description the average time taken would make picking a new combination easier. in addition, average time for each column/row shown would be nice.

feature request: easy display of full gen info if present

If i find something cool in a large grid I can save it again, or work backward to derive where it lives on disk but it would be nice if there were an easier way to see full gen info (for a selected image) as well as path on disk (perhaps in pop out/over suggested in #5.
Thanks!

generate html files before generating pictures

I have this idea to generate html files before generating pictures for 2 reasons,

  1. we can open and compare when partial images generated
  2. we can easily replace html in case it was removed and alreted in anyway

what do you think?

Request: autoupdate image once generated

Is it possible to autoupdate images in the browser once they are generated?

You can manually force an update by clicking on any axis selector, but this requires scrolling to the top which is annoying on larger grids.

For now I am doing the workaround of running:

go = 1; function FillTableForever() { fillTable(); if (go) {setTimeout(FillTableForever, 10000);}}; FillTableForever()

in the browser console, but this:

  1. Is annoying, as I have to execute said script.
  2. Is polling-based, and somewhat hammers the server as a result.
  3. Partially resets browser state when run.
  4. Has a relayout for a moment, even if no images changed.

I realize currently that the generation is largely decoupled from the serving of the resulting directory, which makes true pushing rather difficult. That being said, something along the lines of the following could work:

  1. Generation script maintains a recent.csv file in the output directory:
    1. Said file has say, 10 lines of "sequence_num, path_to_file"
      1. Tradeoff here between small file -> less data polled and large file -> less frequently missed updates.
    2. Generation script updates said file after every file generated.
      1. This update needs to be atomic, by e.g. using atomicfile.
  2. Browser polls said recent.csv frequently:
    1. If file changed:
      1. If we potentially missed an update (min sequence # in new file is not present in old file), do a full refetch:
        1. For all images:
          1. Initiate a refetch of the image.
          2. When complete, replace the image with the refetched image
      2. Otherwise, for all files changed:
        1. Initiate a refetch of the image.
        2. When complete, replace the image with the refetched image

Bug: Windows folder path limit

I had images stop showing up on the webpage as I added more axes in the yaml and I think I've figured out why. They are all being created and sorted into the correct folders, and the webpage is looking in the correct place, but I was getting placeholders in a lot of spots.

After some troubleshooting it looks like I hit the maximum character limit for a file path in windows at 260 characters. I tested it by generating a file path of 259 characters, I confirmed that the webpage loaded the image, then added a character to axes: Test: values: 1234(5) and the image stopped loading.

I'm pretty sure this can't be fixed, since it's a windows issue, but maybe get an alert if the file path gets over a certain limit

UI Error: Uncaught DOMException: Failed to execute 'querySelector' on 'Document'

On selection of the model I have, I am getting the console error

Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#tab_models__models\abyssorangemix2_sfw_safetensors\abyssorangemix2_sfw.safetensors_[038ba203d8]' is not a valid selector.
    at n (file:///C:/Users/geek_/OneDrive/Desktop/Python%20on%20C/stable-diffusion-webui/outputs/txt2img-grids/peach-castle/bootstrap.bundle.min.js:6:605)
    at kn._deactivate (file:///C:/Users/geek_/OneDrive/Desktop/Python%20on%20C/stable-diffusion-webui/outputs/txt2img-grids/peach-castle/bootstrap.bundle.min.js:6:75461)
    at kn.show (file:///C:/Users/geek_/OneDrive/Desktop/Python%20on%20C/stable-diffusion-webui/outputs/txt2img-grids/peach-castle/bootstrap.bundle.min.js:6:75045)
    at HTMLAnchorElement.<anonymous> (file:///C:/Users/geek_/OneDrive/Desktop/Python%20on%20C/stable-diffusion-webui/outputs/txt2img-grids/peach-castle/bootstrap.bundle.min.js:6:77604)
    at HTMLDocument.n (file:///C:/Users/geek_/OneDrive/Desktop/Python%20on%20C/stable-diffusion-webui/outputs/txt2img-grids/peach-castle/bootstrap.bundle.min.js:6:4135)

image
image
Having the model as a (super) Axis works fine, its just the tabs

I will investigate what I can do on this end but JS isn't something I am knowledgeable in

wrong model loaded with single digit filename

I had 2 models, 7.ckpt and 9.ckpt
I specified 9 as below

axes:
    model: 
        title: Model
        description: >
                     The model
        values:
            9: model=9

(among other values in the yaml)
however when run it loaded 7.ckpt rather than the expected 9.ckpt

Question: Multiple config per entry

I was wondering on if (and how) I can set multiple parameters per entry?

Like, I would like to set Height and Width something like the following

axes:
  dimensions:
    title: Dimensions
    values:
      landscape: height = 360; width = 640
      portrait: height = 640; width = 360
      square: height = 512; width = 512

[Enhancement] Sticky headers on image table

I've found that it's a nice QOL change to make to the template for the webpage.

All that's needed is in page.html line 36 from:

table tr td {
    vertical-align: top;
    border: 1px solid black;
}

to

table tr td, table tr th {
    vertical-align: top;
    border: 1px solid black;
}
th {
    position: sticky;
    top: -1px;
    background-color: #222;
}

And since TD's can't be made sticky but TH's can so proc.js line 118 needs changed from:
newContent += '<td title="' + val.description.replaceAll('"', "&quot;") + '">' + val.title + '</td>';
to
newContent += '<th title="' + val.description.replaceAll('"', "&quot;") + '">' + val.title + '</th>';

The top for the TH is needed for the sticky to work. 0 for it would work but I found that a pixel of the background is visible on the top of the header so I used -1px to cover that up.

The background color isn't technically necessary but it does keep the contrast good where if it isn't specified the contrast would depend on the image that the header is floating over.

Thank's for putting this extension together. Great work :)

Batching

based on my experiments, I can generate 4 images with most of my models (basically anything pruned) with a negligible increase in average time per image (from 4.6 it/s to 4.2 it/s was the difference on one I use often) I tried enabling batch of 4 to generate 4 and see a comparison of 4 different seeds with each selected model/sampler/prompt replacement but it still only generated 1. I do not know how batching works on the back end, but can it be made where either you specify multiple seeds and it generates all specified as a single batch job, or if the generation engine allows, that it generates a specified number of images as a single batch (would probably only work with promptreplace I would guess), so that it takes less time for the entire grid to generate (current grid is 45 hours to generate, I am at 10 in cause I keep wanting to do other things)

Request: Axis navigation that's always accessible

Request

Axis navigation should stick to the top of the screen as well as the table header.
Right now, if you scroll down the page, you can't quickly change the third axis.
2023-03-13_14-08-42

2023-03-13_14-09-31

Optional

  • A checkbox to disable sticking, because in some cases navigation can take up a lot of space on the screen.
  • A triangle button for collapsing-expanding the navigation menu - quick access that can be quickly hidden.

Request: Option to prevent to start process if infinite-grid webviewer page already exists

Currently, we have "Overwrite existing images (for updating grids)" option to prevent images being overwritten.
However, this is not suffice to prevent assets for infinite-grid webviewer page being overwritten or processed images being saved in new folder.

These can be avoided by checking there is no assets in output path and nothing in output path/images .

Recent WebUI has confusing issue about model

When generating anything (even when not changing model), the issue is:

Model loaded in 4.7s (0.5s create model, 3.6s load weights).
Error running process: /home/user/table-diffusion-webui/extensions/unprompted/scripts/unprompted.py
Traceback (most recent call last):
  File "/home/user/stable-diffusion-webui/modules/scripts.py", line 347, in process
    script.process(p, *script_args)
  File "/home/user/stable-diffusion-webui/extensions/unprompted/scripts/unprompted.py", line 218, in process
    setattr(p,att,Unprompted.shortcode_user_vars[att])
AttributeError: can't set attribute 'sd_model

The model loads just fine (although perhaps I should have tested that properly, maybe it isn't actually loading at all, I'm not sure because the models I was trying out looked very similar), in spite of the error claiming the contrary.

This same issue has appeared with numerous other extensions with recent webui commits. Perhaps it's related to the previous issue about the VAE #24 in other words the webui API has probably changed a little bit.

select subset of entries over active axes

I generate images over a list of ~12 prompts and ~5 seeds over a range of models, scales, etc. When I have the prompt axis selected, it would be useful if I could view a subset of 4 or 5. I am not sure how it would integrate into the interface, but it would be great to have something you can select and reorder as needed. Then I might generate 50 prompts and 20 seeds if it is possible to view just a subset.

Thank you so much for this tool. Without any improvements, I find it to be incredibly useful and by far the nicest way to explore this space. Thank you very much for sharing your work.

Setting a random seed is not obvious.

When I set the seed's value to -1, I expect one of the following:

  • the entire grid has a single randomly-generated seed
  • every image in the entire grid has its own unique randomly-generated seed

I instead observe:

  • the infinity grid gui shows every image's seed as -1, which is nonsense
  • hunting down the text files generated alongside the images does not show seed information, which is strange (it shows it for when I set seed to a fixed value such as 12345).

I would like for the seed to be explicitly stored in the generated text file.

I would also like to have the option to make the seed either random per-grid or per-image-per-grid.

(The seed is also not in the pnginfo. I don't know the seed of my images set to generate with seed=-1.)

[Feature request] Add field for folder name

Creating the folder based on the template filename makes it impossible to make multiple grids from the same template without manually renaming or moving the folder. Adding an option to set the folder name (or at least adding something to the current folder name) would be great.

Conditional skip

Around line 168 under the file in scripts/, an error is raised if prompt replace did not replace something.

if Script.VALIDATE_REPLACE and match not in p.prompt and match not in p.negative_prompt:
        raise RuntimeError(f"Invalid prompt replace, '{match}' is not in prompt '{p.prompt}' nor negative prompt '{p.negative_prompt}'")

It is convenient, as mentioned in other issues here and there, to have a dreambooth model specify its trained activation string with a prompt replace. If a placeholder string is "style" and the activation string is "drawing" but we have an axis that instead uses "painting" and "watercolor", then presently I have two placeholder strings "style_dreambooth" and "style_other" and perform prompt replace twice in each value of the axis. (This means non-dreambooth's results have a dummy "style_dreambooth" string left over.)

To decrease the number of images generated, an axis could perhaps skip generating some value when its prompt replace fails, assuming the dreambooth's axis already replaced "style_other" with an empty string.

However, more in line with the spirit of this extension, the regular style prompt replace can be left alone. In this case, the style axis should delete the "style_dreambooth" string only if it exists. If the dreambooth model already replaced that string, then the error should not be raised.

So this weird hack could be used to make better grids in the later case, but it would also permit fractionally decreasing the dimensions of a grid by saying, "we have many axes including 3 models and 2 styles, don't make images only for styles when the single dreambooth model is selected".

I don't know how to reference other github issues, but the former case is like having the model axis' dreambooth value set a variable, "don't define a style because I already set it," and then having the prompt replace that occur later on either not generate an image under this condition or else perform an alternative prompt replace under this condition, but now this is starting to resemble things expected of a full programming language and goes beyond the confines of yaml or the prompt replace mini-dsl where you merely separate params with an equals sign.

filecache not ram cache (or optional cache)

when you get a few million variations on your megagrid, let it run through the night and the next day, because this script caches the images to allow the webpage to load faster, it gets to be massive. just checked my ram this evening after work, of my 96 gb of ram, I was using 350 gb (pagefile of course), this meant I couldnt do anything.
also, at that amount of variations, it takes nearly 2 hours to start the script. make the webpage caching optional, as I just access from the file directly, and have the cache builder write a json array of all the prompts to a file so that as long as the yaml isnt modified, the json can be fed directly into the api after it is made and no extra startup time is needed (hash the yaml)

Generation metadata not preserved in png files

It appears the "Save text information about generation parameters as chunks to png files" option isn't preserved when output through the extension. It would be great if the end outputs still kept this if png.

feature request: buttons in advanced to check/uncheck all

It would be nice if there were buttons to select all/unselect all values on an axis in the advanced settings.

I get you can use the "show:false" parameter in the yml to default things to off in the output but toggles seem easier and cleaner.

Unable to add new generations to the grid

Problem

Let's say I have these axes:
x-a, x-b, x-c
y-a, y-b, y-c, y-d, y-e, y-f, y-g
z-a, z-b, z-c, z-d
t-a, t-b
So script will generate all the x-a, than all the x-b, than all the x-c.

And if you stop it on x-b y-g z-d t-b - you can start script again and it continue from x-c y-a z-a t-a
But, if you stop it on x-b y-d z-b t-a - the script will anyway start from x-c y-a z-a t-a

Solution

The skipping algorithm must look at all levels, not just the first.

Unclear how to specify seed, varseed, varstrength as single value on seed axis

I'm trying to understand how to specify variation seeds properly in the yml file. I thought I could specify as follows similar to a prompt and negative prompt on a prompt axis, but it doesnt seem to use the varseed or varstrength:

    seed:
        title: Seed
        values:
            1:
              title: 1
              params: 
                seed: 1
                VarSeed: 2
                VarStrength: 0.01
            2:
              title: 2
              params: 
                seed: 1
                VarSeed: 2
                VarStrength: 0.99

I don't necessarily want to put them on separate axes as the seed, the varseed, and the varstrength all in conjunction define a distinct seed value between 2 seeds.

Merry Christmas and thanks again!

multiple promptreplace

Unless I am doing something wrong, when I have 2+ valid promptreplace options, it only uses 1. I tried #18 which worked fine with 1 valid prompt, but when I have 2 or more, it stops processing after the last. I have a promptreplace axis setting a character, another setting a scene, with a second optional promptreplace if valid based on the first. only the second optional is used if both are valid. this was done with both using promptreplace instead of different spellings, but I do see 4 valid spelling options. does that affect it?

How do I expand a 'Create in UI' grid?

I used the 'Create in UI' feature to make an infinity grid. It is saved to an external drive if that matters. I was able to expand it the day I was creating it, however I would like to expand it further. I took a screenshot of all my settings and reconfigured them exactly the same (axis order, output folder name, prompt, and negative prompts). When I do a dry run to validate it it says it will make 0 images though. I tried to look for a yaml file for it but was unable to find one generated (do they auto generate?). My guess is that it has to do with the 'Select grid definition file' being set to 'Create in UI'. Is there a way to expand my old grid at this point?

Request: Export as XY plot

Problem

2023-03-13_16-41-52
2023-03-13_16-40-27

Requests

  • Add export as png for all two-dimensional grid variations
  • Add export as png for current 2D grid selection
  • Add export as png for current 3D grid selection (as in XYZ Plot script)

Or make the process of exploring large grids as convenient and smooth as in Windows Image Viewer

Desktop.2023.03.13.-.18.06.08.04.mp4

Yes, these are different things, but I need this smooth view, I'm fine with Windows Viewer, so I thought it would be easier to integrate the export feature rather than make dynamic zooming 😅7

However, the export as PNG is also something I want to have 🙂

Setting a non-deterministic prompt is not obvious

Let us say I use a prompt wildcards extension (in my case that is Unprompted) and I install a wildcard string, "«choose»one¦two«/choose»" into my prompt. Then, let us say that generates a random string, "one" or "two" whenever the prompt is evaluated.

The infinity grid GUI shows the negative prompt to be "«choose»one¦two«/choose»" which wrong.

The generated text file next to the generated image shows the negative prompt to be the randomly-generated-per-image "one" or "two" which is right.

The infinity grid GUI should reflect the prompt stored in the text file and not the raw string stored in the grid's yaml configuration file.

Request: export YAML for grid made in the UI

It would be good if we could "get started" with our grid axes and items in the UI and then get a YAML file that we can continue to tweak and add to. The ability to make "quick" grids in the UI is great but this would be very useful.

TypeError: 'float' object is not callable

Hello

Trying to get this working as it seems amazing, but every time I get an error after generation.
Dry runs work fine, the generated page works fine, the generation works fine (I can see the generated images in the relative folders) but right at the end it errors with "TypeError: 'float' object is not callable"

Console output:

Error completing request
Arguments: ('cat, feline, feral, big eyes, sharp eyes, abstract, 4k, bokeh, full body, abstract background, flowers, pattern, gradient, design, cover page, front cover, movie poster', 'lowres, bad anatomy, bad hands, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry', 'None', 'None', 23, 0, False, False, 1, 1, 11, 1149236390.0, -1.0, 0, 0, 0, False, 640, 512, False, 0.7, 0, 0, 4, False, False, False, False, '', 1, '', 0, '', True, False, False, '
Confused/new? View the README for usage instructions.

', True, True, False, True, True, 'cattest.yml', '🔄') {}
Traceback (most recent call last):
File "H:\AI TEST\FRESH\stable-diffusion-webui\modules\call_queue.py", line 45, in f
res = list(func(*args, **kwargs))
File "H:\AI TEST\FRESH\stable-diffusion-webui\modules\call_queue.py", line 28, in f
res = func(*args, **kwargs)
File "H:\AI TEST\FRESH\stable-diffusion-webui\modules\txt2img.py", line 46, in txt2img
processed = modules.scripts.scripts_txt2img.run(p, *args)
File "H:\AI TEST\FRESH\stable-diffusion-webui\modules\scripts.py", line 328, in run
processed = script.run(p, *script_args)
File "H:\AI TEST\FRESH\stable-diffusion-webui\extensions\sd-infinity-grid-generator-script\scripts\infinity_grid.py", line 612, in run
with SettingsFixer():
File "H:\AI TEST\FRESH\stable-diffusion-webui\extensions\sd-infinity-grid-generator-script\scripts\infinity_grid.py", line 433, in exit
hypernetwork.apply_strength()
TypeError: 'float' object is not callable

I've tried updating, re-installing the extension, even running it on a fresh SD install. I've tried the example scripts provided and no luck.

cattest.yml [pastebin]

optimization on steps

when defining multiple steps from the range of 2 to 50, the generator goes through all of them from step 0, it would be nice if the optimization happen so in the middle of the steps it saves the pictures and continue where it left off

Rework of hypernetwork handling in Auto1111 webui breaks the generator

A recent automatic1111 webui update AUTOMATIC1111/stable-diffusion-webui@40ff6db reworked how hypernetworks are handled, and subsequent runs of the generator fail with the following:

`Traceback (most recent call last):
File "A:\ZZZ_SD3\stable-diffusion-webui\extensions\sd-infinity-grid-generator-script\scripts\infinity_grid.py", line 703, in run
result = runner.run(dry_run)
File "A:\ZZZ_SD3\stable-diffusion-webui\extensions\sd-infinity-grid-generator-script\scripts\infinity_grid.py", line 464, in run
oldHnStrength = hypernetwork.HypernetworkModule.multiplier
AttributeError: type object 'HypernetworkModule' has no attribute 'multiplier'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "A:\ZZZ_SD3\stable-diffusion-webui\modules\call_queue.py", line 56, in f
res = list(func(*args, **kwargs))
File "A:\ZZZ_SD3\stable-diffusion-webui\modules\call_queue.py", line 37, in f
res = func(*args, **kwargs)
File "A:\ZZZ_SD3\stable-diffusion-webui\modules\txt2img.py", line 49, in txt2img
processed = modules.scripts.scripts_txt2img.run(p, *args)
File "A:\ZZZ_SD3\stable-diffusion-webui\modules\scripts.py", line 337, in run
processed = script.run(p, *script_args)
File "A:\ZZZ_SD3\stable-diffusion-webui\extensions\sd-infinity-grid-generator-script\scripts\infinity_grid.py", line 702, in run
with SettingsFixer():
File "A:\ZZZ_SD3\stable-diffusion-webui\extensions\sd-infinity-grid-generator-script\scripts\infinity_grid.py", line 507, in exit
hypernetwork.apply_strength()
AttributeError: module 'modules.hypernetworks.hypernetwork' has no attribute 'apply_strength'`

Bug: Hiding values seems broken on primary axes

Since the inclusion of the super-axes (which are awesome, btw) there seems to be issues with hiding values through the advanced options. It appears axes with hidden values only work when displayed as super-axes. If you hide a value on one of your primary axes, the grid doesn't update, nor does it update if you switch to an axis with hidden values.

Dynamic Prompts tandem

Problem

I am a Dynamic Prompts user. In this extension the separator is the symbol |, which is good because this symbol is not usually present in the usual prompt.

DP allows you to generate several variants of the images at once, but it does not work in tandem with Plot XYZ.

However, DP works with the Infinity Grid... just doesn't save all the results :/
2023-03-12_03-45-45

prompt: woman {wears a red cloak|in ikebana dress|wears a black hooded cloak made of zinnias}, {standing outside on the beach at sunset|in an old soviet city, hyper real, fantasy world|holding an umbrella in her hands, eonn}
CFG Scale: 4, 8

Request

So I either need:

  • Infinite Grid to be able to save all images generated in tandem with Dynamic Prompts,
  • either Prompt Replace to use | as a separator instead of , so that I can drop DP in favor of IG.

Request: new mode - amount of seeds (variants)

Problem

I need to experiment. I need a lot of variants with the same parameters. I'm too lazy to think about seeds.

Yes, I can choose Seed and input -1, -1, -1, -1 for 4 variants, but why not to input just one number 4 cause I'm still lazy.
This method does not display real seed on the web page:
2023-03-13_13-02-06

How it's may work

  1. The user inputs one number of randomly generated seeds
  2. The script itself generates as many random seeds as set by the user and inserts them into the further processing.

And it would be a good idea to automatically put the generated numbers in the input field and automatically change the mode to Seed, so that you can compare further results with those generated seeds.

Do variables exist in YAML?

This is a somewhat silly example but it would be convenient. How would one define a variable x such that …

defineVariablesHere:
  x: city
axes:
  prompt:
    title: The Prompt
    values.prompt: forest near the ${city}
  negative_prompt:
    title: The Negative Prompt
    values.negative prompt: ${city}

…, or it might be used for PromptReplace where numerous PromptReplace operations share many similar substrings.

The only thing I find refers to placeholders and aliases, https://stackoverflow.com/questions/41620674/use-placeholders-in-yaml

Since I want to substitute into a string that won't work.

Adding new axes removes previous generations

  1. Generate a page with 2 checkpoints/models.
  2. Generate again but this time add another axes with 2 samplers.
  3. Generations from step 1 are removed/replaced from the page.

Also I can add new axes but can not change or remove existing ones

Doing multiple simultaneous PromptReplace operations seems impossible

Given…

axes:
  replaceSomething:
    title: Replaces two somethings at once
    values:
      firstOption:
        title: Makes colors blue and the atmosphere hazy
        params:
        PromptReplace: color = blue atmosphere = hazy
      secondOptions:
        title: Makes animals turtles
        params:
        PromptReplace: animals = turtles

…, I find myself lost as to how to proceed; how can I perform multiple PromptReplace operations, and perhaps specify the order in which they occur?

Feature request - Auto cycle 3rd axis

This is a fantastic tool for comparison! Great work!

I think a good usability improvement would be to have the ability to auto-cycle through an axis of choice for comparison.

I would envision this as a check box and delay setting that could be applied to one of the axes such that while viewing 2 axes in the grid viewer it would swap values from the 3rd axis and auto-update the display.

For example: if I have model, steps, and cfg scale as my axes, and I'm actively viewing steps x cfg scale, I could check the box by model and set delay to 5 seconds to have my entire grid display cycle through each model while viewing without having to scroll up to change model and scroll back down to view.

request: upscale button

I often see particularly good images generated with this massive grid I have. but I generate at a low resolution without high res fix or anything similar so it doesnt take a year. could a button to regenerate at a higher resolution or to run through an upscaler be added? if the tab is run through the webui program, it should be able to make an api call to the hoster. if its opened directly from the .html file then that button probably wont work though.

Vae issue regarding "KeyError: 'auto'"

On any recent webui commit, irrespective of the value of the "vae" parameter in the used yml file, and irrespective of the vae selected in the webui, and irrespective of whether or not a similar-named vae exists for the checkpoint being used, the following error occurs:

Weights loaded in 0.5s.
Error completing request
Arguments: ('task(mbl812qsznt2rax)', '', '', 'None', 'None', 20, 0, False, False, 1, 1, 7, -1.0, -1.0, 0, 0, 0, False, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, 6, 0, 0, 0, 0, 0.25, False, 'LoRA', '', 1, 'LoRA', '', 1, 'LoRA', '', 1, 'LoRA', '', 1, 'LoRA', '', 1, True, False, 1, '', 0, '', True, False, False, False, False, False, False, False, '', 1, '', 0, '', True, False, False, 'Not set', True, True, '', '', '', '', '', 1.3, 'Not set', 'Not set', 1.3, 'Not set', 1.3, 'Not set', 1.3, 1.3, 'Not set', 1.3, 'Not set', 1.3, 'Not set', 1.3, 'Not set', 1.3, 'Not set', 1.3, 'Not set', False, 'None', '<br>Confused/new? View <a style="border-bottom: 1px #00ffff dotted;" href="https://github.com/mcmonkeyprojects/sd-infinity-grid-generator-script">the README</a> for usage instructions.<br><br>', False, True, False, True, True, 'crow_prompts0.yml', '🔄', False, False, 4.0, '', 10.0, False, False, True, 30.0, True, False, False, 0, 0.0, 10.0, True, 30.0, True, '', False, False, False, False, 'Auto', 0.5, 1, 'fixed', 1, 'linear', '30', 'grad_min', 0.01, 1, 'clip', 1.0, 1.0, 'mp4', 10.0, 0, '', True, 'Euler a', 0.95, 0.75, 'zero', 'pos', 0, -0.002, 5, 0, -0.02, False, 'linear', 0.02, 0.0, 0.5, None) {}
Traceback (most recent call last):
  File "/home/user/stable-diffusion-webui/modules/call_queue.py", line 56, in f
    res = list(func(*args, **kwargs))
  File "/home/user/stable-diffusion-webui/modules/call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "/home/user/stable-diffusion-webui/modules/txt2img.py", line 49, in txt2img
    processed = modules.scripts.scripts_txt2img.run(p, *args)
  File "/home/user/stable-diffusion-webui/modules/scripts.py", line 337, in run
    processed = script.run(p, *script_args)
  File "/home/user/stable-diffusion-webui/extensions/sd-infinity-grid-generator-script/scripts/infinity_grid.py", line 691, in run
    result = runner.run(dry_run)
  File "/home/user/stable-diffusion-webui/extensions/sd-infinity-grid-generator-script/scripts/infinity_grid.py", line 461, in run
    set.applyTo(p, dry)
  File "/home/user/stable-diffusion-webui/extensions/sd-infinity-grid-generator-script/scripts/infinity_grid.py", line 394, in applyTo
    mode["apply"](p, val)
  File "/home/user/stable-diffusion-webui/extensions/sd-infinity-grid-generator-script/scripts/infinity_grid.py", line 111, in applyVae
    sd_vae.reload_vae_weights(None, sd_vae.vae_dict[vaeName])
KeyError: 'auto'

I provisionally worked around this issue by changing the relevant function to something like:

def applyVae(p, v):
    sd_vae.reload_vae_weights(None, sd_vae.vae_dict['kl-f8-anime2.ckpt'])

Of course this is a hardcoded vae. Specifying this manually in the yml file seems to do nothing, which is strange. Most people probably wind up using the exact same vae for every single checkpoint so it's not like it matters, but I do wonder why this occurs.

As an aside, do you know of any easier way to reload extensions and scripts for webui other than manually killing the webui process and re-launching it? I couldn't get webui to accept the above change until I did so.

Request: Enable image filenames in leaf directories to be distinct

First: This is an amazing project that has greatly improved my workflow over the various XYZ plots before it. Thank you for the robust documentation and sharing your work with the community!

The biggest issue I have is that pulling aside top-choice images is difficult, given naming collisions.

Ideally: if a "like" option could start building a list, and allow a batch "download" of files with more descriptive names, this would solve the use case. Even if the "like" state were not persisted and only existed as long as the tab is loaded.

Alternatively, if it is practical for the .jpg/.png files to have unique names (ideally with a format string similar to the Automatic1111 UI itself), this would be a decent fallback. I can open them in tabs, and then individually drag / save-as to a folder.

cycle with keyboard arrows?

This is an amazing extension. Super useful. And I am very grateful for your support and useful updates. (If I say these things just before making a request, does it seem disingenuous?)

Now that I have seen the auto-cycler, I want to control it with my keyboard instead of waiting for the specified amount of time. Is that possible? Say with the forward and back arrows?

At present, there is only one set I would want to cycle through (models or prompts), but I could imagine using different key-pairs to more forward and backward through different axes.

Again, love the tool and thank you so much!

Feature suggestion: Per-model parameters

I use it to generate comprehensive comparison benchmark for the dozens of versions of my self fine tuned models, and it's almost perfect for that. The most important feature I use is the ability to see many prompts (and their searchreplace variants) with all the models in order to check what training parameters allowed better editability of style, subject, or stayed more true to the subject, etc..

One thing that would be perfect for my use case, is the ability to specify parameters on a per-model basis ; just like you specify the model's native resolution right now.

Specifically, dreambooth model A may have been trained on subject prompt SKS with class PERSON, and model B trained with prompt SCROOGEMCDUCK with class DUCK.
I would like to be able to write "photo of subject_replaceme class_replaceme on a motorcycle" in my prompts and use PromptReplace= subject_replaceme = sks on model A and PromptReplace= subject_replaceme = scroogemcduck on model B.
Another example would be that a model may have been a bit over trained compared to another and need CFG adjustement, for example, it would be nice to ask to systematically apply a -5 offset to CFG for a given model, or a +5 for another.

Anyway, I'll take this github issue as an opportunity to thank you for that awesome tool. Very nicely done, and very useful.

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.