mcmonkeyprojects / sd-infinity-grid-generator-script

Infinite-Axis Grid Generator for Stable Diffusion!
MIT License
180 stars 24 forks source link

allows setting an output path. #112

Closed yggdrasil75 closed 1 year ago

yggdrasil75 commented 1 year ago

poorly named branch. this allows setting a specific output path for a given axisvalue instead of using the axisvalue name. still uses name if no path provided.

yggdrasil75 commented 1 year ago

this fixes #50 as well.

yggdrasil75 commented 1 year ago

fixed all 3. still dont get it though. but did it anyway.

yggdrasil75 commented 1 year ago

oh. just noticed that this uses the wrong path in the html/javascript. let me try figuring that out.

mcmonkey4eva commented 1 year ago

Regarding the actual functional purpose of this PR: Can you give an example of a case where you would want to set the path value, but where updating the key would not be sufficient?

yggdrasil75 commented 1 year ago

piecemeal skipping with batches and various output resolutions was the intended goal. on 1.5 you can easily do larger batches for better performance, but on xl the large batches have basically no benefit.

axis:
    model:
        title: models
        values:
            1.5:
                title: old version
                params:
                    model: sd1.5.safetensors
            xl:
                title: new version
                params:
                    model: sdxl.safetensors

    batching:
        title: batch sizes
        values:
            512xl:
                title: 512x
                path: 512
                skip:
                    - old version
                params:
                    batchsize: 4
            512old:
                title: 512x
                path: 512
                skip:
                    - new version
                params:
                    batchsize: 36

in addition, it can be useful if you want to keep an axisvalues key, but change the params. that isnt user-facing once done, but still may be useful.

yggdrasil75 commented 1 year ago

this looks correct now, I think. I am not seeing any issues after making these changes anymore.

mcmonkey4eva commented 1 year ago

Unresolved issues:


Issues I went ahead and resolved myself by the commits above:


With the code issues fixed, I'm going to merge this in now, however I urge you to think about the topic of testing well, and the topic of defining a clear purpose for the code you write.

mcmonkey4eva commented 1 year ago

ps you appear to have authored the commits from the account @yggdrasil7557 rather than your main one? Not sure what's up with that, probably you'll want to check your git settings.

also ps re the commit titled I still dont get it. it does the same thing. I understand that seems weird but I promise there's a good reason, if you keep on the programming path eventually you'll wind up learning about the hellish rabbit hole of Windows-Linux intercompatibility and learn why things like that are important, and why older APIs like os.path get them wrong (and newer APIs sometimes do better, iirc python's pathlib is a bit better at handling the edge cases)