cloudflare/templates/text-to-image-template

Generate images based on text prompts.

typescript
Loading...
cloudflare

Text To Image App

Deploy to Cloudflare

Text To Image Template Preview

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.

Getting Started

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

Setup Steps

  1. Install the project dependencies with a package manager of your choice:
    npm install
    
  2. Deploy the project!
    npx wrangler deploy