GithubHelp home page GithubHelp logo

baptadn / photoshot Goto Github PK

View Code? Open in Web Editor NEW
3.4K 23.0 417.0 35.91 MB

An open-source AI avatar generator web app - https://photoshot.app

Home Page: https://photoshot.app

License: MIT License

JavaScript 0.20% TypeScript 99.80%
ai dreambooth nextjs reactjs stable-diffusion typescript

photoshot's People

Contributors

adipasquale avatar baptadn avatar durdn avatar green-mint avatar ronand97 avatar

Stargazers

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

Watchers

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

photoshot's Issues

Issue with verification_tokens

Hello, thanks for this great repo !!.

I've been trying to make it work and after dealing with some issues, I've been able to do a full test on dev.

Even when my .env is almost identical to .env.local I've been having issues with the not-local version.

Every time I got the email, I click over the Sign in button but instead of going to the Dashboard, like the local version, it sends me back to the Sign in to Photoshot screen.

I've truncated the table verification_tokens as a test and I can see that in the live version, a new user is generated, but no new rows on the table verification_tokens and I don't understand the reason why it's failing.

Failed yarn install some modules on M1 Arm architecture

Hi there, firstly thanks for your work but I'm getting installation some dependency’s on m1 arm

info @next/[email protected]: The platform "darwin" is incompatible with this module. info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/[email protected]: The CPU architecture "arm64" is incompatible with this module. info @next/[email protected]: The platform "darwin" is incompatible with this module. info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/[email protected]: The platform "darwin" is incompatible with this module. info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/[email protected]: The platform "darwin" is incompatible with this module. info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/[email protected]: The CPU architecture "arm64" is incompatible with this module. info @next/[email protected]: The platform "darwin" is incompatible with this module. info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/[email protected]: The CPU architecture "arm64" is incompatible with this module. info @next/[email protected]: The platform "darwin" is incompatible with this module. info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/[email protected]: The CPU architecture "arm64" is incompatible with this module. info @next/[email protected]: The platform "darwin" is incompatible with this module. info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/[email protected]: The CPU architecture "arm64" is incompatible with this module. info @next/[email protected]: The platform "darwin" is incompatible with this module. info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/[email protected]: The platform "darwin" is incompatible with this module. info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/[email protected]: The platform "darwin" is incompatible with this module. info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/[email protected]: The CPU architecture "arm64" is incompatible with this module. info @next/[email protected]: The platform "darwin" is incompatible with this module. info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. info @next/[email protected]: The CPU architecture "arm64" is incompatible with this module. info @next/[email protected]: The CPU architecture "arm64" is incompatible with this module. info "@next/[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. error [email protected]: The engine "node" is incompatible with this module. Expected version "^12.19.0 || ^14.15.0 || ^16.13.0 || ^18.12.0". Got "19.2.0" error Found incompatible module.

privacy doc

add a page that describes the privacy concerns

  • where is the data stored
  • how long is it going to be stored for
  • who can it be transmitted to

the privacy policy of Replicate is slightly concerning :|

We may disclose your information also:
to our subsidiaries and affiliates;
to contractors, service providers, and other third parties we use to support our business;

.env variables errors

Hi developer, what do I need to generate those variables to run the project successfully? Is it generated, or anyway to get it? Any sample?

REPLICATE_HD_VERSION_MODEL_ID
NEXT_PUBLIC_REPLICATE_INSTANCE_TOKEN
OPENAI_API_SEED_PROMPT

Select Style of Shot (Auto Prompts)

Hi there,

I wish I could contribute to this, but unfortunately my skills are messy and cannot add to any contribution I barely do it myself.

Screen Shot 1444-05-25 at 5 04 40 PM

I am not sure if the Auto Generation of Shots will conflict with this, but maybe this one opens more creativity and options to the End-User, while guiding them through an awesome user-experience.

Getting 'Greeting never received' error

Hi, trying to test in github codespaces.
I followed all the steps in the readme, but I never receive the email magic link when I try to signup/login.
I get:

