fix: avoid using same type but diff instances for rng and sampler_rng (#982)

This commit is contained in:
leejet 2025-11-16 23:37:14 +08:00 committed by GitHub
parent f532972d60
commit b88cc32346
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -209,7 +209,7 @@ public:
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;