Skip to content

[Bug] --flow-shift ignored on flux_flow models when leaving --prediction argument to default #911

@stduhpf

Description

@stduhpf

Git commit

48e0a28

Command-line arguments used

.\bin\Release\sd.exe --diffusion-model ....\ComfyUI\models\diffusion_models\flux1-dev-iq4_nl.gguf --t5xxl ....\ComfyUI\models\clip\t5xxl_fp16.safetensors --clip_l --t5xxl ....\ComfyUI\models\clip\clip_l.safetensors -p "a lovely cat holding a sign says 'Flux cpp'" --cfg-scale 4.0 --sampling-method euler -v --flow_shift 6s 'Flux cpp'" --cfg-scale 1.0 --sampling-method euler -v --flow-shift 6

Steps to reproduce

.\bin\Release\sd.exe --diffusion-model ..\..\ComfyUI\models\diffusion_models\flux1-dev-iq4_nl.gguf --t5xxl ..\..\ComfyUI\models\clip\t5xxl_fp16.safetensors --clip_l --t5xxl ..\..\ComfyUI\models\clip\clip_l.safetensors -p "a lovely cat holding a sign says 'Flux cpp'" --cfg-scale 1.0 --sampling-method euler -v --flow_shift [1|6] [--prediction flux_flow]

--flow_shift 1 --flow_shift 6 default
default prediction Image Image Image
--prediction flux_flow Image Image Image

What you expected to happen

The same result should happen with or without --prediction flux_flow, regardless of the value of --flow-shift.

What actually happened

--flow-shift is ignored by default. That's because https://github.com/leejet/stable-diffusion.cpp/blob/master/stable-diffusion.cpp#L763-L771 doesn't use the value of sd_ctx_params->flow_shift, but https://github.com/leejet/stable-diffusion.cpp/blob/master/stable-diffusion.cpp#L722-L727 does.
(Also I beleive the default shift when overriding prediction seems wrong, it should be 1, not 3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions