stable-diffusion-webui-forge icon indicating copy to clipboard operation
stable-diffusion-webui-forge copied to clipboard

X/Y/Z plot doesn't respect checkpoints from X Type, but use main selected checkpoint

Open shsmad opened this issue 1 year ago • 9 comments

On commit f743fbff83c7db0bf0957ab9718f8d42a47eb35e I found strange behavior, steps to reproduce:

  1. enable X/Y/Z plot
  2. select «Checkpoint name» for «X Type», select few checkpoints
  3. enter description, sampling method & scheduler type, steps & cfg
  4. hit generate

Expected results: different single images from different checkpoints & grid with different images on it

Got results: same single images, that are using only one checkpoint — main checkpoint selected in top dropdown, not those, which are entered in X Type

shsmad avatar Aug 07 '24 12:08 shsmad

Came to report the same issue. X/Y/Z does not use selected checkpoints. It uses only the one you have selected in dropdown

dxwarlock avatar Aug 08 '24 04:08 dxwarlock

Same issue here

PixelClassicist avatar Aug 13 '24 11:08 PixelClassicist

Checkpoint name & VAE don't work.

kievhsiao avatar Aug 13 '24 11:08 kievhsiao

I've found problem:

In old version e95333c5568b5039f7118d036c16afa9a2a8ad2c in modules/processing.py in def process_images was code, which respects checkpoints from xyz:

        # if no checkpoint override or the override checkpoint can't be found, remove override entry and load opts checkpoint
        # and if after running refiner, the refiner model is not unloaded - webui swaps back to main model here, if model over is present it will be reloaded afterwards
        if sd_models.checkpoint_aliases.get(p.override_settings.get('sd_model_checkpoint')) is None:
            p.override_settings.pop('sd_model_checkpoint', None)
            sd_models.reload_model_weights()

        for k, v in p.override_settings.items():
            opts.set(k, v, is_api=True, run_callbacks=False)

            if k == 'sd_model_checkpoint':
                sd_models.reload_model_weights()

            if k == 'sd_vae':
                sd_vae.reload_vae_weights()

            res = process_images_inner(p)

so that opts.set(k, v, is_api=True, run_callbacks=False) set correct sd_model_checkpoint and sd_vae in shared.opts which are used later.

But in current version (00f1cd36) there is no such code in that file, only

        res = process_images_inner(p)

Also in e95333c5568b5039f7118d036c16afa9a2a8ad2c in modules/initialize_util.py there are lines

    shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: main_thread.run_and_wait_result(sd_models.reload_model_weights)), call=False)
    shared.opts.onchange("sd_vae", wrap_queued_call(lambda: main_thread.run_and_wait_result(sd_vae.reload_vae_weights)), call=False)

which are commented in 00f1cd36.

@lllyasviel , FYI

shsmad avatar Aug 13 '24 19:08 shsmad

This problem sat around for a week, long enough for the op to get tired and figure the problem on their own and we can't get a fix actually implemented or anything?

I just spent an hour testing checkpoints and came back to a pile of identical images thinking I'd somehow fucked up something as simple as setting up an xyz plot.

MBurneracc avatar Aug 15 '24 05:08 MBurneracc

This problem sat around for a week, long enough for the op to get tired and figure the problem on their own and we can't get a fix actually implemented or anything?

I just spent an hour testing checkpoints and came back to a pile of identical images thinking I'd somehow fucked up something as simple as setting up an xyz plot.

Chill man, Illyasviel has been pushing updates all week. I agree the issue is annoying, but come on

PixelClassicist avatar Aug 15 '24 09:08 PixelClassicist

It's not that this issue is annoying, it's that the many many many issues all together are exceedingly annoying. Broken core features and killed extensions all due to unforced errors of seemingly arbitrarily deleting code that otherwise could have been left alone. Issues left long enough that people got tired of waiting and figured out what was wrong themselves. If I could figure out how to get Stability Matrix to install anything other than the ten most recent commits then I would but otherwise I'm stuck hoping they stop adding new flux features and fix the stuff that broke over a week ago.

MBurneracc avatar Aug 15 '24 17:08 MBurneracc

It's not that this issue is annoying, it's that the many many many issues all together are exceedingly annoying. Broken core features and killed extensions all due to unforced errors of seemingly arbitrarily deleting code that otherwise could have been left alone. Issues left long enough that people got tired of waiting and figured out what was wrong themselves. If I could figure out how to get Stability Matrix to install anything other than the ten most recent commits then I would but otherwise I'm stuck hoping they stop adding new flux features and fix the stuff that broke over a week ago.

I'd recommend switching to dev2 ranch. Everything works there as it was before the Flux update. I have a seperate install of dev2 for SDXL atm

PixelClassicist avatar Aug 16 '24 12:08 PixelClassicist

Reverting to last stable build 100% fixed this: https://github.com/lllyasviel/stable-diffusion-webui-forge/releases

Hope @lllyasviel is doing well, I know how much work these projects can be!

JamieTi684 avatar Aug 19 '24 12:08 JamieTi684

Yeah.. this is rough. Wasted tons of time, made poor decisions because I didn't realize this bug existed. Still there in latest version.

skimail avatar Oct 13 '24 19:10 skimail

Yeah.. this is rough. Wasted tons of time, made poor decisions because I didn't realize this bug existed. Still there in latest version.

Actually was fixed a couple of updates ago. My X/Y/Z plot works great now

PixelClassicist avatar Oct 16 '24 13:10 PixelClassicist