Turn your rough sketch into a refined image using AI,素描草图生成图片 https://github.com/replicate/scribble-diffusion

天问 ab6403bcad Update 'README.md' 1 year ago
README.md ab6403bcad Update 'README.md' 1 year ago

README.md

🖍️ Scribble Diffusion

Try it out at scribblediffusion.com

这是一个nodejs前端项目,无需登录,用户简单画画,上传图片即可生成真实的图片。

基于 ControlNet 模型,托管在 Replicate,可以提供接口调用,用户上传图片到 upload网站生成一张图片链接,再调用接口对这个链接+提取词进行图片生成返回前端。api服务器由Vercel托管,可以发现,无需登录,无后端管理系统。用户上传的图片也不经过api服务器。api服务器(本项目)只是做一个web界面可视化。

How it works

This app is powered by:

🚀 Replicate, a platform for running machine learning models in the cloud.

🖍️ ControlNet, an open-source machine learning model that generates images from text and scribbles.

Vercel, a platform for running web apps.

⚡️ Next.js server-side API routes, for talking to the Replicate API.

👀 Next.js React components, for the browser UI.

🍃 Tailwind CSS, for styles.

Development

  1. Install a recent version of Node.js
  2. Copy your Replicate API token and set it in your environment:

    echo "REPLICATE_API_TOKEN=<your-token-here>" > .env.local
    
  3. Install dependencies and run the server:

    npm install
    npm run dev
    
  4. Open localhost:3000 in your browser. That's it!