Skip to content

feat: new images generated by SD3 #1

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

Merged
merged 8 commits into from
Feb 6, 2025

Conversation

matthewmayer
Copy link
Contributor

@matthewmayer matthewmayer commented Feb 3, 2025

I created 100 female and 100 male images using Stable Diffusion 3 via Replicate, to be used in the upcoming faker.image.personPortrait().

Each image is generated at 512x512, and I write a metadata JSON file with the prompt and settings used. The aim is to document the process, but without necessarily making it easy to regenerate all the images repeatedly, since that is is expensive.

Then I use ImageMagick to create the smaller images at 256, 128, 64, 32 and 16 pixels size.

To get a diverse set of pictures the basic prompt is:
profile picture of a {age}-year-old {man, woman} from {country}

I already did a quick check of all images and removed+replaced around 10% of images which looked unprofessional (more "Tinder" than "LinkedIn") or looked too artificial. If there are any other images you think should be removed, please just write a list e.g. male/72 or female/7 and I can replace those with alternatives.

@matthewmayer matthewmayer marked this pull request as ready for review February 3, 2025 11:01
Copy link
Member

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some strange reason, I feel like I have seen multiple duplicates while reviewing the 128px images, but I couldn't actually find any duplicates.


`profile picture of a ${age}-year-old ${type} from ${country}`

You can use the data in the male/metadata and female/metadata to regenerate images. You can run a model locally, or use a service like Replicate using https://github.com/replicate/replicate-javascript. You will need a Replicate API key, and expect it will cost approximately [$0.035 per image](https://replicate.com/pricing) to generate.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can use the data in the male/metadata and female/metadata to regenerate images. You can run a model locally, or use a service like Replicate using https://github.com/replicate/replicate-javascript. You will need a Replicate API key, and expect it will cost approximately [$0.035 per image](https://replicate.com/pricing) to generate.
You can use the data in the male/metadata and female/metadata to regenerate images.
You can run a model locally, or use a service like Replicate using https://github.com/replicate/replicate-javascript.
You will need a Replicate API key, and expect it will cost approximately [$0.035 per image](https://replicate.com/pricing) to generate.

@ST-DDT
Copy link
Member

ST-DDT commented Feb 4, 2025

IMO this is almost good to go.

@xDivisionByZerox What do you think about the images?

@ST-DDT
Copy link
Member

ST-DDT commented Feb 5, 2025

We need a license file.

@matthewmayer
Copy link
Contributor Author

Since AI outputs are generally expected to be PD should we use https://choosealicense.com/licenses/cc0-1.0/ ?

@xDivisionByZerox
Copy link
Member

@xDivisionByZerox What do you think about the images?

The images itself look good enough for me. Thank you for starting this @matthewmayer 🙏

For some strange reason, I feel like I have seen multiple duplicates while reviewing the 128px images, but I couldn't actually find any duplicates.

I definitly felt the same way. Guess there is only so much diversity AI can generate.

@xDivisionByZerox
Copy link
Member

Since AI outputs are generally expected to be PD should we use choosealicense.com/licenses/cc0-1.0 ?

Team decision:

CC-0 is fine for us. 👍

@xDivisionByZerox xDivisionByZerox changed the title add new images generated by SD3 feat: new images generated by SD3 Feb 6, 2025
@xDivisionByZerox xDivisionByZerox merged commit 5b5120a into faker-js:main Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants