Create photorealistic fake pictures of yourself by fine-tuning FLUX.1

How to create your own fine-tuned version of the latest Flux.1 Model from Black Forest Labs with just 12 photos of yourself, to generated AI pictures of yourself.

Create photorealistic fake pictures of yourself by fine-tuning FLUX.1

Can you tell, which of these pictures below are real and which are fake? This week, I played with the latest FLUX.1 Dev model from Black Forest Labs and created my own fine-tuned version of it. The results are impressive. After adding only 12 photos of myself to the training set, the new model was able to create AI-generated pictures of me in all kinds of settings.

Total cost of the fine-tuning: $1.99
Duration of the fine-tuning: 20 min
Cost for generating images: ~ $1.00 / 30 images

Here is how you can do it yourself.

Collect pictures of yourself for the training set

To create a training set for the fine-tuning, start by collecting at least 12 pictures of yourself. Preferably, these images should be of uniform size; a practical method is to source them from your Instagram profile, since they often use standardized photo dimensions. Ensuring the consistency in size helps the model to learn better from the training data. It is also important that the photos are clear and unobstructed; thus, avoid using pictures where you are wearing sunglasses or hats, as these accessories can obscure key facial features.

Once you have gathered the 12 suitable images, you'll need to compress them into a .zip file to be able to transfer them to the model training later.

If you are using macOS, the .zip file can be created by selecting all the images, right-clicking, and choosing the 'Compress' option from the context menu.

Create a fine-tuned model, that knows how you look like

Fine-tuning of the quite new FLUX.1 model can currently only be done on a handful of selected platforms. The one that I used is Replicate, which I really liked. You will need to create an account and add payment information, as the training will produce some costs. In the Billing section of the Account Settings, you can set a monthly spend limit to avoid unexpected costs. The training process should not cost more than $5.00 for what we are doing here.

Once you have an account, open the ostris/flux-dev-lora-trainer, which will help you train the FLUX.1 Dev model on Nvidia H100 GPU hardware.

  • Destination: Give your new fine-tuned model a name
  • Visibility: Private (Trust me, you want to be the only one who can create those pictures of yourself)
  • Input images: Upload the .zip file with your images
  • Trigger word: Choose a word to identify yourself, when you send a prompt to the new model. This is the name, under which your face will be known to the model. Pick something that isn’t a real word. I used RMT, which are my initials, but it should not be shorter than 3 characters.
  • Leave the remaining settings to their defaults.
Screenshot of Training a FLUX.1 Dev Model on Replicate with custom images
Training a FLUX.1 Dev Model on Replicate with custom images

Click on Create training to start the fine-tuning process. This can take some time, so be prepared to wait half an hour.

Write the first prompt

Once the training is finished, you can find your fine-tuned model in the Models section of the Replicate Dashboard.

Just create a prompt and give it a go. A good start could be creating a professional shot of yourself in an office setting. So why not creating your new LinkedIn profile picture with a prompt like this:

A professional headshot of <YOUR_TRIGGER_WORD> in a modern office setting, wearing a crisp navy suit. Soft natural lighting from large windows, shallow depth of field, warm color palette.

Screenshot of creating images of yourself by using the custom fine-tuned FLUX.1 Dev Model and your Trigger word
Create images of yourself by using the custom fine-tuned FLUX.1 Dev Model and your trigger word

From here, you can start to play around with the prompt and the parameters to tweak the results. It is a good advice, to only change one parameter at a time and observe, how it affects the results. But even with the default values, the results should be pretty impressive. Keep in mind, that there is also a small cost associated with generating pictures. Replicate will charge you around $1.00 for every 30 images you create.

In case you could use some help with prompt writing creativity, there is a fantastic FLUX Prompt Generator tool on Hugging Face, which lets you select from a wide variety of scenes, styles and settings. Make sure, to also use the Generate Prompt with LLM feature, to create a vibrant prompt.

FLUX Prompt Generator - a Hugging Face Space by gokaygokay
Discover amazing ML apps made by the community

And that's all it takes. I would love to see, what you create and how good your results are. If you feel comfortable sharing, I would love to see them in the comments under my LinkedIn post.

Have fun and enjoy playing around with this stunning technology!


☝️ Advertisement Block: I will buy myself a pizza every time I make enough money with these ads to do so. So please feed a hungry developer and consider disabling your Ad Blocker.