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

[Bug]: v-pred checkpoints don't work properly after the latest update

Open zxlostsoul opened this issue 1 year ago • 3 comments

Some of the latest changes are broken 1.5 v-pred models.

Model example: https://civitai.com/models/199059/9th-tail

It has .yaml config with

  params:
    parameterization: "v"

But for some reason it doesn't work like before.

Tested on clean webui-forge setup.

It creates mess instead of images: 00017-771476832

zxlostsoul avatar Aug 14 '24 19:08 zxlostsoul

It seems things relating to custom configurations for checkpoints got thrown out. Don't see any apparent way to set prediction types in the current repo state. https://github.com/lllyasviel/stable-diffusion-webui-forge/commit/bccf9fb23a2cbc9d42091a856b3d35b2c4414d51#diff-b710a9b8e9fbcc5bc5a014f938c9c74564c1dcfc86929f0dc9ff643ba3fe7873

rabidcopy avatar Aug 14 '24 20:08 rabidcopy

For those who need v-pred models right now:

Switch git repo to commit e3522c89191a01e0dd5855abbfd15cb685be3634 , it's the last commit where checkpoint configs works (02.08.2024).

Commit bc9977a305391ec389e327f17df0bc33dd0ad472 is breaking it.

Hope there will be other way to set prediction type soon...

zxlostsoul avatar Aug 15 '24 11:08 zxlostsoul

@lllyasviel Any update on this? A lot of models just stopped working alltogether

alesimula avatar Aug 25 '24 20:08 alesimula

I also could not load a v-prediction model correctly, it seems to be ignoring the lines in the yaml and produces burnt images because of it.

geriberton avatar Sep 25 '24 22:09 geriberton

I've made a patch that allows you to override the prediction type used for sampling under Sampler parameters. image ~~Needs to be applied prior to the model being loaded for inference. (Restart or load another model if it's still stuck in eps.)~~ Save the following txt file in the root of your Forge folder and run git apply prediction.txt. prediction.txt

rabidcopy avatar Oct 10 '24 20:10 rabidcopy

Nice work, rabidcopy. If the prediction_type is set at the start of sampling instead, there's no issue with needing to apply before model is loaded. branch. Settings > User interface > Quicksettings list can be used to add your new setting to the UI. I'm unsure about merging though, it feels just a bit too much like a hack. Then I realised it could be done entirely with an extension, so added it to this.

DenOfEquity avatar Oct 14 '24 00:10 DenOfEquity

Then I realised it could be done entirely with an extension, so added it to this.

Nice, I will admit the former is indeed hacky.

rabidcopy avatar Oct 14 '24 01:10 rabidcopy

I would love to see this repaired, but getting the feeling this is a low priority and we should just stick with SDXL and Flux models.

somelinuxguy avatar Oct 18 '24 12:10 somelinuxguy

@catboxanon

I don't get it, tried the latest version with the model EasyFluff_v10-Prerelease with the yaml file in the same directory as the model, it's still not generating properly, am I missing something? (it works if i checkout e3522c8)

image

alesimula avatar Oct 22 '24 08:10 alesimula

Re-opening so the previous .yaml file loading support can be looked into. Or perhaps another method to fix it.

catboxanon avatar Oct 22 '24 15:10 catboxanon

I can only suggest my patch from several comments above to set the prediction for 1.5 models. I don't plan to make a PR but anyone else is free to adapt it while not causing unforeseen bugs or conflicts with other related code. (The latter is out of scope for me.) As is, it probably shouldn't conflict with current auto-detect behavior as it defaults to "Leave Unchanged" and doesn't touch anything unless an option that isn't that one is applied.

rabidcopy avatar Oct 22 '24 16:10 rabidcopy

Should be fixed now. https://github.com/lllyasviel/stable-diffusion-webui-forge/pull/2224

catboxanon avatar Oct 30 '24 20:10 catboxanon

Should be fixed now. #2224

@catboxanon

I have tried the same model I have linked in my previous comment, nothing seems to have changed, have you tested it and is it working for you?

image

alesimula avatar Oct 31 '24 10:10 alesimula

Sorry, that's my bad, missed a pretty obvious typo. I tested with that model and config to be sure and it works for me now. (https://github.com/lllyasviel/stable-diffusion-webui-forge/pull/2228)

catboxanon avatar Oct 31 '24 11:10 catboxanon

Sorry, that's my bad, missed a pretty obvious typo. I tested with that model and config to be sure and it works for me now. (#2228)

Thanks, I can confirm it's working now

alesimula avatar Oct 31 '24 12:10 alesimula

@rabidcopy

Save the following txt file in the root of your Forge folder and run git apply prediction.txt. prediction.txt

I did. (but had to put it in webui folder instead of root for it to find the folders) I restarted Forge and Firefox. I went to Settings > Sampler parameters and set "Overwrite prediction type" to "v_prediction", applied the settings. But it still generates mosaic. What did I forget to do? 20241214225738-2650974005-toon_illustrious__susamix4Noobai_v4NoobaixlVPred075s

DiegoRRR avatar Dec 14 '24 21:12 DiegoRRR