search
HomeTechnology peripheralsAIThe once popular InstantID has a new way to play: stylized image generation, which has been open source

InstantID The original team launched InstantStyle, a new method of style migration.

Stylized image generation is often called style transfer, and its goal is to generate images that are consistent in style with the reference image and consistent with the original image content. This technology is based on diffusion methods (such as LoRA) for batch training of the same style data and cannot be migrated to new styles. Or based on inversion operations (such as StyleAlign), by restoring the style image to latent noise, the K and V obtained by forward propagation are used to replace the style image in generation. This method often degrades the generation style due to the inversion operation.

Recently, the original team of InstantID launched InstantStyle, a new method of style migration. Unlike Face ID, it is a general image style injection framework that uses two simple but very effective techniques to achieve effective separation of style and content from reference images. This method provides a simple but very effective technique to achieve effective separation of style and content from the reference image, thus achieving an effective fusion of style and content.

曾爆火的 InstantID又有了新玩法:风格化图像生成,已开源

  • Thesis: InstantStyle: Free Lunch towards Style-Preserving in Text-to-Image Generation

  • Paper address: https://huggingface.co/papers/2404.02733

  • Project homepage: https://instantstyle.github.io/

  • Code link: https://github.com/InstantStyle/InstantStyle

  • Demo address: https://huggingface.co/spaces/InstantX/InstantStyle

曾爆火的 InstantID又有了新玩法:风格化图像生成,已开源

As a motivation for automatic introduction, (1) First of all, style is undefined and there is no clear standard to define it. It includes many elements, such as color, atmosphere, material , layout, etc., even with manual evaluation, it is difficult to reach a unified conclusion; (2) The previous inversion-based method will produce obvious style degradation, which is unacceptable for some styles, such as texture; (3) Image style Injection, the most critical issue is how to balance the intensity of style injection and the content leakage of the reference image.

曾爆火的 InstantID又有了新玩法:风格化图像生成,已开源

In this regard, the author's team conducted a series of experimental analyses. They found that the problems of IP-Adapter were obviously exaggerated by many other methods. The author only manually adjusted the image The weight of feature injection solves the content leakage problem claimed in most papers. Nonetheless, in some cases it is still difficult for the IP-Adapter to find a suitable threshold to balance. Since the current Adapter-based methods generally use CLIP to extract image features, the author confirmed through the example of image retrieval that in the CLIP feature space, the features of images and text can be added and subtracted. The answer is obvious, why not display it before injecting it into the network? How to decouple content and style from image features by subtracting content information that may be leaked?

Finally, inspired by the B-LoRA method, the author carefully analyzed the effect of IP-Adapter injection at each layer, and was surprised to find that there are two independent layers that respond to style and spatial layout information respectively. To this end, the authors introduce the proposed method.

Method introduction

Based on the above observations and experiments, the author proposed the InstantStyle method, as shown in the figure. The core of this method contains two modules:

曾爆火的 InstantID又有了新玩法:风格化图像生成,已开源

(1) Feature subtraction: Use the idle characteristics of CLIP to explicitly perform feature subtraction, remove the content information in the image features, and reduce the impact of the reference image content on the generated image. Compared with the underdetermination of style, content information is often easy to describe simply through text, so CLIP's text encoder can be used to extract content features for decoupling.

(2) Style layer injection only: Feature injection is only completed in a specific style layer, implicitly achieving decoupling of style and content. Near the mid block of UNet, the author discovered two specific layers that control style and spatial layout respectively, and found that in some styles, spatial layout may also be a type of style.

Overall, the idea of ​​InstantStyle is quite simple and easy to understand. With just a few lines of code, it alleviates the most troublesome content leakage problem in style migration.

Experimental results

The author shows the generation results of two strategies in the article. These two strategies are not limited to specific models and can be used separately and independently. Both are implemented. Excellent results.

Result of feature subtraction:

曾爆火的 InstantID又有了新玩法:风格化图像生成,已开源

Only style layer injection:

曾爆火的 InstantID又有了新玩法:风格化图像生成,已开源

曾爆火的 InstantID又有了新玩法:风格化图像生成,已开源

Comparison with the current leading method:

曾爆火的 InstantID又有了新玩法:风格化图像生成,已开源

Stylization based on the original image:

曾爆火的 InstantID又有了新玩法:风格化图像生成,已开源

