Enhance: generate 32-bit seeds

SeedVR2VideoUpscaler (the new Sharpen / Rescue templates) rejects seeds
above 2^32 - 1 at validation, and the 52-bit seeds made every job fail with
"Value ... bigger than max of 4294967295: seed". 32 bits is still plenty of
variety for the Fibo templates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cameron CordesandClaude Opus 5.5 committed 2026-11-01 18:24:36 -05:00
1 parent ce101a3b2c
commit 096ddfe24e
2 files changed
+20 -5

No files matched your search

+2 -4
View File
@@ -16,7 +16,7 @@ use serde::{Deserialize, Serialize};
use super::comfy::{ApproveError, ComfyClient, ComfyError, HistoryEntry, Staged, SubmitError};
use super::config::{EnhanceConfig, Loaded, PromptMode};
use super::path_map::PathMap;
use super::template::Template;
use super::template::{Template, random_seed};
use crate::database::enhance_dao::{
EnhanceJobDao, EnhanceJobRow, JobUpdate, RecentPrompt, STATUS_APPROVED, STATUS_EXPIRED,
STATUS_FAILED, STATUS_QUEUED, STATUS_READY, STATUS_RUNNING, STATUS_UNAVAILABLE,
@@ -314,9 +314,7 @@ impl EnhanceService {
None => None,
};
let filled = template
.fill(&source, prompt, reference_path.as_deref(), &mut || {
rand::random::<u64>() >> 12
})
.fill(&source, prompt, reference_path.as_deref(), &mut random_seed)
.map_err(|e| EnhanceError::BadRequest(e.0))?;
if !self.probe_now().await {