The inswapper_128 is a one-click face swapper and restoration tool. The inswapper_128.onnx has revolutionized the field of face swapping and restoration, offering unparalleled performance and ease of use. In this article, we will discuss how you can download and use inswapper_128.onnx model using different ways.
Table of Contents
Firstly, let’s discuss some of inswapper_128.onnx model key features:
Key Features of inswapper_128.onnx Model
The inswapper_128.onnx is a powerful tool for face swapping and restoration. Here are some of its key features:
1. High-Resolution Processing
The model operates at a resolution of 128×128 pixels, which allows it to handle high-resolution images effectively. This results in a higher quality of face swapping, especially for high-resolution images.
2. Ease of Use
The model is easy to use, requiring minimal setup and configuration. Users can quickly swap faces in their images using the InsWapper tool.
3. Face Restoration
The model supports face restoration, which can enhance the quality of the swapped face. This feature can be particularly useful when swapping faces in low-quality images.
4. Compatibility
The model is compatible with various tools and platforms, including Midjourney and AUTOMATIC1111. This makes it versatile and adaptable to different use cases.
5. ONNX Format
The model is in the ONNX (Open Neural Network Exchange) format, which is a widely used format for AI models. This makes it compatible with various AI frameworks and platforms.
6. Large File Size
The model file size is relatively large, around 554 MB. This ensures that the model has the capacity to handle complex face-swapping tasks.