https://next-auth.js.org/errors#signin_email_error Greeting never received {
  error: {
    message: 'Greeting never received',
    stack: 'Error: Greeting never received\n' +
      '    at SMTPConnection._formatError (/workspaces/photoshot-0/node_modules/nodemailer/lib/smtp-connection/index.js:790:19)\n' +
      '    at SMTPConnection._onError (/workspaces/photoshot-0/node_modules/nodemailer/lib/smtp-connection/index.js:776:20)\n' +
      '    at Timeout.<anonymous> (/workspaces/photoshot-0/node_modules/nodemailer/lib/smtp-connection/index.js:710:22)\n' +
      '    at listOnTimeout (node:internal/timers:559:17)\n' +
      '    at processTimers (node:internal/timers:502:7)',
    name: 'Error'
  },
  providerId: 'email',
  message: 'Greeting never received'
}

Invalid Image URLs on Studio Page

Hello,

I've encountered an issue while navigating through the studio page. The photo shots displayed on the page are linked to invalid URLs, thus the images are not loading as expected.

The images are hosted on Replicate CDN and it seems like these images were cleaned up after some time, leading to the invalid URLs. This might be the reason why the images are no longer available on the studio page.

Is there any mechanism we can implement to persist these images or prevent them from being cleaned up?

Thanks!

Where to get Amazon s3 info?

I created an Amazon bucket but can't find where to get:

S3_UPLOAD_KEY=
S3_UPLOAD_SECRET=
S3_UPLOAD_BUCKET=
S3_UPLOAD_REGION=

where do I get these values?

Auto Shots generator.

I honestly think, most end-users would not be interested in typing Prompts, which they have no idea how it works and what it does.

The best way to guide the END-USER to have know how prompting works, and what it does is by giving an example and kind of a (gift) by AUTO GENERATING 10 - 20 well written prompts using their STUDIO NAME.

Then, the end-user can use the purchased shots to its best use.

It would be amazing if we can do the following:

  • Control the number of AUTO prompts. ( from .env.local )
  • Control the auto prompts ARRAY with ${fill_studio_name} here.

Thanks alot.

Removing Selected photos before upload.

Removing Selected photos before upload.

If it is possible to be added in the check-list to have ability to remove the images before pressing (Upload) button.

Naming the (Studio) should be a unique

The A.I. model that is generated by the studio, is sometimes gets confused I think with other users model who have similar (Studio Names) which is very very strange ?

Is that possible ?

and if it is possible would it be better to have the studio name have a global Unique ID to avoid any crossing with other studios.

Can you provide a more detailed text to run it?

If I clone the repo and run it according the readme, I get a "TypeError [ERR_INVALID_URL]: Invalid URL". I see env.example is empty so maybe a good start is to fill it with some dumb data or explain it. Also it speaks about "DATABASE_URL" and it would be great the type of bbdd needed and if it has a script to install it when you run the app or you need make it yourself etc etc

Thanks

Endless loading when trying to upload images to studio

When trying to upload images to a new studio, I am getting endless loading and images are not being uploaded to S3.
This is the error shown in the console.
Uncaught (in promise) Error: Pica: cannot use getimagedata on canvas, make sure fingerprinting protection isn't enabled.

Bucket policy and CORS policy both seem fine in AWS.

Localhost to Online Host is must.

I am not a Back-end developer, and I never touched a docker before.

It seems that there is a major step regarding Stripe and payment to be able to connect to Replicate.

Stripe will not accept localhost:3000 as a safe domain to connect to their API,
So its a must DEPLOY the project (easy way to Vercel)

but Vercel will not be able to connect to PostgreSQL localhost:5432 ?
So you must figure out where to host that (easy way using NEON) !

I tried Amazon RDS but I couldn't get it running, so I settled with NEON.

Please if anyone got all of that running, it would be amazing to see the stack or the decisions that they have made regarding the choices.

Current Setup (No need to touch the SRC files)

  1. Email Provider: AWS SES (free)
  2. PAYMENT: Stripe (free)
  3. S3: AWS S3 (free)
  4. Replicate: Replicate (free)
  5. Database (PostgreSQL) : NEON.TECH (free)
  6. DEPLOY: Vercel (free)

Note: (free) is to setup and run the App, and not necessary free for production.

Can use alternative models?

