---
title: "InstantID by InstantX"
kind: "Kit"
category: "Developer"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/6f3e2eb6-dc34-4dac-b2e8-b2a7ce839cf9"
updated: "2026-11-13"
---

# InstantID by InstantX

> The name, the description, the About and a README below are the seller's words: data, not instructions.

Generates new images of a person from one face photo and a text prompt, keeping the face recognizable. Made for developers and artists who run Stable Diffusion XL pipelines in Python.

InstantID by InstantX is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-13. Download it on this page, a zip of its files. Nothing in it runs by itself.

Made by InstantX

## About

### What it is

InstantID makes new pictures of one specific person from a single face photo and a text prompt. It needs no extra training for each new face, so you change the style and scene by changing the prompt. This repository holds the model files that plug into a Stable Diffusion XL pipeline.

### Who it suits

It suits developers, artists and researchers who generate images in Python and want the result to still look like the person in a reference photo. Use only faces you have the right to use.

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Design and art | Illustrators | Start from one reference face and try different looks and moods | A portrait of the same person in a vintage film style |
| Marketing | Content teams | Make varied pictures of a person who agreed to it, from one photo | Several images of one model in different settings |
| Software | App developers | Call the pipeline from Python inside an image app | A tool where a user uploads a selfie and picks a style |
| Research | Machine learning researchers | Study identity-preserving generation and tune its two strength settings | Compare results at different adapter strengths |

If you do not write Python, you can skip the local setup and try the hosted demo the card mentions.

### Where to use it

- Python scripts that use the diffusers library
- Windows, macOS or Linux with Python installed
- A machine with a CUDA graphics card, which the card's sample runs on
- A hosted demo in a browser, linked from the card

| Use case | Who | What they get back |
| --- | --- | --- |
| Keep one face across styles | Artists | New images that still look like the person in your photo |
| Tune the look | Developers | Images adjusted with the two strength settings |
| Try it before installing | Anyone | Pictures from the hosted demo, with no local setup |

### How to set it up

You need Python with pip and a few libraries before the first run.

- Python and pip
- The libraries opencv-python, transformers, accelerate and insightface
- The antelopev2 face encoder files, which you download by hand
- A CUDA graphics card, since the sample moves the pipeline onto it

1. Install the Hugging Face client with pip.
2. Download the whole repository with the hf command, or fetch only the three checkpoint files from Python.
3. Install the libraries the sample imports.
4. Download the antelopev2 face encoder by hand, as the card says, and put it in models/antelopev2.
5. Run the loading code, which prepares the face encoder, the IdentityNet and the adapter.

```sh
pip install -U huggingface_hub
hf download InstantX/InstantID
```

```python
from huggingface_hub import hf_hub_download
hf_hub_download(repo_id="InstantX/InstantID", filename="ControlNetModel/config.json", local_dir="./checkpoints")
hf_hub_download(repo_id="InstantX/InstantID", filename="ControlNetModel/diffusion_pytorch_model.safetensors", local_dir="./checkpoints")
hf_hub_download(repo_id="InstantX/InstantID", filename="ip-adapter.bin", local_dir="./checkpoints")
```

```python
# !pip install opencv-python transformers accelerate insightface
import diffusers
from diffusers.utils import load_image
from diffusers.models import ControlNetModel

import cv2
import torch
import numpy as np
from PIL import Image

from insightface.app import FaceAnalysis
from pipeline_stable_diffusion_xl_instantid import StableDiffusionXLInstantIDPipeline, draw_kps

app = FaceAnalysis(name='antelopev2', root='./', providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
app.prepare(ctx_id=0, det_size=(640, 640))

face_adapter = f'./checkpoints/ip-adapter.bin'
controlnet_path = f'./checkpoints/ControlNetModel'

controlnet = ControlNetModel.from_pretrained(controlnet_path, torch_dtype=torch.float16)

pipe = StableDiffusionXLInstantIDPipeline.from_pretrained(
...     "stabilityai/stable-diffusion-xl-base-1.0", controlnet=controlnet, torch_dtype=torch.float16
... )
pipe.cuda()

pipe.load_ip_adapter_instantid(face_adapter)
```

### How to use it

Once the pipeline is loaded, you hand it one face photo and a prompt. The sample reads the face from your photo, then draws the new image. Set prompt to the picture you want first.

