Coder Social home page Coder Social logo

carllapierre / diffusion-canvas Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 2.0 3.13 MB

A simple react app with a canvas to draw an image. Real time image-to-image inference using Stable Diffusion XL Turbo and Modal

HTML 9.59% JavaScript 56.91% CSS 2.04% Python 31.46%
canvas modal react sdxl sdxl-turbo

diffusion-canvas's Introduction

Demo

Diffusion Canvas

SDXL Turbo, and TripoSR, Modal powered realtime image to 3d generation via canvas drawings.

Local Developement

File structure

  • frontend - React frontend
  • turbo.py - Serverless FastAPI endpoint for served by Modal for SDXL Turbo
  • tripo.py - Serverless FastAPI endpoint for served by Modal for TripoSR

Requirements

  1. Install modal and set up locally
pip install modal
modal setup
  1. Have npm installed

Launch

Serve modal endpoints and save endpoints outputs for frontend .env

modal serve turbo.py
modal serve tripo.py

Copy the endpoints from the serve output. cd into the frontend directory and make a copy of .env example:

cp example.env .env

Setup endpoints from serve output in .env file and run the app.

npm install
npm run start

Note: The first request will always take a few seconds due to cold starts.

diffusion-canvas's People

Contributors

carllapierre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

diffusion-canvas's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.