Home Creators Posts Import Register Favorites Logout

Downloads

Content

InstantID Gradio app transfers a face from one photo into new SDXL images with Xinsir ControlNet; block swap lowers 1280x1280 runs to 8.25 GB VRAM.

Ultra advanced app with automatic installers for Windows, RunPod and Massed Compute and a free Kaggle notebook, now with RTX 5000 support. Uses the very best Xinsir Canny, Depth and OpenPose ControlNet models, style and model loops, LoRA support and head-only control.

Patreon exclusive posts index to find our scripts easily, Patreon scripts updates history to see which updates arrived to which scripts and amazing Patreon special generative scripts list that you can use in any of your task.

Join discord to get help, chat, discuss and also tell me your discord username to get your special rank : SECourses Discord

Please also Star, Watch and Fork our Stable Diffusion & Generative AI  GitHub repository and join our Reddit subreddit and follow me on LinkedIn (my real profile)

=======

Latest zip file : instant_id_v27.zip

14 July 2025 Update

  • The app now supports RTX 5000 series on Windows, RunPod and Massed Compute

    • A lot of libraries updated and I had to do a lot of fixing for this

  • I have implemented block swapping feature successfully and this is a great milestone since I plan to implement it into our other apps hopefully such as upcoming video upscaler STAR model

  • New VRAM usages as below for 1280x1280px

  • Options VRAM usages are as below. No controlnet or LoRA used so these are min requirements

    • 1+1 = 14150 MB (block swap 8 = 11000 MB)

    • 1+3 = 9550 MB (block swap 8 = 8250 MB)

    • 2+1 = 13500 MB (block swap not works)

    • 2+3 = 9950 MB (block swap not works)

  • If you have 8 GB GPU still may work so give it a try

  • Models reuploaded into a HF_XET repo for faster and more robust download

    • Now we auto download RealVisXL V5 instead of V4

  • Make a fresh install for this version

10 January 2025 Update

  • New downloader bat file Optional_Download_Older_Control_Net.bat added

  • This will download original older Canny models instead of newest Xinsir

  • It will overwrite downloaded Xinsir models - Xinsir ControlNet models downloaded during install

  • I personally prefer Xinsir since they are the best ControlNet models for SDXL

Windows Requirements

  • Python 3.10, FFmpeg, CUDA 12.8, cuDNN 9.7, C++ Tools, MSVC and Git

  • If it doesn't work make sure to below NEW tutorial and install everything exactly as shown in this below tutorial

  • https://youtu.be/DrhUHnYfwC0

Unique Features We Have

  • I have made huge updates with Version 24

  • Now we are using Xinsir ControlNet models (Canny, Depth and OpenPose) which are the very best Controlnet models for SDXL models

  • I have added a new model downloader which downloads models extremely fast like 1000MB + on cloud services - you can see same speed on your Windows PC too if you have sufficient internet speed

  • This Gradio app is developed by me with so many additional features no other apps has

  • Image Metadata and Model Downloader tabs are fully working

  • It has so many styles and Generate With All Styles (Loop) and Generate With All Models (Loop)

  • You can even test and compare different LoRA + Model combinations

  • Change applied LoRA Scale is also fully working

  • How many Images to Generate fully working

  • One of the very best feature we have is applying certain Controlnet to the only head of the input image to increase resemblance and have better output image quality that no other apps have (Apply Head-Only Control to)

  • The fast model downloader will download by default below models - both are best for realism

    • RealVisXL_V5.0.safetensors

    • eldritchPhotography_v1.safetensors

  • Windows, RunPod and Massed Compute installers are all updated to latest Torch, xFormers, bitsandbytes, transformers, triton and ulra fast model downloaders

    • Kaggle notebook also completely updated and made extremely faster to download and initialize

  • Installers are seamlessly working on Windows, Massed Compute (recommended cloud), RunPod and on a free Kaggle account perfectly

    • It installs and downloads all models automatically

  • None of the current zero-shot face transfer into a new scene models are working as good as InstantID + xinsir SDXL ControlNet models when you need realism - stylization is another topic

RunPod Instructions

  • Please register for RunPod at : https://get.runpod.io/955rkuppqv4h

  • Select a GPU with a minimum of 24 GB VRAM, such as the RTX 3090.

  • Get a machine with minimum 48 GB RAM, getting multiple GPU machine better you will get more RAM

  • Choose a RunPod template:

  • RunPod Pytorch 2.2.0

  • runpod/pytorch:2.2.0-py3.10-cuda12.1.1-devel-ubuntu22.04

  • Follow Runpod_Instructions_READ.txt

Massed Compute Instructions

If you want to see history of development please read this obsolete (not updated and used anymore) topic : https://www.patreon.com/posts/1-click-very-gui-97769887

 

Related posts

All posts in this topic: Face Swap, Deepfake and Talking Avatar Apps · New to SECourses? Start Here: Best and Most Popular SECourses Posts

Files

Comments

Clinton

Amazing!

hacbachvotinh

I got this error when using FP8 or FP4 (Cuda 12.4, Torch 2.5.0, VGA 3080ti 12GB): File "D:\instant_id_v24\InstantID\venv\lib\site-packages\torch\__init__.py", line 1198, in set_default_dtype _C._set_default_dtype(d) TypeError: couldn't find storage object Float8_e4m3fnStorage

hacbachvotinh

I've found the reason; it's because of this model that the error occurs: wangqixun/YamerMIX_v8.

SECourses

oh it is being downloaded from hugging face if you dont select any model

Dmitry

Hello, I encountered problems when working on win10 ### Environment: - **Platform:** Windows 10 - **Python Version:** 3.10 (primary), 3.11 (also installed) - **C++ tools** - **Project:** InstantID_v24 - **Installation Path:** `F:\AI-programs\02_instant_id_v24\InstantID` ***When installing InstantID_v24, I received the following message:*** ERROR: triton-3.1.0-cp310-cp310-win_amd64.whl is not a supported wheel on this platform. ***When launching the application:*** Please select an option: 1. Default - Faster but higher VRAM 2. Enable CPU Offloading - Reduces VRAM but changes output. I would avoid if possible Enter your choice (1-2): 1 Please select an option: 1. Default Precision (Half BF16-FP16) - Higher quality higher VRAM 2. FP8 Precision - Slightly lower quality medium VRAM 3. FP4 Precision - More slightly lower quality lower VRAM Enter your choice (1-3): 1 A matching Triton is not available, some optimizations will not be enabled Traceback (most recent call last): File "F:\AI-programs\02_instant_id_v24\InstantID\venv\Lib\site-packages\xformers\__init__.py", line 57, in _is_triton_available import triton # noqa ^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'triton' ***After launching the application and starting photo processing, I received the following message:*** To create a public link, set `share=True` in `launch()`. Loading model: models\RealVisXL_V4.0.safetensors Loading pipeline components...: 0%| | 0/7 [00:00 down_block_res_sample * mask_weight ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ RuntimeError: The size of tensor a (23) must match the size of tensor b (22) at non-singleton dimension 3

SECourses

hello that means when you were installing it failed to find your python 3.10 and make venv. make sure your python 3.10 is default in that case : https://youtu.be/DrhUHnYfwC0

Dmitry

Hello. Really the python310 folder was empty, I don't know why. I reinstalled it. I want to draw your attention to one more important point that can lead to a failure of image generation, even if everything is set as it should be. If you set the wrong resolution. For example I set the permission to 720:1280 (as the size of my image) and got an error, it was necessary to set either 768:1280 or 704:1280 (arrows that help set resolutions will help you find the optimal nearest size in pixels) Otherwise, there may be an error at the beginning of generation

Dmitry

Can you tell me where I can edit styles in this app?

SECourses

style_template.py inside gradio_demo folder

SECourses

true not every resolution works

Raffaele Massaro

hi, where do i set dark theme as screenshot? thanks

