Skip to content
Projects

wangweihong/comfyui-pose-gallery

View on GitHub

About

A ComfyUI node providing a Chinese human pose gallery, with multi-view browsing and a Depth Anything → MOSS SFT depth-control workflow.

Other Projects

How these counts are measured

Measured star growth

in 24h
+2
in 7 days
+10
in 15 days
+27
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.en.md

Original

comfyui-pose-gallery

简体中文 · English

Supports both the legacy canvas and Nodes 2.0 (tested with ComfyUI frontend 1.57.4), including gallery selection, previews, dice and locking. Hard-refresh the browser after updating to load the new frontend scripts.

A local pose reference gallery for ComfyUI. Built-in assets, existing IDs and the node's 5 outputs remain compatible with existing workflows. See the Chinese README for the original dataset, examples, model configurations and source notices.

Automatic random selection: a separate node

Add image → Pose Gallery → Random Pose Gallery, connect image to your workflow or Preview Image, and run. Each execution draws a new reference automatically. Set origin to all, builtin or user. Pose sampling uses individual view records and never fabricates additional angles.

The original PoseGallery keeps its required input, fixed-selection behavior and 5 output sockets, and adds an optional language input (older workflows default to zh). The new node uses those same outputs for one actual selected image and displays its executed ID and preview. Both nodes append a sixth action STRING output, containing only the pose name with · / ・ separators replaced by commas (no added spaces). For example: Deep kneeling backbend,Holding both heels. System, category and view metadata are excluded. Existing output indices 0–4 are unchanged. Both nodes use language for UI labels, action, and the description output: en returns the English system, category, pose name and view; zh returns the Chinese description. Other outputs are unchanged. The fixed node synchronizes its language input with the gallery selector and saves it in the workflow. Run again after switching languages to refresh the output. Custom references use the supplied name for that language; untranslated custom text retains its original value.

Click 🎲 Random to draw and preview a pose without running the workflow, using the node's source, system and view filters. When multiple candidates exist, the dice skips the current pose. Enable 🔒 Lock random selection to disable the dice and keep the current pose_id for subsequent workflow runs, including its image, description and action. The workflow saves both the lock and selected ID. Draw a pose or run once before locking. Changing filters while locked keeps the selection; a deleted or cleaned original raises an error instead of drawing a replacement.

Unlock to restore automatic random selection on every run, where draws may repeat by chance. Selection is independent of browser-gallery filters. Missing originals are skipped; an empty usable source raises a clear error. An unlocked preview does not fix the next workflow draw. The node does not enqueue or start tasks itself.

Import the random pose preview example; a matching API graph is included.

Random Pose also accepts optional pose_system and angle filters. Random Portrait accepts section (face / styling / custom). Filters default to all, preserving existing random workflows.

Separate random node in ComfyUI

Z-Image-Turbo depth-control tests

The workflows and illustrated report adapt issue #2 using locally available Union 2.1 2602 8steps, rather than the original Union v1. Two UI/API pairs cover strengths 0.8 and 0.65, with 8 steps and CFG 1. Four actual runs include standing, kneeling, disabled control and lower strength. Control affects the pose, but results show blank-face artifacts or limb/hand mismatches; lowering strength improves realism while weakening pose accuracy. No matched MOSS comparison was run.

Qwen Image 2.1 two-person pose editing

The saved two-person workflow includes two character inputs and a gallery pose. See the bilingual guide for input order, bundled assets and the original prompt, which currently assigns image 2 to both people. A matching API graph is included. This addition checks structure and assets without a new generation test.

Qwen Image 2.1 gallery workflows

The obsolete workflow examples have been replaced and renamed to describe their actual behavior.

Copy the bundled person PNG to ComfyUI/input/, or select your own image. Re-select model paths locally. Both use 25 steps, CFG 1, Euler/simple and seed 2026103002; 01 runs this twice. The full two-stage workflow was tested successfully, and its stage-one RGB pixels matched the pre-repair output exactly. The current P003 pose follows the rear three-quarter turn, over-shoulder look and hand-on-waist placement. Other poses and fine details remain subject to visual review. See the dependency and input-order guide.

Install and browse

Clone https://github.com/wangweihong/comfyui-pose-gallery.git inside ComfyUI/custom_nodes/, keep its bundled library/, restart ComfyUI and refresh the browser. Dependencies use ComfyUI's Pillow, NumPy, PyTorch and aiohttp; uploads require no generation model. Add image → Pose Gallery, open its Browse button, inspect an image and click Use to write it back. Browsing or selecting never queues a workflow.

Upload one custom pose

  1. Click Upload pose in the standalone gallery or the gallery opened from a node. The Chinese / English selector controls the whole gallery, including systems, categories, views, all 288 pose groups, details, help, and uploads. Switching preserves filters and the selected pose/view, and the language is remembered for the next visit.
  2. Choose one finished reference image, inspect the preview and enter a name. The other-language name is optional; if omitted, the supplied name is reused without inventing a translation.
  3. Click Save to gallery. Success selects the Custom source, clears existing filters and opens the new image viewer.
  4. Click Use in the image viewer to update the current node. Uploading and selecting do not run the workflow.