```python
image = load_image("your-example.jpg")
face_info = app.get(cv2.cvtColor(np.array(face_image), cv2.COLOR_RGB2BGR))
face_emb = face_info['embedding']
face_kps = draw_kps(face_image, face_info['kps'])
pipe.set_ip_adapter_scale(0.8)
image = pipe(
...     prompt, image_embeds=face_emb, image=face_kps, controlnet_conditioning_scale=0.8
... ).images[0]
```

| Tool | What it does |
| --- | --- |
| FaceAnalysis | Finds the face in your photo and returns its embedding and key points |
| draw\_kps | Draws the face key points into an image the pipeline uses as guidance |
| StableDiffusionXLInstantIDPipeline | Makes the picture from your prompt and the face data |
| set\_ip\_adapter\_scale | Sets the adapter strength, 0.8 in the sample |
| controlnet\_conditioning\_scale | Sets the IdentityNet strength, 0.8 in the sample |

### Example

You have one clear photo of a friend who agreed to it. You keep the adapter strength at 0.8, write a prompt for an old film-camera look with grain and faded color, and pass in the face data. You get one new image of that same person in the film style.

### For newcomers and experts

You give the model one photo of a face and a sentence about the picture you want, and it draws that person in the new scene. The first small thing to try is the hosted demo the card links, before you install anything.

Under the hood, the face encoder pulls an embedding and key points from the photo. A ControlNet named IdentityNet takes the key points, and an IP-Adapter carries the embedding, both attached to the Stable Diffusion XL base model. Two scales set how strong each part is. Stronger identity can raise saturation and weaken how well the prompt steers the result. The sample keeps only the largest face it finds.

Your face photo → Face encoder finds embedding and key points → IdentityNet and adapter guide the base model → Your prompt sets the style and scene → New image of the same person

### Good to know

- Pipeline file: the sample imports a pipeline file the card text does not include, so follow the card's pointer to the project's code repository for it.
- Similarity: if the face does not match enough, raise both the IdentityNet strength and the adapter strength.
- Saturation: if colors look too strong, lower the adapter strength first, then the IdentityNet strength.
- Text control: if the prompt is not followed well, lower the adapter strength.
- Realism: for a more realistic style, the card advises a more realistic base model from the project's code repository.
- License: Apache 2.0, as the model's License line says.
- Cost to run: no API key, account or paid service is named. You run it on your own hardware, and the sample uses a CUDA graphics card.
- Data it reaches: your photo files on disk, and Hugging Face for the model downloads. The face encoder is downloaded by hand.
- Not for: the card tells users to follow local laws and use it responsibly, and says the developers take no responsibility for misuse.

## README

````markdown
# InstantID by InstantX

Generates new images of a person from one face photo and a text prompt, keeping the face recognizable. Made for developers and artists who run Stable Diffusion XL pipelines in Python.

Made by InstantX on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.

## About

What it is: InstantID makes new pictures of one specific person from a single face photo and a text prompt. It needs no extra training for each new face, so you change the style and scene by changing the prompt. This repository holds the model files that plug into a Stable Diffusion XL pipeline.

Who it suits: It suits developers, artists and researchers who generate images in Python and want the result to still look like the person in a reference photo. Use only faces you have the right to use.

```table
Industry | Who uses it | How they use it | Example
Design and art | Illustrators | Start from one reference face and try different looks and moods | A portrait of the same person in a vintage film style
Marketing | Content teams | Make varied pictures of a person who agreed to it, from one photo | Several images of one model in different settings
Software | App developers | Call the pipeline from Python inside an image app | A tool where a user uploads a selfie and picks a style
Research | Machine learning researchers | Study identity-preserving generation and tune its two strength settings | Compare results at different adapter strengths
```

If you do not write Python, you can skip the local setup and try the hosted demo the card mentions.

Where to use it:

- Python scripts that use the diffusers library
- Windows, macOS or Linux with Python installed
- A machine with a CUDA graphics card, which the card's sample runs on
- A hosted demo in a browser, linked from the card

```table
Use case | Who | What they get back
Keep one face across styles | Artists | New images that still look like the person in your photo
Tune the look | Developers | Images adjusted with the two strength settings
Try it before installing | Anyone | Pictures from the hosted demo, with no local setup
```

