Technology Sharing

AI painting Stable Diffusion: Super InstantID plug-in - facial feature consistency style maintenance and migration, easy to handle private photo photography, SDWebUI usage guide

2024-07-12

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

Hello everyone, I am designer Awei

Recently, students often ask about AI painting Stable Diffusion and style transferIPAInstant IDThe installation and usage methods are basic but also common tools. Therefore, this article will focus onInstant ID Use andMoyou Artificial Human XLExperience (This is a realistic photography model that can be used for commercial purposes).

Instant ID It is an innovativeStyle preservation and transfer method without adjustment, can be combined ControlNet andIP-Adapter To control the style transfer of facial features during the diffusion process.Instant ID A unique design is toIP-AdapterThe projected face embedding is passed as the cross-attention input to ControlNet unet, instead of using the normal method:ControlNet unetThe cross-attention input is the text embedding of the prompt. As shown in the figure below:

Instant ID plugin installation

Instant IDInstallation requires upgrading the correspondingsd-webui-controlnetPlug-in, the corresponding version is not less thanv1.1.438(Please see the scan below to get the plug-in installation package for plug-in download)

Model Download

Then download the corresponding model and place it in stable-diffusion-webui/models/ControlNet The model needs to be renamedip-adapter_instant_id_sdxl.bin andcontrol_instant_id_sdxl.safetensors, so that the plugin can correctly identify the two models

  • IP-Adapter Model:https://huggingface.co/InstantX/InstantID/resolve/main/ip-adapter.bin?download=true

  • ControlNet Model:https://huggingface.co/InstantX/InstantID/resolve/main/ControlNetModel/diffusion_pytorch_model.safetensors?download=true

    Note: This link requires scientific Internet access. If you cannot download and install it, please scan it to get it for free.

Instant ID usage

Use in SD-WebUIInstantIDThe plugin needs to set up two models. And, it is important to remember that you should always ipadapter The model is always set to the first model becauseControlNet The model needs to receiveipadapter The output of the model serves as the subsequent input.

Unit 0 Settings

exist ControlNet Before you can set the unitip-adapter unitIP-Adapter The facial embedding output by the unit will be used as the nextControlNet One of the inputs to the unit.

Unit 1 Setup

ControlNet The unit accepts a keypoint map containing 5 keypoints of the face, so you need to use the keypoints option in Unit 1. You can use the same facial keypoints of the person as in Unit 0, or you can use a different facial image as input.

In addition, it is recommended in the official documentation to set CFG to 4~5 for best results. It is also mentioned that this number may vary depending on the sampling method and the base model, but generally a slightly lower CFG ratio is required than a normal CFG. It is also mentioned that if the width x height is set to 1024*1024, there is a higher chance of generating watermarks and logos. This cannot be corrected by adding the logo watermark keyword in the negative prompt. This problem can be avoided by setting other width x height values.

Instant ID Experience

In this sectionUsing drawing configurationfor:

  • Drawing Model:Moyou Artificial Human XL

  • Iterations: 30

  • CFG:5

  • Resolution: 888*1280

01. Blue Photo

Drawing Model:Moyou Artificial Human XL Model

woman,moyou, solo, on side, dress, lying, black hair, blue dress, snow, blue eyes, blue theme, looking at viewer, bare shoulders, lips, hair ornament, bare arms, A Beautiful Chinese Woman, lora:DetailedEyes_XL_v3.0:1, lora:add-detail-xl:1,

02. Light and shadow photography

Drawing Model:Moyou Artificial Human XL Model

chinese women,tan lines,deep photo,depth of field,Superia 400,shadows,messy hair,perfect face and body,dark,nighttime,dark photo,grainy,seductive smirk,((eyes closed)), lora:DetailedEyes_XL_v3.0:1, lora:add-detail-xl:1,

03. Underwater Photography

Drawing Model:Moyou Artificial Human XL Model

(masterpiece,best quality, ultra realistic,32k,RAW photo,detail skin, 8k uhd, dslr,high quality, film grain:1.5),close up portrait of a cute woman bathing in a river,(backlighting),lens flare,shade,bloom,[[chromatic aberration]],by Jeremy Lipking,by Antonio J. Manzanedo,digital painting, lora:DetailedEyes_XL_v3.0:1, lora:add-detail-xl:1, <lora:HK film style XL:1>

04. Anime Hong Kong style

Drawing Model:Dream Anime XL | Dream Anime XL Model

HK film style, close-up shot back view of an attractive woman wearing pink dress standing in front of a neon sign, neon orange lighting, in the style of Wong Kar Wai film, award-winning picture, highly detailed, ultra-high resolutions, 32K UHD, best quality, masterpiece, lora:DetailedEyes_XL_v3.0:1, lora:add-detail-xl:1, <lora:HK film style XL:1>

05. Neon Anime

Drawing Model:Dream Anime XL | Dream Anime XL Model

HK film style,close-up shot side view of an attractive woman with glasses wearing black knitted crewneck leaning against the wall standing in front of a neon sign,neon red lighting,in the style of Wong Kar Wai film,award-winning picture,highly detailed,ultra-high resolutions,32K UHD,best quality,masterpiece, lora:DetailedEyes_XL_v3.0:1, lora:add-detail-xl:1, <lora:HK film style XL:1>

06. Hong Kong Style Animation-Bar

Drawing Model:Dream Anime XL | Dream Anime XL Model

HK film style, an attractive woman wearing fashion outfit sitting at a table inside a bar, her head leaning against her arm, gradient red-orange and blue neon lighting, dark environment, in the style of Wong Kar Wai film, award-winning picture, highly detailed, ultra-high resolutions, 32K UHD, best quality, masterpiece,  <lora:ip-adapter-faceid-plusv2_sdxl_lora:0.8>, <lora:DetailedEyes_XL_v3.0:1>, <lora:add-detail-xl:1>, <lora:HK film style XL:1>
  • 1

For those who are interested, we will give you a full set of AIGC learning materials, including cutting-edge technology tutorials and software tools such as AI painting and AI artificial intelligence. Please see here for details.

The future development prospects of AIGC technology are broad. With the continuous development of artificial intelligence technology, AIGC technology will continue to improve. In the future, AIGC technology will be more widely used in the fields of games and computing, making games and computing systems more efficient, smarter and more flexible. At the same time, AIGC technology will also be closely integrated with artificial intelligence technology and widely used in more fields, which is of great importance to programmers. In the future, AIGC technology will continue to improve, and will also be closely integrated with artificial intelligence technology and widely used in more fields.

insert image description here

1. Learning routes for all directions of AIGC

AIGC organizes the technical points of all directions to form a summary of knowledge points in various fields. Its usefulness lies in that you can find corresponding learning resources according to the following knowledge points to ensure that you learn more comprehensively.

insert image description here

insert image description here

II. AIGC Essential Tools

The tools are all organized for you, you can install them and get started right away!
insert image description here

3. Latest AIGC study notes

When I have learned a certain basic knowledge and have my own understanding ability, I will read some books or handwritten notes compiled by my predecessors. These notes record in detail their understanding of some technical points. These understandings are quite unique and I can learn different ways of thinking.
insert image description here
insert image description here

4. AIGC video tutorial collection

Watch comprehensive zero-based learning videos. Watching videos to learn is the fastest and most effective way. Following the teacher's ideas in the video, from basics to in-depth, it is still very easy to get started.

insert image description here

5. Practical Cases

Knowledge gained from books is always shallow. You need to learn to type along with the video and practice it yourself to apply what you have learned in practice. At this time, you can learn from some actual cases.
insert image description here

If there is any infringement, please contact us to delete it