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

@ -836,6 +836,7 @@ stability.post('/generate', jsonParser, async (request, response) => {
'Accept': 'image/*',
},
body: formData,
timeout: 0,
});
if (!result.ok) {
@ -845,7 +846,7 @@ stability.post('/generate', jsonParser, async (request, response) => {
}
const buffer = await result.buffer();
return response.send(buffer);
return response.send(buffer.toString('base64'));
} catch (error) {
console.log(error);
return response.sendStatus(500);