Giter Site home page Giter Site logo

ai-headshot-generator's Introduction

AI Professional Headshot generator

Features

  • Stripe Payments
  • Auto photo crop , resize on client
  • Photo criteria checker on client (ai)
  • Controlnet positioning
  • Image upscaler
  • Dreambooth SD trainer
  • Custom ai image generation api (python)

Demo

https://www.headshotrapid.com/

Stack

  • Typescript
  • Python (for ai part)
  • Automatic1111 API (self host)
  • Nextjs (app router)
  • MongoDB
  • NextAuth
  • Amazon S3 (to strore traning files,uploaded & generated images etc.)
  • Runpod (for ai computing)

Workflow

Preview

Main page

Dashboard

Transaction History Page

Results Page

Micro Transaction on results page

Photo Upload Page

Payment Page (Stripe)

Cronjobs

You have to change the _vercel.json file to vercel.json or need to create a cronjob for trigger /api/update endpoint for every 5 minutes.This is a must to do.This action will check current generation results and update them accordingly.

Runpod configurations

https://runpod.io/

Docker Image for AI generation: https://hub.docker.com/r/autorun12/runpod-worker-a1111-2/tags If you dont want to use my docker image you can build your own from my repo : https://github.com/emintatli/runpod-sdapi

You have to run this docker file on runpod serverless and get the id and modify the RUNPOD_SERVERLESS_ID on env file You can find more info about the deployment from here : https://docs.runpod.io/docs and also they have discord channel.

ENV file

NEXTAUTH_SECRET= random long key

GOOGLE_CLIENT_ID= https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid

GOOGLE_CLIENT_SECRET=https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid

MONGODB_URI= your db

NEXTAUTH_URL= https://example.com/api/auth

WEB_URL= your website url https://example.com

STRIPE_PLAN_PREMIUM= stripe product key (ex : price_1sf4t34etfiLt5WO)

STRIPE_UNLOCK_20_PLAN=stripe product key (ex : price_1sf4t34etfiLt5WO)

STRIPE_API_KEY= https://stripe.com/docs/keys

STRIPE_WEBHOOK_SECRET=https://stripe.com/docs/webhooks

AWS_ACCESS_KEY_ID=https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html

AWS_SECRET_ACCESS_KEY=https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html

AWS_REGION= your bucket region ex: us-east-1

AWS_ZIP_BUCKET_NAME= your bucket name

AWS_CKPT_BUCKET_NAME=your bucket name

RUNPOD_API_SECRET=https://docs.runpod.io/

CF_ACCOUNT_ID= no need

CF_API_TOKEN=no need

RUNPOD_SERVERLESS_ID= https://prnt.sc/1azVboQuLr2K

Changing Prompts

You can change the prompts if you dont like them or if you want to use this app for another purpose.You can also change controlnet poses. file located at : /lib/prompts.ts

ai-headshot-generator's People

Contributors

emintatli 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.