diff --git a/public/scripts/extensions/stable-diffusion/index.js b/public/scripts/extensions/stable-diffusion/index.js index 0c16b4393..2f13329a2 100644 --- a/public/scripts/extensions/stable-diffusion/index.js +++ b/public/scripts/extensions/stable-diffusion/index.js @@ -3752,7 +3752,7 @@ async function onImageSwiped({ message, element, direction }) { const generationType = message?.extra?.generationType ?? generationMode.FREE; const dimensions = setTypeSpecificDimensions(generationType); const originalSeed = extension_settings.sd.seed; - extension_settings.sd.seed = Math.round(Math.random() * Number.MAX_SAFE_INTEGER); + extension_settings.sd.seed = Math.round(Math.random() * (Math.pow(2, 32) - 1)); let imagePath = ''; try {