refactor: simplify diffusion model runner params#1569
Merged
Conversation
dbrain
added a commit
to dbrain/hbd-longcat-avatar.cpp
that referenced
this pull request
May 29, 2026
…ds + wrapper return-type The new DiffusionModelRunner base (sd.cpp leejet#1569) leaves GGMLRunner's alloc/free/get_params_buffer_size/set_weight_adapter non-virtual, so the LongCatAvatarModel wrapper (which delegates to a nested runner holding the real params) couldn't override them. Add virtual passthroughs on DiffusionModelRunner (default -> GGMLRunner::, wrapper overrides -> nested runner). alloc_params_buffer returns bool to match. get_adm_in_channels: dropped override (not a base method, never base-ptr-dispatched). Avatar render verified pixel-identical (0/255).
RapidMark
pushed a commit
to CloudhandsAI/stable-diffusion.cpp
that referenced
this pull request
Jun 1, 2026
…onParams Upstream leejet#1569 ("simplify diffusion model runner params") split the monolithic DiffusionParams into per-model Extra structs. Re-seated the PuLID-Flux feature onto the new architecture: - diffusion_model.hpp: pulid_id + pulid_id_weight added to FluxDiffusionExtra. - flux.hpp: compute(DiffusionParams) now reads extra->pulid_id / extra->pulid_id_weight and threads them through to build_graph (the PuLID cross-attention code itself merged cleanly). - stable-diffusion.cpp: the FluxDiffusionExtra construction carries the PuLID id embedding + weight; obsolete monolithic param assignments dropped. Verified end-to-end on three GPUs/backends (compiles + the 3-way off / zero-weight / on PuLID falsification all pass; zero-weight is byte-identical to baseline, weight 1.0 alters output and preserves identity): - AMD R9700 (RDNA4, ROCm) - AMD RX 6700 XT (RDNA2, Vulkan) - NVIDIA RTX 3060 (Vulkan)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DiffusionModelRunner, which inheritsGGMLRunner, owns the tensor prefix, and lets concrete runners exposecompute(DiffusionParams).DiffusionParamsto common inputs plus typed model-specific extras.Related Issue / Discussion
N/A
Additional Information
N/A
Checklist