Comfyui portrait photography tutorial, AI drawing to achieve the perfect blend of light and shadow characters background

I. Basic introduction

LBM relighting, as a tool for AI image relighting, only requires you to provide a picture of the subject and a picture of the environment, and it can relight the subject according to the light source on the environment picture, which can really achieve the perfect integration of the character and the background, and also 100% retain the original picture quality.

The picture below shows the actual results from my run (specifically)Workflow(See end of text).

Comfyui portrait photography tutorial, AI drawing to achieve the perfect blend of light and shadow characters background

Here are a few sample lighting effects from the official website, with very good integration of light sources and objects.

Comfyui portrait photography tutorial, AI drawing to achieve the perfect blend of light and shadow characters background

Project address: https://github.com/gojasper/LBM

Use the address online:

https://huggingface.co/spaces/jasperai/LBM_relighting

Here you are allowed to upload a picture of the subject that needs to be re-lighted and then an environment picture. If you don't have an environment image, you can also choose one yourself from the environment images provided by the system.

Comfyui portrait photography tutorial, AI drawing to achieve the perfect blend of light and shadow characters background

Comfyui portrait photography tutorial, AI drawing to achieve the perfect blend of light and shadow characters background

Two,ComfyUIMethods of use in

1、Install the plug-in: ComfyUI-LBMWrapper

Plugin Address:

https://github.com/kijai/ComfyUI-LBMWrapper

See the article for details on how to install the plugin:

The secret to making ComfyUI do everything: how to customize nodes! AI Painting, ComfyUI Tutorials, Installing Custom Nodes

Comfyui portrait photography tutorial, AI drawing to achieve the perfect blend of light and shadow characters background

2. Installation model

After the plugin is installed, you still need to install a model file

Comfyui portrait photography tutorial, AI drawing to achieve the perfect blend of light and shadow characters background

Model Placement Location:

ComfyUI/models/diffusion_models

Model Link:

https://huggingface.co/jasperai/LBM_relighting/resolve/main/model.safetensors

III. Workflow explanation:

I've divided the workflow into 5 sections.

1. Image loading area

Here you need to load two images, the top image is the main image, which is the one that needs to be re-lighted, and the bottom one is the lighted image.

2、Size control area

The main effect is to unify the two image sizes, it will make the size of the light image forcibly match the size of the main image.

3. Keying area

Keys out the subject of the main image and adapts the lighting effects of the lighted image.

For more information on the use of keying workflows, see the article:

One-click AI keying, ComfyUi-RMBG's strongest background removal plug-in, easy to use, hair strands can also be keyed cleanly!

4、LBM_relighting重新打光区

Don't be careful to use the model we downloaded above.

5. Image output area

Two images are output here, the top one is the effect of hard compositing the keyed out subject with the lighted image.

It's the one below that shows the effect after re-lighting the subject.

Comfyui portrait photography tutorial, AI drawing to achieve the perfect blend of light and shadow characters background

Enlarged size for comparison. (The top one shows the effect of hard compositing, and the bottom one shows the effect after re-lighting)

Comfyui portrait photography tutorial, AI drawing to achieve the perfect blend of light and shadow characters background

We tested it again with the same lighted image and portrait, and the results were good (hard composite effect above, re-lighting below)

Comfyui portrait photography tutorial, AI drawing to achieve the perfect blend of light and shadow characters background

Replacing the characters and also replacing the lighting effects to generate another one works well.

Comfyui portrait photography tutorial, AI drawing to achieve the perfect blend of light and shadow characters background

Interested students can test the free online workflow below or download the workflow locally for testing.

Free online workflow:

https://www.runninghub.cn/post/1934254001959690242

statement:The content of the source of public various media platforms, if the inclusion of the content violates your rights and interests, please contact the mailbox, this site will be the first time to deal with.
TutorialEncyclopedia

VEO 3 video generation instruction and account the latest way to get (including white john strategy), Google VEO 3 guide to use

2025-6-21 12:30:57

TutorialEncyclopedia

Buckle Coze real-world MCP tutorial, one-click generation of public articles, automatic layout, automatic publishing

2025-6-22 9:24:01

Search