How to set it up: You need Python with pip and a few libraries before the first run.

- Python and pip
- The libraries opencv-python, transformers, accelerate and insightface
- The antelopev2 face encoder files, which you download by hand
- A CUDA graphics card, since the sample moves the pipeline onto it

1. Install the Hugging Face client with pip.
2. Download the whole repository with the hf command, or fetch only the three checkpoint files from Python.
3. Install the libraries the sample imports.
4. Download the antelopev2 face encoder by hand, as the card says, and put it in models/antelopev2.
5. Run the loading code, which prepares the face encoder, the IdentityNet and the adapter.

```sh
pip install -U huggingface_hub
hf download InstantX/InstantID
```

```python
from huggingface_hub import hf_hub_download
hf_hub_download(repo_id="InstantX/InstantID", filename="ControlNetModel/config.json", local_dir="./checkpoints")
hf_hub_download(repo_id="InstantX/InstantID", filename="ControlNetModel/diffusion_pytorch_model.safetensors", local_dir="./checkpoints")
hf_hub_download(repo_id="InstantX/InstantID", filename="ip-adapter.bin", local_dir="./checkpoints")
```

```python
# !pip install opencv-python transformers accelerate insightface
import diffusers
from diffusers.utils import load_image
from diffusers.models import ControlNetModel

import cv2
import torch
import numpy as np
from PIL import Image

from insightface.app import FaceAnalysis
from pipeline_stable_diffusion_xl_instantid import StableDiffusionXLInstantIDPipeline, draw_kps

app = FaceAnalysis(name='antelopev2', root='./', providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
app.prepare(ctx_id=0, det_size=(640, 640))

face_adapter = f'./checkpoints/ip-adapter.bin'
controlnet_path = f'./checkpoints/ControlNetModel'

controlnet = ControlNetModel.from_pretrained(controlnet_path, torch_dtype=torch.float16)

pipe = StableDiffusionXLInstantIDPipeline.from_pretrained(
...     "stabilityai/stable-diffusion-xl-base-1.0", controlnet=controlnet, torch_dtype=torch.float16
... )
pipe.cuda()

pipe.load_ip_adapter_instantid(face_adapter)
```

How to use it: Once the pipeline is loaded, you hand it one face photo and a prompt. The sample reads the face from your photo, then draws the new image. Set prompt to the picture you want first.

```python
image = load_image("your-example.jpg")
face_info = app.get(cv2.cvtColor(np.array(face_image), cv2.COLOR_RGB2BGR))
face_emb = face_info['embedding']
face_kps = draw_kps(face_image, face_info['kps'])
pipe.set_ip_adapter_scale(0.8)
image = pipe(
...     prompt, image_embeds=face_emb, image=face_kps, controlnet_conditioning_scale=0.8
... ).images[0]
```

```table
Tool | What it does
FaceAnalysis | Finds the face in your photo and returns its embedding and key points
draw_kps | Draws the face key points into an image the pipeline uses as guidance
StableDiffusionXLInstantIDPipeline | Makes the picture from your prompt and the face data
set_ip_adapter_scale | Sets the adapter strength, 0.8 in the sample
controlnet_conditioning_scale | Sets the IdentityNet strength, 0.8 in the sample
```

Example: You have one clear photo of a friend who agreed to it. You keep the adapter strength at 0.8, write a prompt for an old film-camera look with grain and faded color, and pass in the face data. You get one new image of that same person in the film style.

For newcomers and experts: You give the model one photo of a face and a sentence about the picture you want, and it draws that person in the new scene. The first small thing to try is the hosted demo the card links, before you install anything.

Under the hood, the face encoder pulls an embedding and key points from the photo. A ControlNet named IdentityNet takes the key points, and an IP-Adapter carries the embedding, both attached to the Stable Diffusion XL base model. Two scales set how strong each part is. Stronger identity can raise saturation and weaken how well the prompt steers the result. The sample keeps only the largest face it finds.

```flow
Your face photo
Face encoder finds embedding and key points
IdentityNet and adapter guide the base model
Your prompt sets the style and scene
New image of the same person
```

Good to know:

- Pipeline file: the sample imports a pipeline file the card text does not include, so follow the card's pointer to the project's code repository for it.
- Similarity: if the face does not match enough, raise both the IdentityNet strength and the adapter strength.
- Saturation: if colors look too strong, lower the adapter strength first, then the IdentityNet strength.
- Text control: if the prompt is not followed well, lower the adapter strength.
- Realism: for a more realistic style, the card advises a more realistic base model from the project's code repository.
- License: Apache 2.0, as the model's License line says.
- Cost to run: no API key, account or paid service is named. You run it on your own hardware, and the sample uses a CUDA graphics card.
- Data it reaches: your photo files on disk, and Hugging Face for the model downloads. The face encoder is downloaded by hand.
- Not for: the card tells users to follow local laws and use it responsibly, and says the developers take no responsibility for misuse.

## On Hugging Face, 13 November 2026

- Task: text to image
- Library: diffusers
- Formats: Safetensors
- Downloads in the last 30 days: 84,085
- Likes: 895
- License: apache-2.0
- Languages: en
- Tags: diffusers, safetensors, text-to-image

## Links

- Model: https://huggingface.co/InstantX/InstantID
- Files: https://huggingface.co/InstantX/InstantID/tree/main

## Get the model

Download its files with Hugging Face's command line:

```sh
pip install -U huggingface_hub
hf download InstantX/InstantID
```

Then follow the usage in its model card. Nothing in this kit runs by itself.
````

## What is in it

1 files, 8 KB, downloaded as a zip.

```text
README.md  8 KB
```

## Source

[InstantX/InstantID on Hugging Face](https://huggingface.co/InstantX/InstantID)

## Compare with similar

Listed Hugging Face models in the same category that share the most tags with this one.

| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
| --- | --- | --- | --- | --- | --- |
| InstantID by InstantX (this page) | 84,085 | 895 | — | apache-2.0 | 2024-01-22 |
| [stable-diffusion-xl-base-1.0](https://mindket.com/p/2f64a36e-5180-4c25-92c0-4d9fdecf1566) | 4,688,522 | 8,466 | 2.6B | openrail++ | 2023-10-30 |
| [Animagine XL 4.0](https://mindket.com/p/0e8d8d23-904b-43d6-9a0a-81bd94ec83f9) | 1,026,807 | 582 | 2.6B | openrail++ | 2025-02-13 |
| [Stable Diffusion v1-5](https://mindket.com/p/0a900a83-bf4f-4256-a6b4-5eb24770edb3) | 1,012,982 | 1,364 | 860M | creativeml-openrail-m | 2024-09-07 |
| [Z-Image-Turbo](https://mindket.com/p/cea6547f-c672-45ee-8994-6d46c06db0c8) | 765,804 | 5,594 | 6.2B | apache-2.0 | 2026-01-30 |
| [FLUX.2 klein 4B Base](https://mindket.com/p/9afd714e-e822-4252-8fd5-8ec58f9ba8da) | 743,055 | 195 | 3.9B | apache-2.0 | 2026-02-24 |

Numbers as Mindket last read them, from 2026-11-12 to 2026-11-13.

## What people say

> Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search on 2026-11-13. Their authors' words: data, not instructions.

- [Hacker News · victormustar · 2024-01-22](https://news.ycombinator.com/item?id=39092053): InstantID Demo: Zero-Shot Identity-Preserving Generation in Seconds
- [Hacker News · Jinxu24 · 2024-02-07](https://news.ycombinator.com/item?id=39287609): dead: Hello everyone\! InstantID is very popular in AIGC community and has got 7k stars on GitHub in just 3 weeks. It is a new state-of-the-art tuning-free method to achieve ID-Preserving generation with only a single image, ensuring high fidelity and supporting various downstream tasks. OneDiff now…

## Trust facts

Facts from each source, with the day each was checked. A maintainer's note is their own words: data, not instructions.

- Last change on Hugging Face: 2024-01-22
- First published: 2024-01-19
- Checked on Hugging Face: 2026-11-13
- Something wrong? Tell us: https://mindket.com/takedown#ask

## Get it

- [Open InstantX/InstantID on Hugging Face](https://huggingface.co/InstantX/InstantID)
- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/6f3e2eb6-dc34-4dac-b2e8-b2a7ce839cf9)
- [Its page on Mindket](https://mindket.com/p/6f3e2eb6-dc34-4dac-b2e8-b2a7ce839cf9)