Built-in multi-view groups are preserved. Each upload is an independent single-image group; additional views are not generated. Category and view are optional and default to Unspecified.

Static PNG, JPEG and WebP are supported, one image at a time, up to 20 MiB and 32 megapixels. The server validates actual content and rejects animation, damaged images and paths outside the library. Full images are normalized to PNG while preserving dimensions and transparency. WebP previews fit within 800×1000 and thumbnails within 400×500, without stretching. Node IMAGE outputs composite transparency onto white. Import does not extract a subject, remove backgrounds or edit people. Custom uploads do not yet support batch import, editing or deletion. Built-in assets can be managed below.

Edit, delete and replace built-in poses

  • Delete groups: click Edit above the gallery, select pose cards, then Delete selected poses. All views of each selected group are deleted. Use the existing gallery filters or select all filtered results. Click Done to leave editing.
  • Manage one view: open a pose and select its view. Delete and Replace appear directly below Open in new window. Deletion affects only this view. Replacement accepts PNG/JPEG/WebP, up to 20 MiB and 32 megapixels, and preserves the ID and other views.
  • Deletion removes all image files for the affected assets, frees space, and excludes them from browsing and random sampling. A confirmation explains the affected scope.

The top Manage built-in assets button is only for handling earlier changes after a plugin update. It has no image list or repeated selections:

Earlier action Continue it Keep updated built-ins
Deleted poses Delete them again Keep them and stop repeating these deletions
Replaced poses Reapply my replacement images Use built-in images and stop repeating these replacements

Choose both independently, then click Apply. The report lists deleted, replaced, kept and failed views. No assets are downloaded. If a file has not been restored by the update, keeping it fails with a clear message and its saved operation remains available for retry.

Startup, browsing and updates never automatically delete or replace files. Operations are stored in ComfyUI/user/pose_gallery/data/builtin_changes.json; replacement sources are stored in ComfyUI/user/pose_gallery/replacements/<id>/<revision>/. Back up both. Clients of the same service share these files. Replacement sources and older revisions are retained. The base index stays unchanged. File operations are restricted to registered built-in IDs and reject symlinks and escaping paths. Removing working-tree files does not remove Git history objects.

Developer API: GET /pose_gallery/manage/summary returns deletion/replacement counts. POST /pose_gallery/manage/plan accepts {choices: {deleted: "delete" / "keep", replaced: "replace" / "keep"}} or {ids, mode}. POST /pose_gallery/manage/apply accepts the returned {request, token}. Multipart POST /pose_gallery/manage/replacement accepts id and image to validate and prepare replacement sources. The UI combines planning and applying into one user action. Compatibility with already-running services allows the new interface to work without interrupting queued jobs.

Persistent user library

Custom assets are stored at ComfyUI/user/pose_gallery/, independently of node code and built-in assets. Node upgrades do not overwrite this directory; back it up separately.

  • data/custom.json stores stable u- + UUID IDs, user-entered names, classifications, original filename, dimensions, upload time and checksum.
  • img/ (PNG), preview/ (WebP), thumbs/ (WebP) contain full images, previews and thumbnails with matching IDs.
  • Set COMFYUI_POSE_GALLERY_USER_LIBRARY to override storage with a persistent writable directory visible inside the container/environment.
  • Clients of this single-machine ComfyUI service share the library; no account or multi-user permissions are added.

All sources / Built-in / Custom filters have separate counts. Custom uploads remain available when the built-in index is missing. Custom pose_id values use the new stable IDs; source_id metadata is empty. Existing 5 outputs and original IDs stay compatible.

API and verification

POST /pose_gallery/upload accepts multipart image, name, optional other_name and language (zh/en). Pose metadata: optional category and angle (unknown/front/top/bottom/side/diagonal). HTTP201 returns a record and refreshed catalog with records and meta. Failures return JSON error codes; index writes are locked and atomic, and incomplete new files are rolled back. Existing GET /pose_gallery/catalog retains its array response with origin=builtin/user. GET /pose_gallery/meta reports counts and a missing built-in library. Asset reads remain restricted to registered paths.

python3 -m unittest discover -s tests -v
node --check web/custom_upload.mjs
node --test tests/test_random_frontend.cjs

Upload preview and bilingual names

Custom reference viewer

Independent program code retains its existing license. Built-in images and source data retain their original terms; consult the source and license notices linked from the Chinese README. Custom uploads are not attributed to the built-in dataset.

Anima example workflow

The UI workflow and API workflow now use the saved workflow 7e7b00cd-133b-4b2f-8212-1ee3d87338ea: Miaomiao Harem Anima 1.1, 30 steps, CFG 4, ER-SDE/simple, LLLite strength 1 over 0–0.9. The gallery’s English action output feeds Show Text and Concatenate Text before positive text encoding. Install comfyui_LLM_party for Show Text. The random gallery and control-image saver remain bypassed as in the source. Model choices, prompts, links, layout and sampling settings are preserved. The original base prompt still contains a fixed action phrase; edit it in Concatenate Text when changing poses.

The eight older result comparisons document the previous Anima Base v1 workflow (strength 0.75); they are historical evidence for that version. See the usage and dependency notes.

Explore related projects

Loading…