Community gameplay

InstantStyle Rich code implementations have been provided, and developers can find them directly through GitHub, including Wenshengtu, Tushengtu and Inpainting. Recently, it has also been used as a recommended stylization tool by the video generation project AnyV2V. For community users, InstantStyle also natively supports ComfyUI (the author of this node is also a co-author of InstantStyle), and users can quickly try it by updating the IP-Adapter node.

曾爆火的 InstantID又有了新玩法:风格化图像生成,已开源

As the author of InstantID, how come we are not co-branded with InstantID? Compared to InstantID which only uses text to control the generated style, InstantStyle can undoubtedly make the style more diverse. The author team will officially support the face stylization function after the GitHub star reaches 1,000.

曾爆火的 InstantID又有了新玩法:风格化图像生成,已开源

#The author also officially supports Huggingface Demo and can be tried online.

曾爆火的 InstantID又有了新玩法:风格化图像生成,已开源

The above is the detailed content of The once popular InstantID has a new way to play: stylized image generation, which has been open source. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:机器之心. If there is any infringement, please contact admin@php.cn delete
How to Build Your Personal AI Assistant with Huggingface SmolLMHow to Build Your Personal AI Assistant with Huggingface SmolLMApr 18, 2025 am 11:52 AM

Harness the Power of On-Device AI: Building a Personal Chatbot CLI In the recent past, the concept of a personal AI assistant seemed like science fiction. Imagine Alex, a tech enthusiast, dreaming of a smart, local AI companion—one that doesn't rely

AI For Mental Health Gets Attentively Analyzed Via Exciting New Initiative At Stanford UniversityAI For Mental Health Gets Attentively Analyzed Via Exciting New Initiative At Stanford UniversityApr 18, 2025 am 11:49 AM

Their inaugural launch of AI4MH took place on April 15, 2025, and luminary Dr. Tom Insel, M.D., famed psychiatrist and neuroscientist, served as the kick-off speaker. Dr. Insel is renowned for his outstanding work in mental health research and techno

The 2025 WNBA Draft Class Enters A League Growing And Fighting Online HarassmentThe 2025 WNBA Draft Class Enters A League Growing And Fighting Online HarassmentApr 18, 2025 am 11:44 AM

"We want to ensure that the WNBA remains a space where everyone, players, fans and corporate partners, feel safe, valued and empowered," Engelbert stated, addressing what has become one of women's sports' most damaging challenges. The anno

Comprehensive Guide to Python Built-in Data Structures - Analytics VidhyaComprehensive Guide to Python Built-in Data Structures - Analytics VidhyaApr 18, 2025 am 11:43 AM

Introduction Python excels as a programming language, particularly in data science and generative AI. Efficient data manipulation (storage, management, and access) is crucial when dealing with large datasets. We've previously covered numbers and st

First Impressions From OpenAI's New Models Compared To AlternativesFirst Impressions From OpenAI's New Models Compared To AlternativesApr 18, 2025 am 11:41 AM

Before diving in, an important caveat: AI performance is non-deterministic and highly use-case specific. In simpler terms, Your Mileage May Vary. Don't take this (or any other) article as the final word—instead, test these models on your own scenario

AI Portfolio | How to Build a Portfolio for an AI Career?AI Portfolio | How to Build a Portfolio for an AI Career?Apr 18, 2025 am 11:40 AM

Building a Standout AI/ML Portfolio: A Guide for Beginners and Professionals Creating a compelling portfolio is crucial for securing roles in artificial intelligence (AI) and machine learning (ML). This guide provides advice for building a portfolio

What Agentic AI Could Mean For Security OperationsWhat Agentic AI Could Mean For Security OperationsApr 18, 2025 am 11:36 AM

The result? Burnout, inefficiency, and a widening gap between detection and action. None of this should come as a shock to anyone who works in cybersecurity. The promise of agentic AI has emerged as a potential turning point, though. This new class

Google Versus OpenAI: The AI Fight For StudentsGoogle Versus OpenAI: The AI Fight For StudentsApr 18, 2025 am 11:31 AM

Immediate Impact versus Long-Term Partnership? Two weeks ago OpenAI stepped forward with a powerful short-term offer, granting U.S. and Canadian college students free access to ChatGPT Plus through the end of May 2025. This tool includes GPT‑4o, an a

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor