{"id":37628,"date":"2025-06-22T09:11:26","date_gmt":"2025-06-22T01:11:26","guid":{"rendered":"https:\/\/www.1ai.net\/?p=37628"},"modified":"2025-06-17T12:20:00","modified_gmt":"2025-06-17T04:20:00","slug":"comfyui%e4%ba%ba%e5%83%8f%e6%91%84%e5%bd%b1%e6%95%99%e7%a8%8b%ef%bc%8cai%e7%bb%98%e5%9b%be%e5%ae%9e%e7%8e%b0%e5%85%89%e5%bd%b1%e4%ba%ba%e7%89%a9%e8%83%8c%e6%99%af%e5%ae%8c%e7%be%8e%e8%9e%8d%e5%90%88","status":"publish","type":"post","link":"https:\/\/www.1ai.net\/en\/37628.html","title":{"rendered":"Comfyui portrait photography tutorial, AI drawing to achieve the perfect blend of light and shadow characters background"},"content":{"rendered":"<p>I. Basic introduction<\/p>\n<p>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.<\/p>\n<p>The picture below shows the actual results from my run (specifically)<a href=\"https:\/\/www.1ai.net\/en\/tag\/%e5%b7%a5%e4%bd%9c%e6%b5%81\" title=\"_Other Organiser\" target=\"_blank\" >Workflow<\/a>(See end of text).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-37633\" title=\"0d4ef4aag00sxzfmh0780d000rs00jim\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/06\/0d4ef4aag00sxzfmh0780d000rs00jim.gif\" alt=\"0d4ef4aag00sxzfmh0780d000rs00jim\" width=\"1000\" height=\"702\" \/><\/p>\n<p>Here are a few sample lighting effects from the official website, with very good integration of light sources and objects.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-37631\" title=\"55879699j00sxzfmi00lwd000u000bym\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/06\/55879699j00sxzfmi00lwd000u000bym.jpg\" alt=\"55879699j00sxzfmi00lwd000u000bym\" width=\"1080\" height=\"430\" \/><\/p>\n<p>Project address: https:\/\/github.com\/gojasper\/LBM<\/p>\n<p>Use the address online:<\/p>\n<p>https:\/\/huggingface.co\/spaces\/jasperai\/LBM_relighting<\/p>\n<p>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.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-37630\" title=\"b0d6f930j00sxzfmi00jed000u000n1m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/06\/b0d6f930j00sxzfmi00jed000u000n1m.jpg\" alt=\"b0d6f930j00sxzfmi00jed000u000n1m\" width=\"1080\" height=\"829\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-37632\" title=\"e251a452j00sxzfmh00gid000u000f7m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/06\/e251a452j00sxzfmh00gid000u000f7m.jpg\" alt=\"e251a452j00sxzfmh00gid000u000f7m\" width=\"1080\" height=\"547\" \/><\/p>\n<p>Two,<a href=\"https:\/\/www.1ai.net\/en\/tag\/comfyui\" title=\"_Other Organiser\" target=\"_blank\" >ComfyUI<\/a>Methods of use in<\/p>\n<p>1\u3001Install the plug-in: ComfyUI-LBMWrapper<\/p>\n<p>Plugin Address:<\/p>\n<p>https:\/\/github.com\/kijai\/ComfyUI-LBMWrapper<\/p>\n<p>See the article for details on how to install the plugin:<\/p>\n<p><a href=\"https:\/\/www.1ai.net\/en\/37613.html\/\">The secret to making ComfyUI do everything: how to customize nodes! AI Painting, ComfyUI Tutorials, Installing Custom Nodes<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-37629\" title=\"358d2be2j00sxzfmh004yd000u000jum\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/06\/358d2be2j00sxzfmh004yd000u000jum.jpg\" alt=\"358d2be2j00sxzfmh004yd000u000jum\" width=\"1080\" height=\"714\" \/><\/p>\n<p>2. Installation model<\/p>\n<p>After the plugin is installed, you still need to install a model file<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-37634\" title=\"93b37b93j00sxzfmi00ggd000u000nhm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/06\/93b37b93j00sxzfmi00ggd000u000nhm.jpg\" alt=\"93b37b93j00sxzfmi00ggd000u000nhm\" width=\"1080\" height=\"845\" \/><\/p>\n<p>Model Placement Location:<\/p>\n<p>ComfyUI\/models\/diffusion_models<\/p>\n<p>Model Link:<\/p>\n<p>https:\/\/huggingface.co\/jasperai\/LBM_relighting\/resolve\/main\/model.safetensors<\/p>\n<p>III. Workflow explanation:<\/p>\n<p>I've divided the workflow into 5 sections.<\/p>\n<p>1. Image loading area<\/p>\n<p>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.<\/p>\n<p>2\u3001Size control area<\/p>\n<p>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.<\/p>\n<p>3. Keying area<\/p>\n<p>Keys out the subject of the main image and adapts the lighting effects of the lighted image.<\/p>\n<p>For more information on the use of keying workflows, see the article:<\/p>\n<p><a href=\"https:\/\/www.1ai.net\/en\/37200.html\/\">One-click AI keying, ComfyUi-RMBG's strongest background removal plug-in, easy to use, hair strands can also be keyed cleanly!<\/a><\/p>\n<p>4\u3001LBM_relighting\u91cd\u65b0\u6253\u5149\u533a<\/p>\n<p>Don't be careful to use the model we downloaded above.<\/p>\n<p>5. Image output area<\/p>\n<p>Two images are output here, the top one is the effect of hard compositing the keyed out subject with the lighted image.<\/p>\n<p>It's the one below that shows the effect after re-lighting the subject.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-37635\" title=\"5e47a099j00sxzfmh00f4d000u000eem\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/06\/5e47a099j00sxzfmh00f4d000u000eem.jpg\" alt=\"5e47a099j00sxzfmh00f4d000u000eem\" width=\"1080\" height=\"518\" \/><\/p>\n<p>Enlarged size for comparison. (The top one shows the effect of hard compositing, and the bottom one shows the effect after re-lighting)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-37637\" title=\"f107d062j00sxzfmj01f5d000o800yqm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/06\/f107d062j00sxzfmj01f5d000o800yqm.jpg\" alt=\"f107d062j00sxzfmj01f5d000o800yqm\" width=\"872\" height=\"1250\" \/><\/p>\n<p>We tested it again with the same lighted image and portrait, and the results were good (hard composite effect above, re-lighting below)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-37636\" title=\"9a60dd7dj00sxzfmj01czd000ob00xfm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/06\/9a60dd7dj00sxzfmj01czd000ob00xfm.jpg\" alt=\"9a60dd7dj00sxzfmj01czd000ob00xfm\" width=\"875\" height=\"1203\" \/><\/p>\n<p>Replacing the characters and also replacing the lighting effects to generate another one works well.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-37638\" title=\"efed0925j00sxzfmk01m1d000u00105m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/06\/efed0925j00sxzfmk01m1d000u00105m.jpg\" alt=\"efed0925j00sxzfmk01m1d000u00105m\" width=\"1080\" height=\"1301\" \/><\/p>\n<p>Interested students can test the free online workflow below or download the workflow locally for testing.<\/p>\n<p>Free online workflow:<\/p>\n<p>https:\/\/www.runninghub.cn\/post\/1934254001959690242<\/p>","protected":false},"excerpt":{"rendered":"<p>i. LBM relighting, as a tool for re-examining AI images, requires only that you provide a major picture and an environmental map, which can be re-lighted according to the light source on the environmental map, to truly integrate the person and background, and 100% to retain the original. The figure below shows the actual effect of my coming out. The following are some examples of the lighting effects provided by the official network, with very good integration of light sources and objects. Project address: https:\/\/github.com\/gojasper\/LBM Online address: https:\/\/huggingface.co\/spaces\/jasperai\/LBM_relighting<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[149,144],"tags":[1989,6276,4401,6947,5145],"collection":[],"class_list":{"0":"post-37628","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-jiaocheng","7":"category-baike","8":"tag-comfyui","11":"tag-6947","12":"tag-5145"},"acf":[],"_links":{"self":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/37628","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/comments?post=37628"}],"version-history":[{"count":0,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/37628\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/media?parent=37628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/categories?post=37628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/tags?post=37628"},{"taxonomy":"collection","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/collection?post=37628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}