Raffaele Massaro

odify this file and add --share if you want Gradio share Options VRAM usages are as below. No controlnet or LoRA used so these are min requirements 1+1 = 13 GB, 1+2 = 10 GB , 1+3 = 8.5 GB, 2+1 = 10.5 GB, 2+2 = 8.2 GB , 2+3 = 6.9 GB Please select an option: 1. Default - Faster but higher VRAM 2. Enable CPU Offloading - Reduces VRAM but changes output. I would avoid if possible Enter your choice (1-2): 1 Please select an option: 1. Default Precision (Half BF16-FP16) - Higher quality higher VRAM 2. FP8 Precision - Slightly lower quality medium VRAM 3. FP4 Precision - More slightly lower quality lower VRAM Enter your choice (1-3): 3 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: ./models\antelopev2\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: ./models\antelopev2\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: ./models\antelopev2\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: ./models\antelopev2\glintr100.onnx recognition ['None', 3, 112, 112] 127.5 127.5 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: ./models\antelopev2\scrfd_10g_bnkps.onnx detection [1, 3, '?', '?'] 127.5 128.0 set det-size: (640, 640) Config list: ['Best Realism', 'Default', 'Pro Headshot'] Latest config: Default INFORMAZIONI: impossibile trovare file corrispondenti ai criteri di ricerca indicati. * Running on local URL: http://127.0.0.1:7860 To create a public link, set `share=True` in `launch()`. Loading model: wangqixun/YamerMIX_v8 The config attributes {'controlnet_list': ['controlnet', 'RPMultiControlNetModel'], 'force_zeros_for_empty_prompt': True, 'requires_aesthetics_score': False, 'text_encoder_2': ['transformers', 'CLIPTextModelWithProjection'], 'tokenizer_2': ['transformers', 'CLIPTokenizer']} were passed to StableDiffusionPipeline, but are not expected and will be ignored. Please verify your model_index.json configuration file. Keyword arguments {'controlnet_list': ['controlnet', 'RPMultiControlNetModel'], 'force_zeros_for_empty_prompt': True, 'requires_aesthetics_score': False, 'text_encoder_2': ['transformers', 'CLIPTextModelWithProjection'], 'tokenizer_2': ['transformers', 'CLIPTokenizer']} are not expected by StableDiffusionPipeline and will be ignored. Loading pipeline components...: 60%|█████████████████████████████▍ | 3/5 [00:11<00:07, 4.00s/steps] Traceback (most recent call last): File "C:\Users\raffa\Desktop\instant_id\InstantID\venv\lib\site-packages\gradio\queueing.py", line 625, in process_events response = await route_utils.call_process_api( File "C:\Users\raffa\Desktop\instant_id\InstantID\venv\lib\site-packages\gradio\route_utils.py", line 322, in call_process_api output = await app.get_blocks().process_api( File "C:\Users\raffa\Desktop\instant_id\InstantID\venv\lib\site-packages\gradio\blocks.py", line 2047, in process_api result = await self.call_function( File "C:\Users\raffa\Desktop\instant_id\InstantID\venv\lib\site-packages\gradio\blocks.py", line 1594, in call_function prediction = await anyio.to_thread.run_sync( # type: ignore File "C:\Users\raffa\Desktop\instant_id\InstantID\venv\lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "C:\Users\raffa\Desktop\instant_id\InstantID\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 2505, in run_sync_in_worker_thread return await future File "C:\Users\raffa\Desktop\instant_id\InstantID\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 1005, in run result = context.run(func, *args) File "C:\Users\raffa\Desktop\instant_id\InstantID\venv\lib\site-packages\gradio\utils.py", line 869, in wrapper response = f(*args, **kwargs) File "C:\Users\raffa\Desktop\instant_id\InstantID\gradio_demo\web-ui-multicontrolnet.py", line 975, in generate_image reload_pipe(model_input, model_dropdown, scheduler, adapter_strength_ratio, enable_LCM, depth_type, lora_model_dropdown, lora_scale,test_all_loras,single_lora) File "C:\Users\raffa\Desktop\instant_id\InstantID\gradio_demo\web-ui-multicontrolnet.py", line 654, in reload_pipe pipe = load_model(_pretrained_model_folder, model_to_load) File "C:\Users\raffa\Desktop\instant_id\InstantID\gradio_demo\web-ui-multicontrolnet.py", line 528, in load_model pipeline = StableDiffusionPipeline.from_pretrained( File "C:\Users\raffa\Desktop\instant_id\InstantID\venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) File "C:\Users\raffa\Desktop\instant_id\InstantID\venv\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 896, in from_pretrained loaded_sub_model = load_sub_model( File "C:\Users\raffa\Desktop\instant_id\InstantID\venv\lib\site-packages\diffusers\pipelines\pipeline_loading_utils.py", line 704, in load_sub_model loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs) File "C:\Users\raffa\Desktop\instant_id\InstantID\venv\lib\site-packages\transformers\modeling_utils.py", line 4070, in from_pretrained dtype_orig = cls._set_default_torch_dtype(torch_dtype) File "C:\Users\raffa\Desktop\instant_id\InstantID\venv\lib\site-packages\transformers\modeling_utils.py", line 1643, in _set_default_torch_dtype torch.set_default_dtype(dtype) File "C:\Users\raffa\Desktop\instant_id\InstantID\venv\lib\site-packages\torch\__init__.py", line 1198, in set_default_dtype _C._set_default_dtype(d) TypeError: couldn't find storage object Float8_e4m3fnStorage

