Giter Site home page Giter Site logo

veedeo / anything-ai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rachelspark/anything-ai

0.0 0.0 0.0 7.12 MB

Click and fill anything in your image with a simple text prompt.

Home Page: https://anything-ai.com

License: MIT License

JavaScript 2.04% Python 30.00% TypeScript 66.66% CSS 1.29%

anything-ai's Introduction

Anything AI: a generative photo editing tool

Click and fill anything in your image with a simple text prompt. Segment Anything meets Stable Diffusion, in your browser.

Demo Image

anything-ai.com is a generative photo editing tool that accepts an image, creates object masks (holes) based on where you click, and then takes in a prompt to generate content and magically fill that hole with anything you want.

Background & Technical Details

Anything takes the most recent research in image inpainting, focusing on Inpaint Anything's Remove Anything and Fill Anything, and makes these powerful vision models easy to use on the web. Image segmentation is powered by Meta's Segment-Anything Model (SAM) and content generation is powered by Stable Diffusion Inpainting. The backend is served using Python (on a Modal endpoint) with a Next.js frontend. A mask prediction call should take less than 3.0s with a warm container. Stable Diffusion should take ~10s to cold start and ~3.0s per image generated.

Development

If you want to hack on Anything, install the dependencies and run the frontend development server locally using a recent version of Node.js. Navigate to frontend and run:

npm install
npm run dev

This automatically connects to the models deployed serverlessly on Modal.

To modify the backend, you will need to set up a Modal account/token and make sure you have Python 3.10+ and Poetry (Python dependency manager) installed. Run poetry install in the main directory to install all the backend dependencies, then make sure you're in the virtual environment whenever you run the server. Once you're happy with your changes, you can deploy your backend by running modal deploy main.py, which creates a public webhook such as https://rachelspark--replace-anything-fastapi-app.modal.run. You can then point the API_ENDPOINT in the web app to your new backend URL.

Acknowledgements

anything-ai's People

Contributors

rachelspark avatar

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.