stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Feature Request]: Implement callbacks for UniPC sampler
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What would your feature do ?
Currently UniPC sampler implements custom callbacks that cannot be used by the rest of WebUI
(specifically, after_update
in models/diffusion/uni_pc/uni_pc.py:UniPC
class)
The rest of the models in WebUI use callback
property which triggers callback_state
as implemented in
modules/sd_samplers_kdiffusion.py:KDiffusionSampler
The function is to:
- Provide preview image (which means that each step should do denoising which UniPC currently does not do)
- Allow scripts/extensions a hook to do any additional per-step processing
Proposed workflow
N/A
Additional information
No response
So the compvis samplers should have a similar method to callback_state
like the k-diffusion samplers?
Ideally. Implementation does have to be same, but functional so both previews and per-step callbacks can be accomplished.
Callbacks should be simple, I just wasn't sure about denoiser with UniPC, so I created feature request instead of fumbling around for a day :)
Yes! Please! for DDIM too (screw PLMS, right?).
https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/8285a149d8c488ae6c7a566eb85fb5e825145464