HOW TO CREATE THE SAME FACE IN DIFFERENT IMAGES

Javier Inspiralia
7 min readJan 9, 2024

--

In today’s episode, we will show you how to create the same face in different images using Stable Diffusion, a tool that can generate realistic and diverse images from text prompts.

We will walk you through five methods that you can use to create consistent faces with Stable Diffusion, and share some tips and tricks along the way.

If you’re new to Stable Diffusion, you can check out our previous episodes where we explain what it is, how it works, and how to get started.

And if you’re a fan of the show, please do remember to follow us on social media, leave a review, and share this podcast with your friends.

[Segue music or sound effect]

Alright, let’s get started with the first method: using the same prompt for different images.

This is the simplest way to create the same face in different images. All you have to do is type in the same text prompt for each image, and let Stable Diffusion do the rest.

For example, if you want to create a face of a young woman with brown hair and green eyes, you can type in something like this:

“A young woman with brown hair and green eyes.”

Stable Diffusion will then generate an image based on your prompt. You can repeat this process for as many images as you want, and you will get different variations of the same face.

Here are some examples of what you can get with this method:

[Show images generated by Stable Diffusion]

As you can see, the images are different, but they all have the same features: brown hair, green eyes, and a young appearance.

This method is great for creating a series of portraits, or for experimenting with different styles and expressions.

However, there are some limitations to this method. For one thing, you have to rely on Stable Diffusion’s interpretation of your prompt, which may not always match your expectations.

For another thing, you have no control over the details of the face, such as the shape, the size, the angle, or the lighting.

If you want more control over the face, you can try the second method: using the same seed for different images.

[Segue music or sound effect]

The second method is using the same seed for different images. A seed is a number that determines how Stable Diffusion generates an image from a prompt.

By default, Stable Diffusion uses a random seed for each image, which means that you will get different results every time you use the same prompt.

But you can also specify a seed for each image, which means that you will get the same result every time you use the same prompt and the same seed.

For example, if you use the same prompt as before, but with a seed of 42, you will get this image:

[Show image generated by Stable Diffusion with seed 42]

If you use the same prompt and the same seed again, you will get the same image:

[Show image generated by Stable Diffusion with seed 42]

But if you use the same prompt with a different seed, such as 99, you will get a different image:

[Show image generated by Stable Diffusion with seed 99]

This method gives you more control over the face, because you can choose which seed to use for each image.

You can also use this method to create variations of the same face, by changing the prompt slightly, while keeping the same seed.

For example, if you add the word “smiling” to the prompt, you will get this image:

[Show image generated by Stable Diffusion with seed 42 and prompt “A young woman with brown hair and green eyes smiling.”]

And if you add the word “wearing glasses” to the prompt, you will get this image:

[Show image generated by Stable Diffusion with seed 42 and prompt “A young woman with brown hair and green eyes wearing glasses.”]

As you can see, the images are similar, but they have different expressions and accessories.

This method is great for creating variations of the same face, or for fine-tuning the face to your liking.

However, there are still some limitations to this method. For one thing, you have to remember the seed for each image, which can be cumbersome if you have many images.

For another thing, you still have no control over the details of the face, such as the shape, the size, the angle, or the lighting.

If you want more control over the face, you can try the third method: using the same base image for different images.

[Segue music or sound effect]

The third method is using the same base image for different images. A base image is an image that you provide to Stable Diffusion, and that it uses as a reference for generating new images.

By default, Stable Diffusion uses a blank image as a base image, which means that it creates an image from scratch based on your prompt.

But you can also provide your own base image, which means that Stable Diffusion will modify the base image according to your prompt.

For example, if you use the same prompt as before, but with this base image:

[Show base image of a young woman with brown hair and green eyes]

Stable Diffusion will generate an image that looks like this:

[Show image generated by Stable Diffusion with base image]

If you use the same base image and the same prompt again, you will get the same image:

[Show image generated by Stable Diffusion with base image]

But if you use the same base image with a different prompt, such as “A young woman with brown hair and blue eyes”, you will get a different image:

[Show image generated by Stable Diffusion with base image and prompt “A young woman with brown hair and blue eyes”]

This method gives you more control over the face, because you can choose which base image to use for each image.

You can also use this method to create variations of the same face, by changing the prompt slightly, while keeping the same base image.

For example, if you add the word “smiling” to the prompt, you will get this image:

[Show image generated by Stable Diffusion with base image and prompt “A young woman with brown hair and green eyes smiling.”]

And if you add the word “wearing glasses” to the prompt, you will get this image:

[Show image generated by Stable Diffusion with base image and prompt “A young woman with brown hair and green eyes wearing glasses.”]

As you can see, the images are similar, but they have different expressions and accessories.

This method is great for creating variations of the same face, or for fine-tuning the face to your liking.

However, there are still some limitations to this method. For one thing, you have to provide a base image for each image, which can be time-consuming if you have many images.

For another thing, you still have no control over the details of the face, such as the shape, the size, the angle, or the lighting.

If you want more control over the face, you can try the fourth method: using the same latent vector for different images.

[Segue music or sound effect]

The fourth method is using the same latent vector for different images. A latent vector is a numerical representation of an image that Stable Diffusion uses internally to generate images.

By default, Stable Diffusion uses a random latent vector for each image, which means that you will get different results every time you use the same prompt.

But you can also specify a latent vector for each image, which means that you will get the same result every time you use the same prompt and the same latent vector.

For example, if you use the same prompt as before, but with a latent vector of [0.1, -0.2, 0.3, …, -0.1], you will get this image:

[Show image generated by Stable Diffusion with latent vector [0.1, -0.2, 0.3, …, -0.1]]

If you use the same prompt and the same latent vector again, you will get the same image:

[Show image generated by Stable Diffusion with latent vector [0.1, -0.2, 0.3, …, -0.1]]

But if you use the same prompt with a different latent vector, such as [-0.1, 0.2, -0.3, …, 0.1], you will get a different image:

[Show image generated by Stable Diffusion with latent vector [-0.1, 0.2, -0.3, …, 0.1]]

This method gives you more control over the face, because you can choose which latent vector to use for each image.

You can also use this method to create variations of the same face, by changing the latent vector slightly, while keeping the same prompt.

For example, if you add 0.01 to the first element of the latent vector, you will get this image:

[Show image generated by Stable Diffusion with latent vector [0.11, -0.2, 0.3, …, -0.1]]

And if you subtract 0.01 from the first element of the latent vector, you will get this image:

[Show image generated by Stable Diffusion with latent vector [0.09, -0.2, 0.3, …, -0.1]]

As you can see, the images are similar, but they have different features.

This method is great for creating variations of the same face, or for fine-tuning the face to your liking.

However, there are still some limitations to this method. For one thing, you have to know the latent vector for each image,

Source: Conversation with Bing, 1/9/2024
(1) Write the Perfect Podcast Script (Examples & Templates) | Captivate FM. https://www.captivate.fm/learn-podcasting/record/write-perfect-podcast-script-plus-examples-templates.
(2) How to Write a Podcast Script [8 Free Script Templates] — buzzsprout.com. https://www.buzzsprout.com/blog/write-podcast-script-examples.
(3) How to Write a Podcast Script | Podcast.co. https://blog.podcast.co/create/podcast-script.
(4) How to Write A Podcast Script | Streamlabs. https://streamlabs.com/content-hub/post/how-to-write-a-podcast-script.
(5) How to Write a Killer Podcast Script (With Examples and Templates). https://www.quillpodcasting.com/blog-posts/podcast-script.

Source: 5 methods to generate consistent face with Stable Diffusion — Stable Diffusion Art (stable-diffusion-art.com)

--

--