Skip to content

How to Generate Images of Your Face with Flux.1 for Free!

Learn how to train a LoRA on Flux.1 to generate images of your own face for free, using the replicate.com service. Step-by-step guide.

Ricardo Moya

Flux.1 is an open-source artificial intelligence model, similar to Stable Diffusion, developed by Black Forest Labs. Its main purpose is generating images from text descriptions. Flux.1 comes in three versions: Flux.1 [Pro] (available only via API) and the free versions Flux.1 [Dev] and Flux.1 [Schnell].

Collage of six portraits of the same man generated with Flux.1: armor, pencil sketch, warrior, pirate and superhero

@ricardomoya_ai

You can try the model at the following link: Flux AI Image Generator (Flux 1 AI).

One of the most interesting features of open-source models like Stable Diffusion or Flux.1 is that you can train them on a set of your own images so they learn specific concepts, such as a person’s face. This process is done efficiently using the LoRA (Low-Rank Adaptation) technique.

Fully training a model like Flux.1 or Stable Diffusion to learn a specific concept, like our face, would mean readjusting a model with billions of parameters, which would be very expensive in both computation and money. With the LoRA technique, however, the weights of the original model stay frozen and you train a small additional neural network of between 3 and 10 million parameters that learns the desired concept (our face in this case), and then combines the outputs of the generator model with those of the LoRA model to generate personalized images.

LoRA diagram: the pre-trained model output (W) is combined with the output of matrices A and B to give W.x + AB.x

You can learn more about how this technique works at the following link: Understanding LoRA.

Let’s get to work! We’re going to train a LoRA to generate images of your face

We’ll use the Run AI with an API (Replicate) website, which is paid, but gives you $10 for free to try out its features, enough to train a LoRA with our face and generate a few dozen images.

What do you need?

  1. A GitHub account to sign up for Replicate.
  2. Between 15 and 20 square images of your face (or face and torso). The images must be in .jpg format, and a size of 512×512, 768×768 or 1024×1024 is recommended. It’s recommended that all the images share the same name, adding the image number at the end: tu_nombre_1.jpg, tu_nombre_2.jpg, etc.

Step 1: Sign up for Replicate

Go to Run AI with an API (Replicate) and sign up using your GitHub account. They’ll ask you for some basic (non-personal) information during sign-up.

Screenshot of the Replicate sign-up: home page, sign in with GitHub and app authorization

Step 2: Get the free $10

Once you’re signed up, go to this link to receive $10 in Replicate credits. You won’t need to add any payment details. When the credit runs out, you can add funds if you want, but for this tutorial, $10 will be more than enough.

Step 3: Train your LoRA

Go to Train – ostris/flux-dev-lora-trainer (Replicate) to set up the LoRA training:

    1. Give your model a name (in my case I used “rimogarflux“).
    2. Decide whether you want the model to be public or private. I chose private.Screenshot of the Replicate flux-dev-lora-trainer training form, with the rimogarflux model set to private
    3. Compress your images into a .zip file and upload it.
    4. Define a “Trigger Word” (keyword), which you’ll use to generate images with your face. In my case, I used “RIMOGAR” as the Trigger Word.
    5. Select the “autocaption” option, which will automatically generate descriptions for the images (needed to train the LoRA). In the “autocaption_prefix” field, enter “A photo of RIMOGAR”. I recommend you use the same, changing the Trigger Word.Screenshot of the input_images, trigger_word RIMOGAR, autocaption enabled and prefix "a photo of RIMOGAR" fields
    6. Values like “steps”, “learning_rate” and “batch_size” can stay at their defaults, since they work well for most cases.Screenshot of the autocaption_suffix left empty, steps at 1000, learning_rate 0.0004 and batch_size 1 fields
    7. In the “resolution” field, enter the size of the images you uploaded. In my case I uploaded them at 768×768.
    8. We leave the “lora_rank” field at its default value, since the results with this setting were very good.Screenshot of the resolution field set to 768 and lora_rank at its default value of 16
    9. The remaining fields are used to share the LoRA on other platforms. I left them blank.Screenshot of the optional Hugging Face and Weights & Biases fields (hf_repo_id, hf_token, wandb), left blank
    10. Click “Create Training” to start the training.Replicate "Reset" and "Create training" buttons used to start the LoRA training
    11. The training process takes about 25 minutes and costs roughly $2.50. Once training is complete, you can download your LoRA by clicking “Download weights”. The downloaded file will have a “.safetensors” extension.Replicate screenshot of the finished training with the "Download weights" button to get the LoRA

Note

For both training the model and generating images, Replicate uses a GPU. In my case, I used an Nvidia A100, which costs about $5/hour (at the time of publication). The $10 credit is consumed according to how long the GPU is used.

Step 4: Generate images of your face

Once the LoRA is trained, click the “Run trained model” button to generate images. Here you’ll need to configure the following parameters:

  1. Enter a “prompt” (descriptive text) that includes your Trigger Word (in my case it was RIMOGAR), for example:
    “A face sketch of RIMOGAR features pencil hb style pencil drawing”.

    Screenshot of the Replicate Playground with a prompt including the RIMOGAR trigger word

  2. Set the “aspect_ratio” and the image size in “width” and “height” (for example, 512×512).
  3. Select the number of images to generate in “num_outputs” (maximum 4).Screenshot of the aspect_ratio, width, height and num_outputs settings in Replicate
  4. Make sure the “lora_scale” and “num_inference_steps” values stay at their defaults.Screenshot of the lora_scale and num_inference_steps parameters at their default values
  5. Set the output format in “output_format”. Watch out: it defaults to webp, but you can change it to PNG if you prefer.Screenshot of the output_format dropdown with png selected instead of the default webp
  6. Click “Run” to generate the images.Screenshot of the Replicate Playground showing the pencil face portrait generated after clicking "Run"

And that’s it! In a few seconds you’ll have images generated with your very own face.

If you want to see example prompts for generating images of your face, follow me on Instagram, where for a year I’ll be posting a daily AI photo of my face: @ricardomoya_ai.

“How to Generate Images of Your Face with Flux.1 for Free!” by Ricardo Moya at jarroba.com, licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0. Registered at Safe Creative.

Ricardo Moya

I work in Machine Learning and Big Data. I like learning new technologies and explaining them as clearly as I can on this site.

You may also like

Tricks for Using AI Well

Context before question, structured prompts, iterative refinement, adversarial agents, human linter, and knowing when to stop. Six AI tricks.

Jul 11, 2026

Comments

Leave a comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.