Skip to content

feat: add prediction argument #334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

daniandtheweb
Copy link
Contributor

@daniandtheweb daniandtheweb commented Aug 7, 2024

This PR adds an argument to manually select the prediction type. This allows the user to override the prediction type of the model on some experimental models that use non standard prediction types.

This argument aims to have a similar way to achieve what ComfyUI has with their ModelSamplingDiscrete node.

@daniandtheweb daniandtheweb force-pushed the prediction_argument branch 2 times, most recently from e995b3b to 1b00b0c Compare August 10, 2024 10:06
@daniandtheweb daniandtheweb force-pushed the prediction_argument branch 2 times, most recently from 24c784b to b9064ac Compare August 24, 2024 16:57
@stduhpf
Copy link
Contributor

stduhpf commented Jul 20, 2025

Maybe it would make sense to also add support for the recently added EDM_V_PRED that is used by CosXL?

@daniandtheweb
Copy link
Contributor Author

I haven't been up to date with the recent development so I'm trying to catch up for now. Has it already been added to the repo right? I may be able to add support for it later.

@stduhpf
Copy link
Contributor

stduhpf commented Jul 20, 2025

Yes it has been added with #683

Also there's a distinction between Flux Flow and Sd3 (Discrete) Flow:
https://github.com/leejet/stable-diffusion.cpp/blob/master/stable-diffusion.cpp#L584C1-L606C1

@daniandtheweb
Copy link
Contributor Author

I've added the new prediction methods. I'm unable to check them as I'm on a laptop right now but the logic is the same as with the others so it should work.

@daniandtheweb
Copy link
Contributor Author

@stduhpf Feel free to push this PR on your bleedingedge fork or let me know if you think I could improve the code in any way (I'm still not sure if the description is clear enough).
I'd really love at least a comment from the main dev but unfortunately he doesn't seem to be very active around here.

@stduhpf
Copy link
Contributor

stduhpf commented Jul 21, 2025

I think I will re-create the bleedingedge branch from current master with the new c API (#728), I will try to include this PR when I do so.

@daniandtheweb
Copy link
Contributor Author

Will you include the image preview PR? I'm building a webui (more like a command generator + gallery) and that would be very helpful. I've been thinking of adding a toggle to switch between a mode that works on the mainline branch and another that works on your fork (I still need to add all the new features from mainline but at least that's the plan).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants