{"id":35844,"date":"2025-05-23T09:36:44","date_gmt":"2025-05-23T01:36:44","guid":{"rendered":"https:\/\/www.1ai.net\/?p=35844"},"modified":"2025-05-22T14:39:12","modified_gmt":"2025-05-22T06:39:12","slug":"comfyui%e4%bd%bf%e7%94%a8%e6%95%99%e7%a8%8b%ef%bc%8ccomfyui%e4%b8%80%e9%94%ae%e6%89%b9%e9%87%8f%e9%ab%98%e6%b8%85%e6%97%a0%e6%8d%9f%e6%94%be%e5%a4%a7%e5%9b%be%e7%89%87","status":"publish","type":"post","link":"https:\/\/www.1ai.net\/en\/35844.html","title":{"rendered":"ComfyUI tutorial, ComfyUI one-click batch HD lossless enlargement of images"},"content":{"rendered":"<p>A few days ago I introduced you to the<a href=\"https:\/\/www.1ai.net\/en\/tag\/comfyui\" title=\"_Other Organiser\" target=\"_blank\" >ComfyUI<\/a>How to zoom in on a picture in HD in 4 ways, see the article for details:<a href=\"https:\/\/www.1ai.net\/en\/35030.html\/\">Picture lossless enlargement becomes clear, ComfyUI picture HD enlargement workflow sharing tutorials<\/a>!<\/p>\n<p>Today, I'm going to introduce you to how to make batch enlargements of images.<\/p>\n<p>The batch zoom function can be realized by the for loop node of Easy-Use plugin, which can bring a lot of convenience to our work and is very practical.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35845\" title=\"33db0c00j00swnh0n0013d000pn0060m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/05\/33db0c00j00swnh0n0013d000pn0060m.jpg\" alt=\"33db0c00j00swnh0n0013d000pn0060m\" width=\"923\" height=\"216\" \/><\/p>\n<p>There are a couple plugins that need to be used here:<\/p>\n<p>Easy-Use plugin<\/p>\n<p>https:\/\/github.com\/yolain\/ComfyUI-Easy-Use<\/p>\n<p>KJNodes Plugin<\/p>\n<p>https:\/\/github.com\/kijai\/ComfyUI-KJNodes<\/p>\n<p>I. Basic operation of for loop<\/p>\n<p>Start by adding two For loop nodes to ComfyUI and let it help us perform some repetitive operations.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35846\" title=\"2eb420acj00swnh0n0019d000rc008xm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/05\/2eb420acj00swnh0n0019d000rc008xm.jpg\" alt=\"2eb420acj00swnh0n0019d000rc008xm\" width=\"984\" height=\"321\" \/><\/p>\n<p>The index is used for quick access to eligible data, usually an integer from 0, e.g. 0, 1, 2, 3 ..<\/p>\n<p>Here is a basic Fro loop workflow.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35847\" title=\"98dcff39j00swnh0n002ld000u0008im\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/05\/98dcff39j00swnh0n002ld000u0008im.jpg\" alt=\"98dcff39j00swnh0n002ld000u0008im\" width=\"1080\" height=\"306\" \/><\/p>\n<p>I. Basic amplification workflow<\/p>\n<p>1. Basic amplification workflow<\/p>\n<p>The following is the most basic and simple workflow for zooming through a model. With this workflow it is possible to realize very efficiently<a href=\"https:\/\/www.1ai.net\/en\/tag\/%e5%9b%be%e7%89%87%e6%94%be%e5%a4%a7\" title=\"[Sees articles with [photo magnification] labels]\" target=\"_blank\" >Image Enlargement<\/a>function and does not change the basic information of the original image.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35848\" title=\"0d33f88dj00swnh0p00cbd000u000g9m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/05\/0d33f88dj00swnh0p00cbd000u000g9m.jpg\" alt=\"0d33f88dj00swnh0p00cbd000u000g9m\" width=\"1080\" height=\"585\" \/><\/p>\n<p>If you only run this workflow, the amount of video memory it needs to take up is acceptable, but if you add this workflow behind other workflows, it may take up more video memory, and the low video memory indicates a lot of pressure.<\/p>\n<p>2\u3001Image chunking<\/p>\n<p>We can add an image chunking node, the following figure will be set to 2 rows and 2 columns of rows and columns, so that the enlarged image will be divided into 4 pieces of separate calculations, greatly reducing the video memory occupied.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35849\" title=\"f27c2e4fj00swnh0p00aid000u000eym\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/05\/f27c2e4fj00swnh0p00aid000u000eym.jpg\" alt=\"f27c2e4fj00swnh0p00aid000u000eym\" width=\"1080\" height=\"538\" \/><\/p>\n<p>Add another chunk merge node to merge the chunked images, here the number of rows and columns should be consistent with the previous one.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35850\" title=\"60f269acj00swnh0p00c3d000u000i5m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/05\/60f269acj00swnh0p00c3d000u000i5m.jpg\" alt=\"60f269acj00swnh0p00c3d000u000i5m\" width=\"1080\" height=\"653\" \/><\/p>\n<p>It is also possible to add another image comparison node to compare the force of the image before and after zooming.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35851\" title=\"9dede1c7j00swnh0p00czd000u000kpm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/05\/9dede1c7j00swnh0p00czd000u000kpm.jpg\" alt=\"9dede1c7j00swnh0p00czd000u000kpm\" width=\"1080\" height=\"745\" \/><\/p>\n<p>By comparing left and right, you can clearly see that the image has indeed been enlarged, especially at the eyebrows and hair which are much clearer compared to the original image.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35852\" title=\"fad2cadbj00swnh0q014ed000u000phm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/05\/fad2cadbj00swnh0q014ed000u000phm.jpg\" alt=\"fad2cadbj00swnh0q014ed000u000phm\" width=\"1080\" height=\"917\" \/><\/p>\n<p>With this chunking node, it can effectively reduce the pressure of low video memory graphics cards to enlarge the picture, and if the number of chunks is increased some more, such as 4*4 or 8*8, low video memory graphics cards can also accomplish the challenge of enlarging the picture to 8K.<\/p>\n<p>For high graphics memory graphics cards, this chunking node allows you to utilize the parallel computing of the graphics card to improve computational efficiency and reduce image computation time.<\/p>\n<p>III. Batch Enlargement<\/p>\n<p>Combine the zoom workflow just described with the previous for node workflow to realize the batch zoom function.<\/p>\n<p>1, add a KJ node for loading images, which allows us to load multiple images directly from the folder<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35854\" title=\"bb0fc859j00swnh0o002vd000py00dom\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/05\/bb0fc859j00swnh0o002vd000py00dom.jpg\" alt=\"bb0fc859j00swnh0o002vd000py00dom\" width=\"934\" height=\"492\" \/><\/p>\n<p>2, add the image path, set the image limit to 100, connect a preview image node, click run to preview the images in the folder.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35853\" title=\"28e9ab9fj00swnh0o00a2d000u000dgm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/05\/28e9ab9fj00swnh0o00a2d000u000dgm.jpg\" alt=\"28e9ab9fj00swnh0o00a2d000u000dgm\" width=\"1080\" height=\"484\" \/><\/p>\n<p>3. Replace the Load Image node of the Image Enlargement workflow with the Image Batch Load node with Path.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35855\" title=\"4f20cd69j00swnh0o003ad000u000dxm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/05\/4f20cd69j00swnh0o003ad000u000dxm.jpg\" alt=\"4f20cd69j00swnh0o003ad000u000dxm\" width=\"1080\" height=\"501\" \/><\/p>\n<p>4. Then connect the left side of the image batch loading node to the index end of the for loop - start<\/p>\n<p>The number here is set to the total number of images in the folder.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35856\" title=\"5f8c0457j00swnh0o004qd000u000gcm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/05\/5f8c0457j00swnh0o004qd000u000gcm.jpg\" alt=\"5f8c0457j00swnh0o004qd000u000gcm\" width=\"1080\" height=\"588\" \/><\/p>\n<p>5, at the end of the workflow also need to add a \"any batch combination\" node, respectively, connected to the beginning and end of the Fro cycle<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35857\" title=\"06c23d1bj00swnh0o004sd000u000esm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/05\/06c23d1bj00swnh0o004sd000u000esm.jpg\" alt=\"06c23d1bj00swnh0o004sd000u000esm\" width=\"1080\" height=\"532\" \/><\/p>\n<p>Take a look at the full workflow<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35858\" title=\"e6f76410j00swnh0p00ewd000u000dwm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/05\/e6f76410j00swnh0p00ewd000u000dwm.jpg\" alt=\"e6f76410j00swnh0p00ewd000u000dwm\" width=\"1080\" height=\"500\" \/><\/p>\n<p>Pick one and zoom in to see the details, the details are drawn out and the hairs are clearly visible.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35859\" title=\"aec63d29j00swnh0q0151d000u000mxm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2025\/05\/aec63d29j00swnh0q0151d000u000mxm.jpg\" alt=\"aec63d29j00swnh0q0151d000u000mxm\" width=\"1080\" height=\"825\" \/><\/p>\n<p>Above is today's content, the use of For nodes to achieve one-click batch zoom function of the images in the folder, I hope it will help you.<\/p>","protected":false},"excerpt":{"rendered":"<p>A few days ago, I introduced to you how to use 4 methods in ComfyUI to zoom in HD on pictures, please see the article for the specific method: Picture lossless zoom into clear, ComfyUI picture HD zoom workflow sharing tutorial! Today, I would like to introduce to you how to do batch zoom on pictures. Batch zoom function can be realized through the Easy-Use plug-in for loop node, it can bring a lot of convenience to our work, very practical. Here you need to use a few plug-ins: Easy-Use plug-in https:\/\/github.com\/yolain\/ComfyUI-Easy-Use KJNodes plug-in https:\/\/github.com\/kijai\/ComfyUI-<\/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":[541,3149,1989,4749,3000],"collection":[],"class_list":{"0":"post-35844","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-jiaocheng","7":"category-baike","8":"tag-ai","10":"tag-comfyui","12":"tag-3000"},"acf":[],"_links":{"self":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/35844","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=35844"}],"version-history":[{"count":0,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/35844\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/media?parent=35844"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/categories?post=35844"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/tags?post=35844"},{"taxonomy":"collection","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/collection?post=35844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}