| Related: Download inswapper_128.onnx file “inswapper_128.onnx” does not exist!
How to Download and Use inswapper_128.onnx Model
Method 1: The inswapper_128.onnx model download using Google Drive or Hugging Face
Here’s a step-by-step guide on how to use this model:
1. Download the ONNX model
Download the inswapper_128.onnx from the provided Google Drive link. The model is also available to download from Hugging Face.
- https://drive.google.com/file/d/1krOLgjW2tAPaqV-Bw4YALz0xT5zlb5HF/view
- https://huggingface.co/ezioruan/inswapper_128.onnx/tree/main
2. Install the necessary libraries
You’ll need to install the ONNX Runtime library. You can install this library using pip:
pip install onnxruntime
3. Load the ONNX model
You can load the ONNX model using the onnxruntime library. Here’s an example:
import onnxruntime as ort
# Load the ONNX model
sess_options = ort.SessionOptions()
sess_options.intra_op_num_threads = 1
sess = ort.InferenceSession(‘inswapper_128.onnx’, sess_options)
4. Prepare the input data
The input data should be in the same format as the data the model was trained on. You’ll need to preprocess this data before feeding it into the model. The exact preprocessing steps will depend on the model and the data it was trained on.
5. Run the model
Once you have the input data, you can run the model and get the output. Here’s an example:
# Assume `input_data` is your preprocessed input data
input_name = sess.get_inputs()[0].name
result = sess.run(None, {input_name: input_data})
6. Postprocess the output
The model output will also need to be postprocessed to make it useful. Again, the exact postprocessing steps will depend on the model and the task it was trained for.
Method 2: Using Python
To use InsWapper 128, follow these steps:
1. Clone the Repository
Start by cloning the InsWapper repository from GitHub. You can do this by running the following command in your terminal:
git clone https://github.com/haofanwang/inswapper.git
cd inswapper
2. Create a Python Virtual Environment
Next, create a Python virtual environment to isolate your project’s dependencies. You can do this by running the following commands:
python3 -m venv venv
source venv/bin/activate
3. Install Required Packages
Next, run pip install -r requirements.txt and install the required packages.
Install onnxruntime-gpu
To enable GPU inference, you need to install onnxruntime-gpu manually. If you want to use CPU-only inference, you can install onnxruntime by default.
4. Run the Quick Inference Script
Finally, you can run the quick inference script to swap faces. Here’s an example of how to do it:
from swapper import *
source_img = [Image.open(“./data/man1.jpeg”),Image.open(“./data/man2.jpeg”)]
target_img = Image.open(“./data/mans1.jpeg”)
model = “./checkpoints/inswapper_128.onnx”
result_image = process(source_img,target_img, model)
result_image.save(“result.png”)
5. Improve Face Quality with Face Restoration
To further improve the quality of the swapped face, you can perform face restoration. Here’s an example of how to do it:
python swapper.py \
–source_img=”./data/man1.jpeg;./data/man2.jpeg” \
–target_img “./data/mans1.jpeg” \
–face_restore \
–background_enhance \
–face_upsample \
–upscale=2 \
–codeformer_fidelity=0.5
Method 3: MidJourney (Discord)
To use the inswapper_128.onnx with Midjourney, you need to follow these steps:
1. Access the Insightful API
The inswapper_128.onnx is available via the Insightful API on Midjourney. You need to access this API to use the model.
2. Select the InsWapper App
Once the API is accessed, you can select the InsWapper app to swap faces in your Midjourney images.
3. Choose the Face to Swap
Now, choose the face you want to swap with the one in your Midjourney image. You can do this by selecting the inswapper_128.onnx and entering the name of the face you want to swap.
4. Edit and Test
After swapping the face, you can edit and test the result to ensure it meets your requirements. You can do this by tweaking the settings and testing the result until you are satisfied with it.
The use of InsWapper 128 with Midjourney offers several benefits. It allows you to easily swap faces in your Midjourney images, enhancing the realism and aesthetics of your images. Moreover, it will enable you to experiment with different faces and settings, giving you more control over your images.
| Also Read: DragGAN AI Photo Editing Tool: How To Install and Use
Known Issues and Limitations with inswapper_128.onnx
1. Safety Concerns
One of the potential issues with InsWapper 128 is safety concerns. Some users have raised concerns about the safety of the inswapper_128.onnx, suggesting that it may be unsafe. However, it’s important to note that these concerns are not widely shared, and the model is still widely used and trusted by many users.
2. Model Availability
Another issue is the availability of higher-resolution models like inswapper_256 and inswapper_512. While the inswapper_128 model is available, the higher-resolution models are not publicly accessible. This could limit the quality of the face-swapping results, especially for high-resolution images.
3. Model Performance
Additionally, there are concerns about the performance of the inswapper_128 model. Some users have reported that the 128 model does not perform as well as the Discord version of the model. Moreover, this could affect the quality of the face-swapping results.
4. Accessibility
Lastly, there are issues with accessing the model. Some users have reported difficulties in downloading the inswapper_128.onnx. This could make it difficult for some users to use InsWapper 128.
| Also Read: TheBloke/MythoMax-L2-13B-GPTQ: An Uncensored and NSFW Language Model
Is inswapper_128 an NSFW model?
The inswapper_128.onnx itself is not NSFW (Not Safe For Work). It is a machine-learning model designed for face-swapping and restoration tasks, and it does not contain any explicit or adult content.
However, it’s important to note that the use of this model can potentially lead to the creation of NSFW content if it’s used to swap faces in explicit or adult images. Also, this is a common concern with any AI model that can manipulate images, which users should be aware of when using such models.
| Also Read: Phind V7 Model: Outperforms GPT-4, Delivers Coding Excellence at GPT-3.5 Speed with 16k Context!
How is inswapper_128 different from Roop?
Compared to Roop, InsWapper 128 stands out with its superior performance and additional features. While both tools utilize machine learning models for face swapping, InsWapper 128 offers a more robust and accurate solution. It also provides additional options for face restoration, enhancing the overall quality of the swapped face.
| Also Read: Roop Unleashed Deepfake: New Updates, Features and Bug Fixes
Final Takeaway
The inswapper_128.onnx model is a powerful tool that revolutionizes the field of face swapping and restoration. With its superior performance, additional features, and user-friendly interface, it stands out as a leading solution in this domain. Whether you’re a professional photographer, a hobbyist, or a developer, Inswapper 128 is a must-have tool that can help you achieve stunning results in your projects.
| Also Read: TheBloke MythoMix and MythoMax AI Models Series: Differences
If you like this article, share it with your friends and family. Moreover, let us know your thoughts in the comments section below.