Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI_Costume-Gallery_ZH > 服装图库 · 单图

ComfyUI Node: 服装图库 · 单图

Class Name

CostumeGalleryImage

Category
ComfyUI_Costume-Gallery_ZH/服装图库
Author
Stone-dielianhua (Account age: 2555days)
Extension
ComfyUI_Costume-Gallery_ZH
Latest Updated
2026-11-05
Github Stars
0.08K

How to Install ComfyUI_Costume-Gallery_ZH

Install this extension via the ComfyUI Manager by searching for ComfyUI_Costume-Gallery_ZH
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_Costume-Gallery_ZH in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

服装图库 · 单图 Description

Loads a clothing gallery image and bilingual descriptions with optional resizing and mirroring.

服装图库 · 单图:

CostumeGalleryImage, displayed as “服装图库 · 单图,” lets you bring a single clothing reference from a local costume gallery into your ComfyUI workflow. It helps you explore clothing designs, prepare references for image editing, and reuse the gallery’s existing bilingual clothing descriptions for prompt assistance. Rather than generating a new garment image, it retrieves an existing gallery asset and prepares it through optional resizing and horizontal mirroring. Its image preparation also respects embedded orientation information and places transparent areas over a white background, producing a consistent full-color reference. This makes it useful for keeping visual references and their associated descriptions together while developing an artwork. It does not automatically dress a character, transfer clothing onto a person, or perform virtual try-on; those tasks require additional workflow components.

服装图库 · 单图 Input Parameters:

costume_id

The text identifier of the clothing item you want to retrieve from the selected gallery. The node looks up this exact identifier in the gallery catalogue, so it must correspond to an existing entry in that source rather than a garment description, image filename, or prompt. The interface tooltip recommends clicking “打开服装图库” to select clothing instead of typing the identifier manually. Changing this value selects a different reference image and its associated English and Chinese text. The default is defined by the code constant DEFAULT_ID, but its actual text is not included in the supplied source. No text-length minimum or maximum is shown; the important requirement is that the identifier exists in the selected gallery.

asset_source

Selects the local asset library in which the node searches for the clothing identifier and its image. This is a dropdown selection, not a free-text folder-path input. The selected source determines which catalogue is loaded, so an identifier available in one library may not exist in another. The surrounding code demonstrates built-in and custom source handling, but the complete dropdown labels and choices are not included in the supplied interface source. The execution default is SOURCES[0], meaning the first configured source; its exact displayed label is not provided. Choose the source containing the item you selected, especially when switching between supplied assets and a custom library.

resize_mode

Controls how the selected reference is sized and whether its original proportions and edges are preserved. The provided image-loading code supports “原始尺寸,” “等比留边,” “居中裁剪,” and “拉伸”; the execution default is “原始尺寸.” “原始尺寸” keeps the image’s loaded dimensions rather than resizing it to the requested width and height. “等比留边” preserves the image’s proportions and fits the whole reference into the requested dimensions, adding white borders where necessary. “居中裁剪” preserves proportions while filling the requested dimensions, cropping excess material from the edges around a centered composition. “拉伸” resizes directly to the requested dimensions without preserving proportions, which can make garments look wider or narrower. Choose based on whether retaining the complete garment, filling a frame, or matching an exact layout matters most.

width

Sets the target image width in pixels when using “等比留边,” “居中裁剪,” or “拉伸.” The execution default is 768, and the image-loading code requires an integer from 64 to 4096 inclusive. A larger width gives the reference more horizontal pixels, but enlarging a small original does not recover missing fabric detail. Its effect on composition depends on the resize mode: padding can add white space, cropping can remove edges, and stretching can change garment proportions. With “原始尺寸,” this value does not determine the resulting image width, although the supplied loading code still validates that it is within the allowed range.

height

Sets the target image height in pixels when a resizing mode other than “原始尺寸” is selected. The execution default is 1152, and the accepted range shown in the image-loading code is 64 to 4096 inclusive, using whole numbers. Together with width, it establishes the target frame proportions: for example, 768 by 1152 creates a portrait-oriented frame that can suit full-length garment references. Increasing height provides more vertical pixels but cannot recreate detail absent from the original. With “原始尺寸,” the original loaded height is retained, although this parameter must still pass the loader’s integer and range checks.

flip_horizontal

Enables or disables left-to-right mirroring of the reference image. It is a Boolean setting with the choices True and False, and its execution default is False. When enabled, mirroring happens before any resizing, so the final reference shows the reversed orientation of the garment and surrounding image. This can help align a reference with the direction of a composition, but it also reverses asymmetrical design features, lettering, logos, and accessory placement. It changes only the image preparation: the clothing identifier and stored English and Chinese descriptions remain unchanged.

服装图库 · 单图 Output Parameters:

图片

The prepared clothing reference as a ComfyUI IMAGE value, suitable for connection to compatible image preview, image processing, or reference-based workflow nodes. It contains exactly one image, represented internally as a batch of one with height, width, and three RGB color channels; pixel values are normalized to the range 0 through 1. The image reflects the selected resizing and horizontal-flip settings. Embedded orientation is applied during loading, and transparent regions are composited onto white, so this output does not retain an alpha transparency channel. Its dimensions match the requested width and height for the three resizing modes, or the loaded image dimensions for “原始尺寸.”

服装ID

The selected catalogue entry’s stored clothing identifier as a STRING. This identifies the reference that was actually retrieved and helps you keep track of the asset when recording a workflow, comparing references, or selecting the same item again. It is returned from the catalogue record rather than being generated from the image. Treat it as an identifier within the chosen library, not as a file path or a natural-language clothing description.

英文关键词

The selected item’s original English keyword text as a STRING, read directly from the catalogue field “关键词.” You can use this text as a starting point for garment-related prompt wording or as descriptive information alongside the reference image. The node does not analyze the pixels to generate new keywords, translate them, or rewrite them to match a particular model. Resizing and mirroring do not change this text, so review it before using it in a prompt, particularly if the image contains directional or asymmetrical details.

中文说明

The selected item’s stored Chinese descriptive or keyword text as a STRING, read directly from the catalogue field “关键词中文.” It helps you understand the reference and interpret the associated clothing terminology without relying only on the English keywords. Despite the output label “中文说明,” the code returns the existing catalogue field rather than creating a new explanation or image caption. Its level of detail depends on the gallery entry, and it remains unchanged when the image is resized or mirrored.

服装图库 · 单图 Usage Tips:

  • Select your asset source first, then use “打开服装图库” to choose the reference. This helps keep the clothing identifier matched to the correct library and avoids manual typing mistakes.
  • Use “等比留边” when the complete garment matters, such as references showing sleeves, hems, headwear, or accessories near the image edges. A target of 768 by 1152 provides a portrait frame while retaining the whole reference with white padding where needed.
  • Use “居中裁剪” when you need an exact frame without added borders, but preview the result before continuing. Center cropping can remove garment details near the top, bottom, or sides.
  • Use “原始尺寸” to avoid resizing the reference. If a later workflow component requires particular dimensions, choose a resizing mode instead; changing width and height alone does not resize the image in this mode.
  • Avoid “拉伸” when judging garment proportions, silhouettes, or fit. Reserve it for situations where exact frame dimensions matter more than preserving the original shape.
  • Enable horizontal mirroring only after checking for text, logos, asymmetric fastenings, and accessories. The stored descriptions are not updated to reflect the mirrored appearance.
  • Connect the English keyword text to a compatible text or prompt-processing component when you want prompt assistance, and review the Chinese description for context. These strings describe the gallery asset; they do not automatically apply its clothing to a generated character.
  • For faster processing, choose dimensions appropriate to the next workflow stage rather than automatically selecting the maximum. If an original exceeds 32 million pixels, reduce the source file itself first, because the node checks its original pixel count before resizing.

服装图库 · 单图 Common Errors and Solutions:

素材库中找不到服装 ID「…」。请重新选图或检查所选素材库。

  • Explanation: The selected clothing identifier does not exist in the currently loaded catalogue. This can happen after changing the asset source, removing an entry, or entering an identifier incorrectly.
  • Solution: Confirm the asset source, reopen the gallery, and select the clothing item again. If you maintain a custom library, check that the item’s identifier is present in its catalogue.

输出宽高须为 64 至 4096 之间的整数。

  • Explanation: Width or height is not a whole number between 64 and 4096 inclusive. The loader checks these values even when “原始尺寸” is selected.
  • Solution: Set both dimensions to valid integers, such as width 768 and height 1152. Check any connected values as well as the visible settings.

单张原图超过3200万像素,请先缩小原图。

  • Explanation: The original image contains more than 32 million pixels, calculated as its width multiplied by its height. This check happens before the node resizes the image, so smaller target dimensions do not bypass it.
  • Solution: Open the original file in an image editor, reduce its dimensions to no more than 32 million pixels, save it, and run the node again. Keep a backup if you need to preserve the full-resolution original.

图片无法读取或已损坏:…

  • Explanation: The image-loading process could not read or process the selected asset. Possible causes include a damaged file, an unsupported image encoding, a file-access problem, or an image rejected by the image library’s safety checks.
  • Solution: Try opening the original image in an image editor. If it opens, export a fresh copy in a commonly supported format such as PNG or JPEG and update the asset as needed. If it does not open, restore or replace the file, and check that ComfyUI can read it.

无法读取 data/meta-zh.json 中的同义词。

  • Explanation: The gallery could not load its synonym metadata. The supplied code associates this message with file-reading or data-validation problems, including incorrectly structured synonym entries.
  • Solution: Restore a valid metadata file from the gallery package or a known working backup. If you edited the file, verify that it is valid JSON and that synonym mappings contain arrays of text strings.

同义词须为文本数组映射

  • Explanation: Synonym data does not have the expected structure: mappings must point to arrays of text strings. In the supplied code, this validation failure may be wrapped by the broader message about being unable to read synonyms from data/meta-zh.json.
  • Solution: Check custom synonym edits and replace single text values, numbers, or other incompatible entries with the required arrays of strings. Restoring the original metadata is a practical option if you do not need custom synonyms.
  • Explanation: The provided context shows a catalogue-loading error beginning with “无法读取 data/costume-zh.json,请检查”, but does not include the complete message. A missing, unreadable, or invalid catalogue can prevent the node from finding any clothing entry.
  • Solution: Check that the selected library contains its expected data/costume-zh.json file. Restore it from a working copy, verify any manual JSON edits, and confirm that ComfyUI has permission to read the library.

Referenced original image is missing or unavailable

  • Explanation: The gallery checks that an entry’s original image exists before loading it. A catalogue entry can remain selectable even if its referenced file has been moved or deleted; the exact missing-file error text is not included in the supplied excerpts.
  • Solution: Restore the original image to the location recorded in the catalogue, or correct the catalogue’s original-image path. Confirm that you selected the intended asset source, and do not assume that an available thumbnail means the original file is also present.

服装图库 · 单图 Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_Costume-Gallery_ZH
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

服装图库 · 单图