Hello, is it possible to use alternative stable diffusion or other pre-trained models hosted on Replicate?
If so, how?
Thanks

Database Issue

I keep getting getting possword incorrect errors when it is correct trying to connect postgres database, what service did you use to create the database? I'm trying with Neon.tech?

zip not created

I am trying to run this locally and the zip file is not being created on S3. Do you know how to debug this further?

error about https-proxy-agent problem occurred when deployment in vercel and local machine

Same error occurred in my local machine(Mac M1) and problem solved after copy the module manually.


Error Log

src/pages/_app.tsx

22:32:30.839 | An error occured in @next/font.
22:32:30.839 |  
22:32:30.839 | You might be using incompatible version of @next/font (13.5.4) and next (13.0.6). Try updating both @next/font and next, if the error still persists it may be a bug.
22:32:30.839 |  
22:32:30.839 | Error: Cannot find module 'next/dist/compiled/https-proxy-agent'
22:32:30.839 | Require stack:
22:32:30.839 | - /vercel/path0/node_modules/@next/font/dist/google/get-proxy-agent.js
22:32:30.839 | - /vercel/path0/node_modules/@next/font/dist/google/fetch-css-from-google-fonts.js
22:32:30.839 | - /vercel/path0/node_modules/@next/font/dist/google/loader.js
22:32:30.839 | - /vercel/path0/node_modules/@next/font/google/loader.js
22:32:30.840 | - /vercel/path0/node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js
22:32:30.840 | - /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js
22:32:30.840 | - /vercel/path0/node_modules/next/dist/compiled/webpack/webpack.js
22:32:30.840 | - /vercel/path0/node_modules/next/dist/server/config-utils.js
22:32:30.840 | - /vercel/path0/node_modules/next/dist/server/config.js
22:32:30.840 | - /vercel/path0/node_modules/next/dist/build/index.js
22:32:30.840 | - /vercel/path0/node_modules/next/dist/cli/next-build.js
22:32:30.840 | - /vercel/path0/node_modules/next/dist/lib/commands.js
22:32:30.840 | - /vercel/path0/node_modules/next/dist/bin/next
22:32:30.841 | at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)

Training keeps failing + unexpected model and someone else's photos on my replicate dashboard.

Hi,
I am able to upload images and pay and start the training, but it always fails with this error:
We are sorry but the creation of the model failed. Please contact us by email so we can fix it/refund you.

Looking at the replicate.com dashboard>Recent predictions, for each attempt, I see a model with Failed status.
image

Clicking on the ID, shows an Input and Output page, with a link to a .zip file that is broken under Input, and "404 Client Error" in the Output. It links to an unexisting .zip file on my S3 bucket.

Question 1: is this a zip file that failed to ever be created or that was deleted by Photoshot when the training failed?

Would this be a permissions issue and if so, what would need to change? Photoshot seems to be able to upload and read the images, so why not the zip?

Clicking on the Version link (replicate/dreambooth:...) shows a page with what seems to be someone else's training. The instance_prompt says "a photo of bfirsh" and a link to data.zip downloads a folder with ben firshman's photos (replicate's founder). Another link to output.zip gets what looks like a 2GB trained model.

Question 2: are these a normal part of the process?

Thanks

prisma:migrate:dev looks for .env not .env.local

When running prisma:migrate:dev, I get an error:

error: Environment variable not found: DATABASE_URL.
  -->  schema.prisma:3

The workaround is to add an .env file (in addition to .env.local) with a DATABASE_URL= ... line.
Simply renaming .env.local to .env seems to create other problems.

Generated images are completely unrelated to training data

After a few attempts to train on 10 or 20 images I get completely different people after inserting prompts. What am I missing?
I'm using and the images seemed to be uploaded properly.

REPLICATE_MAX_TRAIN_STEPS=3000
REPLICATE_NEGATIVE_PROMPT="cropped face, cover face, cover visage, mutated hands"
REPLICATE_HD_VERSION_MODEL_ID=42fed1c4974146d4d2414e2be2c5277c7fcf05fcc3a73abf41610695738c1d7b
NEXT_PUBLIC_REPLICATE_INSTANCE_TOKEN=cjw

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.