From 1b06d634f0cd84da5c5998e40229d0519394a1aa Mon Sep 17 00:00:00 2001 From: leejet Date: Sun, 16 Nov 2025 23:33:30 +0800 Subject: [PATCH] fix: avoid using same type but diff instances for rng and sampler_rng --- stable-diffusion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable-diffusion.cpp b/stable-diffusion.cpp index d28aee179..72aa33171 100644 --- a/stable-diffusion.cpp +++ b/stable-diffusion.cpp @@ -209,7 +209,7 @@ class StableDiffusionGGML { offload_params_to_cpu = sd_ctx_params->offload_params_to_cpu; rng = get_rng(sd_ctx_params->rng_type); - if (sd_ctx_params->sampler_rng_type != RNG_TYPE_COUNT) { + if (sd_ctx_params->sampler_rng_type != RNG_TYPE_COUNT && sd_ctx_params->sampler_rng_type != sd_ctx_params->rng_type) { sampler_rng = get_rng(sd_ctx_params->sampler_rng_type); } else { sampler_rng = rng;