export default {
async fetch(request, env) {
const inputs = {
prompt: "create an image that is 512x512. the background should be a solid, plain, yellow color. text over the background should say 'Learn How to Pronounce MySQL' in English. Text should be red and use an Arial font. ",
negative_prompt: "There shOuld not be any other effects or images.",
height: 512,
width: 1024
};
const response = await env.AI.run(
"@cf/bytedance/stable-diffusion-xl-lightning",
inputs
);
return new Response(response, {
headers: {
"content-type": "image/png",
},
});
},
};
export default {
async fetch(request, env) {
const inputs = {
prompt: "create an image that is 512x512. the background should be a solid, plain, yellow color. text over the background should say 'Learn How to Pronounce MySQL' in English. Text should be red and use an Arial font. ",
negative_prompt: "There shOuld not be any other effects or images.",
height: 512,
width: 1024
};
const response = await env.AI.run(
"@cf/bytedance/stable-diffusion-xl-lightning",
inputs
);
return new Response(response, {
headers: {
"content-type": "image/png",
},
});
},
};