fix random seed

This commit is contained in:
Qing 2022-09-22 21:55:12 +08:00
parent 26d938839c
commit 5be91edf9d

View File

@ -239,10 +239,7 @@ export default function Editor(props: EditorProps) {
} }
} }
let sdSeed = settings.sdSeedFixed ? settings.sdSeed : -1 const sdSeed = settings.sdSeedFixed ? settings.sdSeed : -1
if (useLastLineGroup === true) {
sdSeed = -1
}
try { try {
const res = await inpaint( const res = await inpaint(
@ -258,7 +255,9 @@ export default function Editor(props: EditorProps) {
throw new Error('empty response') throw new Error('empty response')
} }
const { blob, seed } = res const { blob, seed } = res
if (seed) { console.log(seed)
console.log(settings.sdSeedFixed)
if (seed && !settings.sdSeedFixed) {
setSeed(parseInt(seed, 10)) setSeed(parseInt(seed, 10))
} }
const newRender = new Image() const newRender = new Image()