获取task信息失败时不中断请求

master isekai-v1.0.0
落雨楓 2 years ago
parent 40c0f9876f
commit ab52deffb4

@ -1202,13 +1202,10 @@ export class RemoteImageGenerationRequest {
status: bind.status ?? 500,
message: errorData.error,
})
return
} catch(err) {
onError({
status: bind.status ?? 500,
message: `Error: HTTP ${bind.status} - Unable to reach NovelAI servers. Please wait for a moment and try again`,
})
// don't stop generate when http error
}
return
}
let res = await bind.json()
// console.log('task info', res)
@ -1241,7 +1238,7 @@ export class RemoteImageGenerationRequest {
message:
'Error: Timeout - Unable to reach NovelAI servers. Please wait for a moment and try again',
})
}, 3600 * 1000)
}, 30 * 1000)
const requestGetGenerationOutput: RequestInit = {
mode: 'cors',

@ -462,7 +462,7 @@ function ImageGenContent(): JSX.Element {
const [params, actualSetParams] = useState<any>(
getModelDefaultParams(ImageGenerationModels.stableDiffusion)
)
const [prompt, setPrompt] = useRememberedValue('imagegen-prompt', [''] as string[])
const [prompt, setPrompt] = useState([''] as string[])
const [promptLines, setPromptLines] = useState([1] as number[])
const [negPrompt, setNegPrompt] = useRememberedValue('imagegen-negativeprompt', '')

Loading…
Cancel
Save