DenOfEquity / webUI_ExtraSchedulers

adds a few extra schedulers to the dropdown in recent A1111-derived webUIs for Stable Diffusion
5 stars 1 forks source link

similar samplers #1

Open Krek12 opened 1 month ago

Krek12 commented 1 month ago

Can you add samplers from this repository?

Judging by the name, this is the same sampler you added yesterday, plus a couple more with the same structure. https://github.com/rabidcopy/Euler-Smea-Dyn-Sampler https://github.com/rabidcopy/Euler-Smea-Dyn-Sampler/commit/d78ff5591bb54b0ab223cd9f6842220aeebef61c

DenOfEquity commented 1 month ago

Not the same, though much of the code for these variants is the same. Added implementations for Euler Dy CFG++ and Euler SMEA Dy CFG++. The rabidcopy implementation uses a method that I found didn't work with new Forge, so re-worked. I won't copy over the other variants, you can install those from the original repo.

Enferlain commented 1 month ago

Can you do the other 2 samplers from the euler-smea one? The negative dy one is one of the better ones from those imo. Also it would be nice to figure out the rest of the cfgpp stuff from comfy side. For the cond scale multiplier, like you said it could be put into the cfg_denoiser script or whatever its called, but I'm not sure about how it exactly needs to be, but that would let you still use any cfg since the scale would be adjusted on a per sampler basis as it is currently? As for the comfy versions, I'm not really sure how it works even though I tried to do the same thing in the forge scripts since a lot were already there

DenOfEquity commented 1 month ago

You can try the 'neg' branch. I'm not totally convinced of the value, so not in main branch (yet). I think the cond-scale-multiplier is a mistake, it's a hidden factor that could easily result in guidance < 1, which is bad. CFG++ does want lower guidance, but it's better to get a feel for it yourself IMO. Also, models that work better with lower CFG may not need as big an adjustment. And it seems like there is value in combining with APG, where APG controls the too-high guidance.

Enferlain commented 1 month ago

yeah not sure, it was from the ddim cfgpp implementation that was added to a1111 initially and that's how they did it there and it got moved over to forge as well (without the cfg denoiser modifications). figured it would be better to be able to use the scale normally with a multiplier instead of being restricted to sub 2 values but I wasn't able to test it out in the jerry rig I tried. didn't see the other branch, I'll try it later

Enferlain commented 1 month ago

yoinked these from @yoinked-h https://pastebin.com/nW2s2uKQ

also from comfy

def get_sigmas_vp(n, beta_d=19.9, beta_min=0.1, eps_s=1e-3, device='cpu'):
    """Constructs a continuous VP noise schedule."""
    t = torch.linspace(1, eps_s, n, device=device)
    sigmas = torch.sqrt(torch.exp(beta_d * t ** 2 / 2 + beta_min * t) - 1)
    return append_zero(sigmas)
def get_sigmas_laplace(n, sigma_min, sigma_max, mu=0., beta=0.5, device='cpu'):
    """Constructs the noise schedule proposed by Tiankai et al. (2024). """
    epsilon = 1e-5 # avoid log(0)
    x = torch.linspace(0, 1, n, device=device)
    clamp = lambda x: torch.clamp(x, min=sigma_min, max=sigma_max)
    lmb = mu - beta * torch.sign(0.5-x) * torch.log(1 - 2 * torch.abs(0.5-x) + epsilon)
    sigmas = clamp(torch.exp(lmb))
    return sigmas

just some stuff to look at

yoinked-h commented 1 month ago

cfgpp on a1111-like.... its over..... (cfgpp is not possible on a1111 without severe modifications)

DenOfEquity commented 1 month ago

Thanks for those. get_sigmas_vp has been included in the webui source for a long time, but never available as an option laplace seems worthwhile, perhaps a couple of the Karras variants too neg branch updated

Enferlain commented 1 month ago

cfgpp on a1111-like.... its over..... (cfgpp is not possible on a1111 without severe modifications)

Why not help make it work 4head

yoinked-h commented 1 month ago

cfgpp on a1111-like.... its over..... (cfgpp is not possible on a1111 without severe modifications)

Why not help make it work 4head

id help but i dont work with much inference-side code, more so sampler-side

Enferlain commented 1 month ago

reforge does this too

image

Enferlain commented 4 weeks ago

Some samplers from clybius, haven't tried them though

https://github.com/Clybius/ComfyUI-Extra-Samplers

DenOfEquity commented 4 weeks ago

Refined Exponential Solver looks good from initial tests. TTM doesn't work for me, fails when JIT compiling. Haven't explored others yet. Updated 'neg' branch with RES. Any opinions on usefulness of the last set?

Enferlain commented 4 weeks ago

image

Yeah I haven't checked, gonna try later res later but apparently these are good from what he said

Edit Tried res today, was pretty good

Krek12 commented 3 weeks ago

https://github.com/Kittensx/Simple_KES

new shedule

Krek12 commented 3 weeks ago

https://github.com/Kittensx/Simple_KES

new shedule

has been tested and can be used

DenOfEquity commented 3 weeks ago

Wonderfully over-engineered way to generate a list of decreasing numbers. I wonder if that's a college project that has requirements to do things in certain ways: config via YAML file with watcher, instead of using settings in webUI; install by patching webUI files instead of written as extension. I'm not going to include it, because it looks to be under continued development and has requirements that I will not add (and I don't want to rewrite it).

Krek12 commented 2 weeks ago

any idea how to work this 1111? https://github.com/dfl/comfyui-tcd-scheduler

DenOfEquity commented 1 week ago

There's a webUI extension for TCD. I haven't tried it, looks like DDPM, so I tried that with TCD loras and it worked very well. And I've read somewhere that the diffusers implementation of TCD is essentially DDPM sampler with DDIM scheduler.

Krek12 commented 1 week ago

There's a webUI extension for TCD. I haven't tried it, looks like DDPM, so I tried that with TCD loras and it worked very well. And I've read somewhere that the diffusers implementation of TCD is essentially DDPM sampler with DDIM scheduler.

interesing