Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(image): add AI-generated avatars #3126

Merged
merged 30 commits into from
Feb 9, 2025
Merged

feat(image): add AI-generated avatars #3126

merged 30 commits into from
Feb 9, 2025

Conversation

matthewmayer
Copy link
Contributor

@matthewmayer matthewmayer commented Sep 21, 2024

Draft PR to explore the best API for this. CDN URL will need to be replaced with final one.

Uses 100 male and 100 female images generated as part of discussion here #465 (comment)

fix #465
fix #2173

Copy link

netlify bot commented Sep 21, 2024

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 41b893c
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/67a5cf450d4c7a0008f35b4b
😎 Deploy Preview https://deploy-preview-3126.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Sep 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.97%. Comparing base (f9dd560) to head (41b893c).
Report is 1 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3126   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files        2811     2811           
  Lines      216952   216965   +13     
  Branches      941      942    +1     
=======================================
+ Hits       216899   216914   +15     
+ Misses         53       51    -2     
Files with missing lines Coverage Δ
src/modules/image/index.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@ST-DDT
Copy link
Member

ST-DDT commented Sep 21, 2024

As you wrote in the comment. We would like to host these images inside the faker org so we dont loose access to them again. The idea is to use a separate asset repository (to avoid bloating the main repo) and to put the images there but we didnt have enough time yet to plan the exact structure.
We are open to suggestions.

@ST-DDT ST-DDT added c: feature Request for new feature p: 1-normal Nothing urgent m: image Something is referring to the image module labels Sep 21, 2024
@ST-DDT ST-DDT added this to the v9.x milestone Sep 21, 2024
@Shinigami92
Copy link
Member

When we later store the images in the faker org, we should also place a file for each image with meta data, including: "used model, prompt, negative prompt, seed, parameters, ..."

@ST-DDT
Copy link
Member

ST-DDT commented Sep 21, 2024

Lets put the technical discussion of what to put where and how in a separate issue.

@matthewmayer
Copy link
Contributor Author

As you wrote in the comment. We would like to host these images inside the faker org so we dont loose access to them again. The idea is to use a separate asset repository (to avoid bloating the main repo) and to put the images there but we didnt have enough time yet to plan the exact structure.

We are open to suggestions.

Yep. I'd suggest say faker-media as repo name (in case we want video or audio later), then (versioned?) subfolders for different methods (we might want e.g. dummy company logos in the future). The most important thing is that urls are stable as once the urls are generated they might be stored in a database so we want them accessible "forever".

@Shinigami92 Shinigami92 changed the title feat(image): Add AI-generated avatars feat(image): add AI-generated avatars Oct 10, 2024
@matthewmayer
Copy link
Contributor Author

updated to new method name and the newly generated assets in faker-js/assets-person-portrait#1

matthewmayer and others added 4 commits February 5, 2025 16:51
ST-DDT
ST-DDT previously approved these changes Feb 5, 2025
@ST-DDT ST-DDT requested review from a team February 5, 2025 10:20
Co-authored-by: ST-DDT <[email protected]>
@matthewmayer
Copy link
Contributor Author

i will leave this PR in draft until faker-js/assets-person-portrait#1 is merged, then update the URLs to the final ones.

1 similar comment
@matthewmayer
Copy link
Contributor Author

i will leave this PR in draft until faker-js/assets-person-portrait#1 is merged, then update the URLs to the final ones.

ST-DDT
ST-DDT previously approved these changes Feb 5, 2025
@ST-DDT
Copy link
Member

ST-DDT commented Feb 6, 2025

FYI: I plan to release the next version after this is merged, or are there other PRs that should be merged as well?

@matthewmayer matthewmayer marked this pull request as ready for review February 7, 2025 05:46
@ST-DDT ST-DDT requested a review from a team February 7, 2025 09:16
@ST-DDT ST-DDT merged commit 9e13953 into next Feb 9, 2025
23 checks passed
@ST-DDT ST-DDT deleted the avatar-ai branch February 9, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: feature Request for new feature m: image Something is referring to the image module p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make internet.avatar() sex or gender aware Use fake (generated) images for faker opposed to real people
4 participants