Code Monkey home page Code Monkey logo

stablecog's Introduction

Stablecog - Simple, free & open source AI image generator

This is an app for creating AI generated images using Stable Diffusion cogs. It's made with SvelteKit, uses Supabase for recording of metadata and for managing the default cog cluster. For more info on "cogs", you can check out: Replicate. The app is hosted at stablecog.com.

Stablecog Home (Default + Dark Mode)
Home (Default + Dark Mode)
Stablecog Home (Advanced + Light Mode)
Home (Advanced + Light Mode)
Stablecog Gallery
Gallery
Stablecog Live
Live

The app knows how to communicate with this cog to generate images: Stable Diffusion Cog. It is available on Docker Hub at: yekta/sc. However, as long as your server has the endpoints and the parameters the app uses, it'll work.

For example, the following cogs would also work with the app:

For the app to work, the cog needs to have the following input properties on the /predictions endpoint:

  • prompt, width, height, guidance_scale, num_inference_steps, seed.

Optionals:

  • negative_prompt

Running the app in development mode

First, install the dependencies with:

npm install

Then, you can run the app in development mode with:

npm run dev

Running the app in production mode

First, create a production version of the app:

npm run build

Then, you can start the app in production mode with:

node ./build

If you want to deploy the app, you should edit or remove the ci.yml file in .github/workflows to suit your setup. There is also a kubernetes folder with the config files to deploy on Kubernetes but those are again specific to my setup, so you can edit, remove or ignore those.


Optionals

There is a .env.example file in the root directory. You can copy this file and rename it to .env. This will allow you to set the following optional environment variables:

  • PUBLIC_DEFAULT_SERVER_URL: This is the default server url (your cog's url) that the app uses to generate images if provided. You can still change to another server in the app by clicking the settings icon in the top right corner of the home page.

In case you want to record generation metadata, you can use a Supabase instance. You can set the following environment variables to enable it:

  • PUBLIC_SUPABASE_URL: The url of your Supabase instance.
  • PUBLIC_SUPABASE_ANON_KEY: The anon key of your Supabase instance.
  • PUBLIC_SUPABASE_ADMIN_KEY. The admin key of your Supabase instance.

Special Thanks

Mahdi has been contributing by providing two NVIDIA A40s which are being used for the default cog cluster. Thanks to his contribution, thousands of people generated 150K+ images (so far) for free, without seeing any ads or dealing with sign ups.

Following people have contributed by translating the app to their language. Thanks to their contributions, billions of people can use the app in their native language:

stablecog's People

Contributors

bbedward avatar dependabot[bot] avatar yekta 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.