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).

0d4ef4aag00sxzfmh0780d000rs00jim

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

55879699j00sxzfmi00lwd000u000bym

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.

b0d6f930j00sxzfmi00jed000u000n1m

e251a452j00sxzfmh00gid000u000f7m

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

358d2be2j00sxzfmh004yd000u000jum

2. Installation model

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

93b37b93j00sxzfmi00ggd000u000nhm

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!

Four, 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.

5e47a099j00sxzfmh00f4d000u000eem

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

f107d062j00sxzfmj01f5d000o800yqm

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

9a60dd7dj00sxzfmj01czd000ob00xfm

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

efed0925j00sxzfmk01m1d000u00105m

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

Zenium
Search