Open bmhRi3kXAFSw opened 3 months ago
additionally, manually using the built-in settings to override scheduler, etc. does not seem to work either: setting "override model prediction type" to vpred and checking "rescale betas with zero terminal snr" still produces results characteristic of running a vpred model incorrectly
i'll check this - its been a long time since i've touched any v-pred model.
previously i was able to get these models working by hacking in yaml config file loading for diffusers
diffusers stopped using yaml config files, now everything is in json format (still in /configs
folder), so if you managed to hack yaml before, you might be able to do the same to json files.
btw, for testing, can you post a link to one such model? i can find it as well, but this makes sure we're using the same thing.
most of the fluffyrock models and their descendents use vpred https://civitai.com/models/92450 thank you for your help!!!!
i've loaded model from your link, set settings -> sampler -> prediction type: v-prediction and it just works. model is veeery sensitive - i somewhat decent outputs at 768x1024 resolution, cfg scale 7.0 and rescale guidance 1.0 at lower resolution or cfg scale or rescale, it's just blobs. alternatively instead of high rescale guidance, you can set attention guidance which triggers pag pipeline.
I do not think this model is that sensitive. maybe it is now, but it was not always that way. If I select generations that I did before months ago and copy their parameters identically, they go from correct output to blobs in recent versions. I think there's some kind of a regression, maybe from (other) config parameters that are not loading correctly. For example the params
block in config has the following:
params:
parameterization: "v"
linear_start: 0.00085
linear_end: 0.0120
num_timesteps_cond: 1
log_every_t: 200
timesteps: 1000
first_stage_key: "jpg"
cond_stage_key: "txt"
image_size: 64
channels: 4
cond_stage_trainable: false # Note: different from the one we trained before
conditioning_key: crossattn
monitor: val/loss_simple_ema
scale_factor: 0.18215
use_ema: False
I can override the vpred setting, but what about the others? Are these only used in training and not inference? There are other config settings in the yaml files as well. My thought is that some parameter is not loading and causing the instability.
Without the config patch, it looks like leaving the v-pred override to default and turning off "full quality" fixes the model, even at low resolutions. I will experiment with config settings and update this post with what works, but I think it's full quality setting.
if turning full quality off produces good results, that's quite possibly related to scale-factor param in config as that is vae config item.
Are configs being loaded on the master branch with diffusers on? If not, is there an scale factor override somewhere for me to test? (or is full quality unimportant enough that I can just leave it off and not use it?)
It also appears that after a restart, I need to set sampler to Euler A to get things to work right. After doing so, I can set it to Default (??)
Edit: Full quality does work at low resolutions?! I've played around with a lot of settings and I can't seem to reproduce the blobbiness - it happens on startup, and then after changing a few options around and getting a "successful" generation, I can't seem to get it to happen again.
I am having an issue with img2img at high resolutions producing poor results, but I think that's model-related
this thread went quiet few months ago - is this still a valid issue?
Issue Description
After an update a few months ago I have no longer been able to use v-prediction models successfully. I am using diffusers, IPEX and linux.
The current recommendation for use of vpred sd 1.5 models on diffusers backend is to convert them to the diffusers model format. however:
additionally, manually using the built-in settings to override scheduler, etc. does not seem to work either: setting "override model prediction type" to vpred and checking "rescale betas with zero terminal snr" still produces results characteristic of running a vpred model incorrectly
previously i was able to get these models working by hacking in yaml config file loading for diffusers (see this patch file I wrote a while ago, in another issue #2914 sdmodelsfix.patch.txt).
however, this no longer appears to be working; still get bad vpred errors.
I know this is a weird/unusual configuration but I am at a loss for how to continue to get this working. I do not know that much about the internals of SD or vladmatic, or how model loading really works, and would appreciate some help (especially just enabling config loading for diffusers backend/flat files, like it is for the normal backend)
there may be some other issues that are caused by a compounding of other problems elsewhere but I did have this configuration working a few months ago and at some point it broke. I have also tested normal config models and they work fine
I also tested this on a fresh clean install of course. it happens with both dev and master branch
Version Platform Description
Arch Linux Python 3.11.9 ARC A770 IPEX Backend 2.1.20 Kernel Linux-zen 6.9.7
Relevant log output
Backend
Diffusers
Branch
Master
Model
SD 1.5
Acknowledgements