mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add SD seed control
This commit is contained in:
@ -608,8 +608,10 @@ together.post('/generate', jsonParser, async (request, response) => {
|
||||
model: request.body.model,
|
||||
steps: request.body.steps,
|
||||
n: 1,
|
||||
seed: Math.floor(Math.random() * 10_000_000), // Limited to 10000 on playground, works fine with more.
|
||||
sessionKey: getHexString(40), // Don't know if that's supposed to be random or not. It works either way.
|
||||
// Limited to 10000 on playground, works fine with more.
|
||||
seed: request.body.seed >= 0 ? request.body.seed : Math.floor(Math.random() * 10_000_000),
|
||||
// Don't know if that's supposed to be random or not. It works either way.
|
||||
sessionKey: getHexString(40),
|
||||
}),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@ -736,7 +738,7 @@ pollinations.post('/generate', jsonParser, async (request, response) => {
|
||||
const params = new URLSearchParams({
|
||||
model: String(request.body.model),
|
||||
negative_prompt: String(request.body.negative_prompt),
|
||||
seed: String(Math.floor(Math.random() * 10_000_000)),
|
||||
seed: String(request.body.seed >= 0 ? request.body.seed : Math.floor(Math.random() * 10_000_000)),
|
||||
enhance: String(request.body.enhance ?? false),
|
||||
refine: String(request.body.refine ?? false),
|
||||
width: String(request.body.width ?? 1024),
|
||||
|
Reference in New Issue
Block a user