{"id":23233348,"url":"https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker-ZHO","last_synced_at":"2025-08-19T18:31:42.354Z","repository":{"id":217374026,"uuid":"743720963","full_name":"ZHO-ZHO-ZHO/ComfyUI-PhotoMaker-ZHO","owner":"ZHO-ZHO-ZHO","description":"Unofficial implementation of PhotoMaker for ComfyUI","archived":false,"fork":false,"pushed_at":"2024-05-22T14:13:49.000Z","size":99,"stargazers_count":791,"open_issues_count":58,"forks_count":42,"subscribers_count":15,"default_branch":"main","last_synced_at":"2024-12-13T15:19:39.081Z","etag":null,"topics":["comfyui","stable-diffusion"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZHO-ZHO-ZHO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":"https://afdian.net/a/ZHOZHO"}},"created_at":"2024-01-15T20:56:39.000Z","updated_at":"2024-12-12T11:52:48.000Z","dependencies_parsed_at":"2024-01-18T07:23:33.316Z","dependency_job_id":"7b1e747a-4c30-449b-a747-aaac252a4f4c","html_url":"https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker-ZHO","commit_stats":null,"previous_names":["zho-zho-zho/comfyui-photomaker","zho-zho-zho/comfyui-photomaker-zho"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZHO-ZHO-ZHO%2FComfyUI-PhotoMaker-ZHO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZHO-ZHO-ZHO%2FComfyUI-PhotoMaker-ZHO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZHO-ZHO-ZHO%2FComfyUI-PhotoMaker-ZHO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZHO-ZHO-ZHO%2FComfyUI-PhotoMaker-ZHO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZHO-ZHO-ZHO","download_url":"https://codeload.github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker-ZHO/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230367780,"owners_count":18215325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["comfyui","stable-diffusion"],"created_at":"2024-12-19T03:01:22.407Z","updated_at":"2024-12-19T03:01:44.194Z","avatar_url":"https://github.com/ZHO-ZHO-ZHO.png","language":"Python","funding_links":["https://afdian.net/a/ZHOZHO"],"categories":["Workflows (3395) sorted by GitHub Stars","All Workflows Sorted by GitHub Stars"],"sub_categories":[],"readme":"\n\n![PNSTYLE_23png](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/15f9ebaf-b205-4cbd-928e-eca1a0cacb7f)\n\n\n# ComfyUI PhotoMaker\n\nUnofficial implementation of [PhotoMaker](https://github.com/TencentARC/PhotoMaker) for ComfyUI\n\n\u003c!---\n![Dingtalk_20240117150313](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/da664c2b-cb30-44e2-85ec-d6070fcfa8f0)\n\n\n![Dingtalk_20240117161736](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/07c924ab-3ee5-4919-87bc-ac49c28914f1)\n---\u003e\n![Dingtalk_20240118163802](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/0292bf55-21b7-4025-bc27-7e3e7ccc2af3)\n\n\u003c!---\n![Dingtalk_20240118163953](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/9b8a665f-6c9c-441c-aa81-fc56423de89e)\n---\u003e\n\n单张参考与多张参考的对比：\n\n![Dingtalk_20240117201650](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/e7bccd61-7855-46c2-a6bc-31b34e742927)\n\n![Dingtalk_20240117201201](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/6bbcfcf9-9027-4c6f-9be1-750971b7848c)\n\n\n## 项目介绍 | Info\n\n- 来自对[PhotoMaker](https://github.com/TencentARC/PhotoMaker)的非官方实现\n  \n- 版本：V2.5 支持lora、支持多批次、支持通用的styler\n\u003c!---\n节点拆分 + 支持本地模型 + 支持自定义尺寸 +提速3倍 + 支持多图直接输入\n---\u003e\n\n![Dingtalk_20240119194547](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/d067fc21-3b51-44bc-b76e-9351a7f6966a)\n\n\n## 视频演示\n\n\u003c!---\nhttps://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/8718a70e-a5d7-463b-b36e-de1ffefad9ed\n---\u003e\n\n\n\nhttps://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/d58af6e7-d0f3-41ff-ab33-195cb6d66e9e\n\n\n\n## 节点说明 | Features\n\n- 基础模型加载 | base model loader\n    - 📷Base Model Loader from hub🤗：支持从 huggingface hub 自动下载模型，输入模型名称（如：SG161222/RealVisXL_V3.0）即可\n    - 📷Base Model Loader locally：支持加载本地模型（需 SDXL 系列模型）\n\n- PhotoMaker Adapter 模型加载 | PhotoMaker Adapter Loader\n    - 📷PhotoMaker Adapter Loader from hub🤗：支持从 huggingface hub 自动下载模型\n    - 📷PhotoMaker Adapter Loader locally：支持加载本地模型，输入 photomaker-v1.bin 模型所在路径即可\n\n- 参考图预处理 | 📷Ref Image Preprocessing\n    - 直接模式 | Direct_input：接入单/多张图像（非必要项）\n    - 路径模式 | Path_input：自动读取路径中的所有图像\n\n- Lora模型加载 | 📷LoRALoader 🆕\n    - 支持加载本地 lora 模型\n    - 支持权重调节\n\n - 提示词 + 风格 | 📷Prompt_Styler 🆕\n    - 与各种提示词（文本）输入（如肖像大师等）、styler兼容\n    - prompt、negative：正负提示词\n    - 支持权重调节\n    - style_name：支持官方提供的10种风格\n        - (No style)\n        - Cinematic\n        - Disney Charactor\n        - Digital Art\n        - Photographic (Default)\n        - Fantasy art\n        - Neonpunk\n        - Enhance\n        - Comic book\n        - Lowpoly\n        - Line art\n\n- PhotoMaker 生成 | 📷PhotoMaker Generation 🆕\n    - pipe：接入模型\n    - pil_image：接入预处理图像\n    - positivet、negative：正负提示词\n    - batch_size：生成数量\n    - style_strength_ratio：风格混合强度（高于30按30计算）\n    - step：步数，官方默认50步，但毕竟是基于SDXL模型，我实测下来30步足够了\n    - guidance_scale：提示词相关度，一般默认为5\n    - width、height：尺寸设置（需1024维度）\n    - seed：种子\n\n\n\u003c!---\n- base_model_path：支持输入huggingface模型名称自动下载模型（如：SG161222/RealVisXL_V3.0）\n- ref_images_path：支持批量读取参考图像，放入文件夹中即可\n- ptompt、negative：正负提示词\n- style_name：支持官方提供的10种风格\n    - (No style)\n    - Cinematic\n    - Disney Charactor\n    - Digital Art\n    - Photographic (Default)\n    - Fantasy art\n    - Neonpunk\n    - Enhance\n    - Comic book\n    - Lowpoly\n    - Line art \n- style_strength_ratio：风格混合强度（高于30按30计算）\n- step：步数，官方默认50步，但毕竟是基于SDXL模型，我实测下来30步足够了\n- guidance_scale：提示词相关度，一般默认为5\n- seed：种子\n---\u003e\n\n## 风格 | Styles\n\n![PNSTYLE_2](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/dc675478-47a0-456d-946b-0cf781aa4c28)\n\n\n## 安装 | Install\n\n\u003c!---\n- 推荐使用管理器 ComfyUI Manager 安装\n---\u003e\n\n- 手动安装：\n    1. `cd custom_nodes`\n    2. `git clone https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker.git`\n    3. `cd custom_nodes/ComfyUI-PhotoMaker`\n    4. `pip install -r requirements.txt`\n    5. 重启 ComfyUI\n\n\n## 工作流 | Workflows\n\n\n- [V2.5 Disney-Character_PhotoMaker + DragNUWA](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/blob/main/PhotoMaker%20Workflows/Disney-Character_PhotoMaker%2BDragNUW%E3%80%90Zho%E3%80%91.json) 🆕\n\n  https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/ca2bfff4-701c-4960-ac11-b893f90c044c\n\n\n- [V2.5 lora + batch](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/blob/main/PhotoMaker%20Workflows/PhotoMaker_lora_batch%E3%80%90Zho%E3%80%91.json) 🆕\n\n  ![Dingtalk_20240119202403](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/b862b89f-1609-43d9-84a1-5f11a2d1ab2d)\n\n\n- [V2.5 portraitmaster + styler + lora](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/blob/main/PhotoMaker%20Workflows/PhotoMaker_lora_portrait_styler%E3%80%90Zho%E3%80%91.json) 🆕\n\n  ![Dingtalk_20240119201125](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/38e01035-139e-4a89-8982-6f7168684045)\n\n- [V2.5 本地模型 locally](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/blob/main/PhotoMaker%20Workflows/V2.5%20PhotoMaker_locally%E3%80%90Zho%E3%80%91.json)\n\n- [V2.5 自动下载 huggingface hub](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/blob/main/PhotoMaker%20Workflows/V2.5%20PhotoMaker_fromhub%E3%80%90Zho%E3%80%91.json)\n\n（注：特意补充了 V2.5 的基础工作流，V2.0 工作流已弃用）\n\n\u003c!---\n- [V2.0 本地模型 locally](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/blob/main/PhotoMaker%20Workflows/PhotoMaker_locally%E3%80%90Zho%E3%80%91.json)\n\n  ![QQ截图20240118163432](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/bf6a55ae-767e-4aaf-9f75-6f752bb5b530)\n\n  \n- [V2.0 自动下载 huggingface hub](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/blob/main/PhotoMaker%20Workflows/PhotoMaker_fromhub%E3%80%90Zho%E3%80%91.json) \n\n  ![QQ截图20240118163252](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/f645c1b7-2548-45fc-b388-0ebe62e2724d)\n---\u003e\n\n## 更新日志\n\n- 20240122\n\n  新增 Disney-Character: PhotoMaker + DragNUWA 工作流，可配合 DragNUWA 融合多个人物特征生成迪士尼风格大片！\n\n- 20240121\n\n  修复 bfloat16 bug\n\n- 20240120\n\n  补充两个基础工作流\n\n- 20240119\n\n  更新为 V2.5：支持lora、支持自定义生成数量、支持通用提示词输入（文本）如：styler、portraitmater等\n\n  新增 lora + batch、portraitmaster + styler + lora 两个工作流\n\n- 20240119\n\n  更新为 V2.1：参考图改为直接输入/路径输入两种新模式，其中直接输入支持多图\n\n  ![Dingtalk_20240119022341](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/78595f2c-7f87-477a-9896-007dd24fe8c9)\n\n- 20240118\n\n  更新为 V2.0：节点拆分 + 支持本地模型 + 支持自定义尺寸 +提速3倍\n\n  新增本地、hub加载工作流\n\n- 20240117\n\n  新增单张图输入，并给出对比图\n\n  修复bug，初版上线\n\n- 20240116\n\n  创建项目\n\n\n## 速度实测 | Speed\n\n- V2.0 提速 3 倍\n\n    - A100 50步 7s\n\n    ![image](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/4ae13ffc-c770-4551-bcb2-ce0b0ddc1367)\n\n- V1.5\n\n    - A100 50步 23s\n\n    ![image](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/df6eacda-2640-425b-b5ca-1ab5a8a61a66)\n\n    - v100 50步 90s\n\n    ![image](https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker/assets/140084057/973b8b6b-9195-4044-b75d-bd833bd6421e)\n\n\n## Stars \n\n[![Star History Chart](https://api.star-history.com/svg?repos=ZHO-ZHO-ZHO/ComfyUI-PhotoMaker\u0026type=Date)](https://star-history.com/#ZHO-ZHO-ZHO/ComfyUI-PhotoMaker\u0026Date)\n\n\n## 关于我 | About me\n\n📬 **联系我**：\n- 邮箱：zhozho3965@gmail.com\n- QQ 群：839821928\n\n🔗 **社交媒体**：\n- 个人页：[-Zho-](https://jike.city/zho)\n- Bilibili：[我的B站主页](https://space.bilibili.com/484366804)\n- X（Twitter）：[我的Twitter](https://twitter.com/ZHOZHO672070)\n- 小红书：[我的小红书主页](https://www.xiaohongshu.com/user/profile/63f11530000000001001e0c8?xhsshare=CopyLink\u0026appuid=63f11530000000001001e0c8\u0026apptime=1690528872)\n\n💡 **支持我**：\n- B站：[B站充电](https://space.bilibili.com/484366804)\n- 爱发电：[为我充电](https://afdian.net/a/ZHOZHO)\n\n\n## Credits\n\n感谢[@erLin](https://twitter.com/eviljer)对ComfyUI 的图像张量 Shape (N, H, W, C)的提醒，帮助我成功修复了bug！\n\n[PhotoMaker](https://github.com/TencentARC/PhotoMaker)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZHO-ZHO-ZHO%2FComfyUI-PhotoMaker-ZHO","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZHO-ZHO-ZHO%2FComfyUI-PhotoMaker-ZHO","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZHO-ZHO-ZHO%2FComfyUI-PhotoMaker-ZHO/lists"}