Make generation actually work

This commit is contained in:
Cohee
2024-07-04 22:51:47 +03:00
parent e32b0cc223
commit 5da3921907
2 changed files with 4 additions and 5 deletions

View File

@ -2725,12 +2725,10 @@ async function generateStabilityImage(prompt, negativePrompt) {
});
if (!response.ok) {
const errorText = await response.text();
throw new Error(`HTTP ${response.status}: ${errorText}`);
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
}
const blob = await response.blob();
const base64Image = await getBase64Async(blob);
const base64Image = await response.text();
return {
format: IMAGE_FORMAT,