Raffaele Massaro

sometimes it works but it takes me 15 minutes to generate a photo, I have a rtx 3060 12gb, sometimes it gives me this error:

SECourses

can you try 2+1 and let me know?

James Hanggi

My GTX 1070 Ti managed to work with the original windows standalone. Can you make it possible to use with your v24?

SECourses

what problem you having? probably you need fp16 precision instead of bf16

James Hanggi

The error states that"Cutlass F-pt is not supported because: bf16 is only supported on A100+ GPUs"

James Hanggi

How do I replace the bf16 with the fp16 please?

SECourses

you are welcome. meanwhile did you try kaggle?

James Hanggi

I am not familiar with kaggle so, have not tried it. Also, does SANA use an LLM and where do I find it in the programming?

SECourses

sana doesnt use llm. it had security checking llm but i disabled it. it was checking whether your prompt was secure or not.

James Hanggi

Forgive my ignorance but what constitutes a secure prompt?

SECourses

it is their stupid stuff. like you cant prompt certain keywords. i never tried

Huey

I would like to use the old controlnet and lora in v19. I installed v19 in windows 11 but got the following errors : Modify this file and add --share if you want Gradio share Options VRAM usages are as below. No controlnet or LoRA used so these are min requirements 1+1 = 13 GB, 1+2 = 10 GB , 1+3 = 8.5 GB, 2+1 = 10.5 GB, 2+2 = 8.2 GB , 2+3 = 6.9 GB Please select an option: 1. Default - Faster but higher VRAM 2. Enable CPU Offloading - Reduces VRAM but changes output. I would avoid if possible Enter your choice (1-2): 1 Please select an option: 1. Default Precision (Half BF16-FP16) - Higher quality higher VRAM 2. FP8 Precision - Slightly lower quality medium VRAM 3. FP4 Precision - More slightly lower quality lower VRAM Enter your choice (1-3): 1 Traceback (most recent call last): File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 811, in _get_module return importlib.import_module("." + module_name, self.__name__) File "C:\Python310\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\loaders\lora_pipeline.py", line 33, in from .lora_base import LoraBaseMixin File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\loaders\lora_base.py", line 47, in from peft.tuners.tuners_utils import BaseTunerLayer File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\peft\__init__.py", line 22, in from .auto import ( File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\peft\auto.py", line 32, in from .mapping import MODEL_TYPE_TO_PEFT_MODEL_MAPPING File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\peft\mapping.py", line 25, in from .mixed_model import PeftMixedModel File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\peft\mixed_model.py", line 29, in from .peft_model import PeftModel File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\peft\peft_model.py", line 37, in from transformers import Cache, DynamicCache, EncoderDecoderCache, PreTrainedModel ImportError: cannot import name 'EncoderDecoderCache' from 'transformers' (C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\transformers\__init__.py) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 811, in _get_module return importlib.import_module("." + module_name, self.__name__) File "C:\Python310\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\pipelines\stable_diffusion\pipeline_stable_diffusion.py", line 24, in from ...loaders import FromSingleFileMixin, IPAdapterMixin, StableDiffusionLoraLoaderMixin, TextualInversionLoaderMixin File "", line 1075, in _handle_fromlist File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 801, in __getattr__ module = self._get_module(self._class_to_module[name]) File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 813, in _get_module raise RuntimeError( RuntimeError: Failed to import diffusers.loaders.lora_pipeline because of the following error (look up to see its traceback): cannot import name 'EncoderDecoderCache' from 'transformers' (C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\transformers\__init__.py) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\AIGen\instant_id_v19\InstantID\gradio_demo\web-ui-multicontrolnet.py", line 4, in from diffusers import StableDiffusionPipeline File "", line 1075, in _handle_fromlist File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 802, in __getattr__ value = getattr(module, name) File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 802, in __getattr__ value = getattr(module, name) File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 801, in __getattr__ module = self._get_module(self._class_to_module[name]) File "C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\diffusers\utils\import_utils.py", line 813, in _get_module raise RuntimeError( RuntimeError: Failed to import diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion because of the following error (look up to see its traceback): Failed to import diffusers.loaders.lora_pipeline because of the following error (look up to see its traceback): cannot import name 'EncoderDecoderCache' from 'transformers' (C:\AIGen\instant_id_v19\InstantID\venv\lib\site-packages\transformers\__init__.py) Press any key to continue . . .

SECourses

hi it is not used anymore. also why do you want v19? this one is better. if you want older controlnets you can still look what v19 downloads, download them and it should work

Huey

Yes, I downloaded v19 and previous versions as well but they all gave errors. It seems that all previous versions have errors after version 24

Huey

Is it possible to implement new and old controlnets in next new updated versions?

Huey

Runpod has the same errors when running v19: downloading model files Directory created: checkpoints 100%|█████████████████████████████████████████████████████████████████████████████████████████████| 1.69G/1.69G [00:40<00:00, 41.7MiB/s] Downloaded ip-adapter.bin to checkpoints Directory created: checkpoints/ControlNetModel 100%|█████████████████████████████████████████████████████████████████████████████████████████████| 2.50G/2.50G [01:12<00:00, 34.4MiB/s] Downloaded diffusion_pytorch_model.safetensors to checkpoints/ControlNetModel 100%|█████████████████████████████████████████████████████████████████████████████████████████████| 1.38k/1.38k [00:00<00:00, 46.6kiB/s] Downloaded config.json to checkpoints/ControlNetModel Directory created: models/antelopev2 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 144M/144M [00:03<00:00, 41.7MiB/s] Downloaded 1k3d68.onnx to models/antelopev2 100%|█████████████████████████████████████████████████████████████████████████████████████████████| 5.03M/5.03M [00:00<00:00, 27.2MiB/s] Downloaded 2d106det.onnx to models/antelopev2 100%|█████████████████████████████████████████████████████████████████████████████████████████████| 1.32M/1.32M [00:00<00:00, 12.6MiB/s] Downloaded genderage.onnx to models/antelopev2 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 261M/261M [00:06<00:00, 41.4MiB/s] Downloaded glintr100.onnx to models/antelopev2 100%|█████████████████████████████████████████████████████████████████████████████████████████████| 16.9M/16.9M [00:00<00:00, 33.6MiB/s] Downloaded scrfd_10g_bnkps.onnx to models/antelopev2 Virtual environment made and installed properly root@21ec2b8722f5:/workspace# export HF_root@21ec2b8722f5:/workspace# export HF_HOME="/workspace"/workspace" root@21ec2b8722f5:/workspace# export PYTHONWARNINGS="ignore" root@21ec2b8722f5:/workspace# export CUDA_VISIBLE_DEVICES=0 root@21ec2b8722f5:/workspace# cd /workspace/InstantID root@21ec2b8722f5:/workspace/InstantID# source venv/bin/activate (venv) root@21ec2b8722f5:/workspace/InstantID# python gradio_demo/web-ui-multicontrolnet.py --share The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`. 0it [00:00, ?it/s] WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.3.0+cu121 with CUDA 1201 (you have 2.5.0+cu124) Python 3.10.14 (you have 3.10.12) Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers) Memory-efficient attention, SwiGLU, sparse and more won't be available. Set XFORMERS_MORE_DETAILS=1 for more details Traceback (most recent call last): File "/workspace/InstantID/venv/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 811, in _get_module return importlib.import_module("." + module_name, self.__name__) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/workspace/InstantID/venv/lib/python3.10/site-packages/diffusers/loaders/ip_adapter.py", line 41, in from ..models.attention_processor import ( File "/workspace/InstantID/venv/lib/python3.10/site-packages/diffusers/models/attention_processor.py", line 35, in import xformers.ops File "/workspace/InstantID/venv/lib/python3.10/site-packages/xformers/ops/__init__.py", line 8, in from .fmha import ( File "/workspace/InstantID/venv/lib/python3.10/site-packages/xformers/ops/fmha/__init__.py", line 10, in from . import ( File "/workspace/InstantID/venv/lib/python3.10/site-packages/xformers/ops/fmha/triton_splitk.py", line 548, in _get_splitk_kernel(num_groups) File "/workspace/InstantID/venv/lib/python3.10/site-packages/xformers/ops/fmha/triton_splitk.py", line 503, in _get_splitk_kernel _fwd_kernel_splitK_unrolled = unroll_varargs(_fwd_kernel_splitK, N=num_groups) File "/workspace/InstantID/venv/lib/python3.10/site-packages/xformers/triton/vararg_kernel.py", line 166, in unroll_varargs jitted_fn = triton.jit(fn) File "/workspace/InstantID/venv/lib/python3.10/site-packages/triton/runtime/jit.py", line 882, in jit return decorator(fn) File "/workspace/InstantID/venv/lib/python3.10/site-packages/triton/runtime/jit.py", line 871, in decorator return JITFunction( File "/workspace/InstantID/venv/lib/python3.10/site-packages/triton/runtime/jit.py", line 717, in __init__ self.src = self.src[re.search(r"^def\s+\w+\s*\(", self.src, re.MULTILINE).start():] AttributeError: 'NoneType' object has no attribute 'start' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/workspace/InstantID/venv/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 811, in _get_module return importlib.import_module("." + module_name, self.__name__) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/workspace/InstantID/venv/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py", line 24, in from ...loaders import FromSingleFileMixin, IPAdapterMixin, StableDiffusionLoraLoaderMixin, TextualInversionLoaderMixin File "", line 1075, in _handle_fromlist File "/workspace/InstantID/venv/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 801, in __getattr__ module = self._get_module(self._class_to_module[name]) File "/workspace/InstantID/venv/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 813, in _get_module raise RuntimeError( RuntimeError: Failed to import diffusers.loaders.ip_adapter because of the following error (look up to see its traceback): 'NoneType' object has no attribute 'start' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/workspace/InstantID/gradio_demo/web-ui-multicontrolnet.py", line 4, in from diffusers import StableDiffusionPipeline File "", line 1075, in _handle_fromlist File "/workspace/InstantID/venv/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 802, in __getattr__ value = getattr(module, name) File "/workspace/InstantID/venv/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 802, in __getattr__ value = getattr(module, name) File "/workspace/InstantID/venv/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 801, in __getattr__ module = self._get_module(self._class_to_module[name]) File "/workspace/InstantID/venv/lib/python3.10/site-packages/diffusers/utils/import_utils.py", line 813, in _get_module raise RuntimeError( RuntimeError: Failed to import diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion because of the following error (look up to see its traceback): Failed to import diffusers.loaders.ip_adapter because of the following error (look up to see its traceback): 'NoneType' object has no attribute 'start' (venv) root@21ec2b8722f5:/workspace/InstantID#

SECourses

try install v24 and download v19 models. i may add them later maybe

Huey

Thank you!

SECourses

instant_id_v25.zip has the new downloader just added for you

Philip Heggie

I installed it not using conda and to do images i created a 1 sec mp4 repeated frames that worked but created a g frame video that failed so i don't know how it will work with single images

Philip Heggie

should have said but created a 6 frame video that failed so i don't know how it will work with single images

Philip Heggie

It also outputs everything as 512x512 doesn't handle small faces very well.

Ahmet Inceelli

Hello, I have RTX 4060 . Installation is ok. But I got the error below when I run it. Modify this file and add --share if you want Gradio share Options VRAM usages are as below. No controlnet or LoRA used so these are min requirements 1+1 = 13 GB, 1+2 = 10 GB , 1+3 = 8.5 GB, 2+1 = 10.5 GB, 2+2 = 8.2 GB , 2+3 = 6.9 GB Please select an option: 1. Default - Faster but higher VRAM 2. Enable CPU Offloading - Reduces VRAM but changes output. I would avoid if possible Enter your choice (1-2): 2 Please select an option: 1. Default Precision (Half BF16-FP16) - Higher quality higher VRAM 2. FP8 Precision - Slightly lower quality medium VRAM 3. FP4 Precision - More slightly lower quality lower VRAM Enter your choice (1-3): 3 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: ./models\antelopev2\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: ./models\antelopev2\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: ./models\antelopev2\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: ./models\antelopev2\glintr100.onnx recognition ['None', 3, 112, 112] 127.5 127.5 Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: ./models\antelopev2\scrfd_10g_bnkps.onnx detection [1, 3, '?', '?'] 127.5 128.0 set det-size: (640, 640) Config list: ['Best Realism', 'Default', 'Pro Headshot'] Latest config: Default INFO: Could not find files for the given pattern(s). * Running on local URL: http://127.0.0.1:7860 To create a public link, set `share=True` in `launch()`. No model selected or inputted. Default model will be used. Loading model: wangqixun/YamerMIX_v8 The config attributes {'controlnet_list': ['controlnet', 'RPMultiControlNetModel'], 'force_zeros_for_empty_prompt': True, 'requires_aesthetics_score': False, 'text_encoder_2': ['transformers', 'CLIPTextModelWithProjection'], 'tokenizer_2':['transformers', 'CLIPTokenizer']} were passed to StableDiffusionPipeline, but are not expected and will be ignored. Please verify your model_index.json configuration file. Keyword arguments {'controlnet_list': ['controlnet', 'RPMultiControlNetModel'], 'force_zeros_for_empty_prompt': True, 'requires_aesthetics_score': False, 'text_encoder_2': ['transformers', 'CLIPTextModelWithProjection'], 'tokenizer_2': ['transformers', 'CLIPTokenizer']} are not expected by StableDiffusionPipeline and will be ignored. Loading pipeline components...: 40%|███████████████████▌ | 2/5 [00:14<00:21, 7.31s/steps] Traceback (most recent call last): File "E:\instant_id_v25\InstantID\venv\lib\site-packages\gradio\queueing.py", line 625, in process_events response = await route_utils.call_process_api( File "E:\instant_id_v25\InstantID\venv\lib\site-packages\gradio\route_utils.py", line 322, in call_process_api output = await app.get_blocks().process_api( File "E:\instant_id_v25\InstantID\venv\lib\site-packages\gradio\blocks.py", line 2042, in process_api result = await self.call_function( File "E:\instant_id_v25\InstantID\venv\lib\site-packages\gradio\blocks.py", line 1589, in call_function prediction = await anyio.to_thread.run_sync( # type: ignore File "E:\instant_id_v25\InstantID\venv\lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "E:\instant_id_v25\InstantID\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 2461, in run_sync_in_worker_thread return await future File "E:\instant_id_v25\InstantID\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 962, in run result = context.run(func, *args) File "E:\instant_id_v25\InstantID\venv\lib\site-packages\gradio\utils.py", line 883, in wrapper response = f(*args, **kwargs) File "E:\instant_id_v25\InstantID\gradio_demo\web-ui-multicontrolnet.py", line 975, in generate_image reload_pipe(model_input, model_dropdown, scheduler, adapter_strength_ratio, enable_LCM, depth_type, lora_model_dropdown, lora_scale,test_all_loras,single_lora) File "E:\instant_id_v25\InstantID\gradio_demo\web-ui-multicontrolnet.py", line 654, in reload_pipe pipe = load_model(_pretrained_model_folder, model_to_load) File "E:\instant_id_v25\InstantID\gradio_demo\web-ui-multicontrolnet.py", line 528, in load_model pipeline = StableDiffusionPipeline.from_pretrained( File "E:\instant_id_v25\InstantID\venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn return fn(*args, **kwargs) File "E:\instant_id_v25\InstantID\venv\lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 896, in from_pretrained loaded_sub_model = load_sub_model( File "E:\instant_id_v25\InstantID\venv\lib\site-packages\diffusers\pipelines\pipeline_loading_utils.py", line 704, inload_sub_model loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs) File "E:\instant_id_v25\InstantID\venv\lib\site-packages\transformers\modeling_utils.py", line 4070, in from_pretrained dtype_orig = cls._set_default_torch_dtype(torch_dtype) File "E:\instant_id_v25\InstantID\venv\lib\site-packages\transformers\modeling_utils.py", line 1643, in _set_default_torch_dtype torch.set_default_dtype(dtype) File "E:\instant_id_v25\InstantID\venv\lib\site-packages\torch\__init__.py", line 1198, in set_default_dtype _C._set_default_dtype(d) TypeError: couldn't find storage object Float8_e4m3fnStorage

SECourses

try this. if you cant make i can try via connecting your pc tomorrow activate your venv pip uninstall insightface --yes pip install insightface and let me know results. make sure you have activated venv i am installing pre-compiled insightface and i wonder if that is the error

SECourses

also download SDXL base model and use model i think downloading wangqixun/YamerMIX_v8 into your cache could be broken. so download sdlx base. we have model downloader tab use it

Ahmet Inceelli

Nope. I tried but it didn't work. Still same error I got.

SECourses

message me from discord i can connect your pc and check out - install google remote desktop

lp

Hello, I'm currently trying to run your InstantID setup on a Windows machine equipped with a NVIDIA RTX 5090 (CUDA capability sm_120) and encountered multiple critical issues related to CUDA and library compatibility: Main Problems: PyTorch CUDA incompatibility PyTorch versions like 2.5.1+cu121 do not include compiled support for the sm_120 architecture required by RTX 5090. This results in errors like: no kernel image is available for execution on the device, Warning: failed to find cuda. Wrong nightly torch version Attempting to use PyTorch 2.7.1 (nightly) resolves the sm_120 issue, but causes major compatibility errors with: torchvision==0.20.1+cu121 torchaudio==2.5.1+cu121 → leading to conflicting installations and broken CUDA support. diffusers/transformers mismatch The following runtime error occurs during app launch: Could not import module 'AutoImageProcessor' Failed to import diffusers.models.controlnet This is due to version mismatches between diffusers, transformers, and the script requirements.

SECourses

yes i need to update installer. will update tomorrow hopefully. just saw your message.

Anshul Gupta

But there is no list of Lora models in this installation. i mean to say lora model is not available to select.

SECourses

you dont need lora. it is optional. any SDXL lora can be used