const response = await ai.run(model || "@cf/stabilityai/stable-diffusion-xl-base-1.0", requestInput);
// Store the image name in R2, in background
ctx.waitUntil(updateRecentImages(imageName, (await generateThumbs(imageName, '400x', true)), input, env, response));
return new Response(response, {
headers: {
"content-type": "image/png",
},
});
const response = await ai.run(model || "@cf/stabilityai/stable-diffusion-xl-base-1.0", requestInput);
// Store the image name in R2, in background
ctx.waitUntil(updateRecentImages(imageName, (await generateThumbs(imageName, '400x', true)), input, env, response));
return new Response(response, {
headers: {
"content-type": "image/png",
},
});