Generate images based on text prompts using Workers AI. In this example, going to the website will generate an image from the prompt "cyberpunk cat" using the @cf/stabilityai/stable-diffusion-xl-base-1.0
model. Be patient! Your image may take a few seconds to generate.
Outside of this repo, you can start a new project with this template using C3 (the create-cloudflare
CLI):
npm create cloudflare@latest -- --template=cloudflare/templates/text-to-image-template
A live public deployment of this template is available at https://text-to-image-template.templates.workers.dev
- Install the project dependencies with a package manager of your choice:
npm install
- Deploy the project!
npx wrangler deploy