handle numbers outside int32 range with wrapping

This commit is contained in:
Concedo 2025-10-12 12:46:45 +08:00
parent 9f9494cf3f
commit a0ed446e61

View file

@ -1929,7 +1929,7 @@ def sd_generate(genparams):
inputs.sample_steps = sample_steps
inputs.width = width
inputs.height = height
inputs.seed = seed
inputs.seed = ((seed + 2**31) % 2**32) - 2**31
inputs.sample_method = sample_method.encode("UTF-8")
inputs.scheduler = scheduler.encode("UTF-8")
inputs.clip_skip = clip_skip