Code Monkey home page Code Monkey logo

comfyui-photomaker's Introduction

PNSTYLE_23png

ComfyUI PhotoMaker

Unofficial implementation of PhotoMaker for ComfyUI

Dingtalk_20240118163802

单张参考与多张参考的对比:

Dingtalk_20240117201650

Dingtalk_20240117201201

项目介绍 | Info

  • 来自对PhotoMaker的非官方实现

  • 版本:V2.1 节点拆分 + 支持本地模型 + 支持自定义尺寸 +提速3倍 + 支持多图直接输入

Dingtalk_20240119022341

视频演示

PHOTOMAKER.V2.0.mp4

节点说明 | Features

  • 基础模型加载 | base model loader

    • 📷Base Model Loader from hub🤗:支持从 huggingface hub 自动下载模型,输入模型名称(如:SG161222/RealVisXL_V3.0)即可
    • 📷Base Model Loader locally:支持加载本地模型(需 SDXL 系列模型)
  • PhotoMaker Adapter 模型加载 | PhotoMaker Adapter Loader

    • 📷PhotoMaker Adapter Loader from hub🤗:支持从 huggingface hub 自动下载模型
    • 📷PhotoMaker Adapter Loader locally:支持加载本地模型,输入 photomaker-v1.bin 模型所在路径即可
  • 参考图预处理 | 📷Ref Image Preprocessing

    • 直接模式 | Direct_input:接入单/多张图像(非必要项)
    • 路径模式 | Path_input:自动读取路径中的所有图像
  • PhotoMaker 生成 | 📷PhotoMaker Generation

    • pipe:接入模型
    • pil_image:接入预处理图像
    • ptompt、negative:正负提示词
    • style_name:支持官方提供的10种风格
      • (No style)
      • Cinematic
      • Disney Charactor
      • Digital Art
      • Photographic (Default)
      • Fantasy art
      • Neonpunk
      • Enhance
      • Comic book
      • Lowpoly
      • Line art
    • style_strength_ratio:风格混合强度(高于30按30计算)
    • step:步数,官方默认50步,但毕竟是基于SDXL模型,我实测下来30步足够了
    • guidance_scale:提示词相关度,一般默认为5
    • seed:种子
    • width、height:尺寸设置(需1024维度)

风格 | Styles

PNSTYLE_2

安装 | Install

  • 手动安装:
    1. cd custom_nodes
    2. git clone https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker.git
    3. cd custom_nodes/ComfyUI-PhotoMaker
    4. pip install -r requirements.txt
    5. 重启 ComfyUI

工作流 | Workflows

更新日志

  • 20240119

    更新为 V2.1:参考图改为直接输入/路径输入两种新模式,其中直接输入支持多图

  • 20240118

    更新为 V2.0:节点拆分 + 支持本地模型 + 支持自定义尺寸 +提速3倍

    新增本地、hub加载工作流

  • 20240117

    新增单张图输入,并给出对比图

    修复bug,初版上线

  • 20240116

    创建项目

速度实测 | Speed

  • V2.0 提速 3 倍

    • A100 50步 7s

    image

  • V1.5

    • A100 50步 23s

    image

    • v100 50步 90s

    image

Stars

Star History Chart

Credits

感谢@erLin对ComfyUI 的图像张量 Shape (N, H, W, C)的提醒,帮助我成功修复了bug!

PhotoMaker

comfyui-photomaker's People

Contributors

zho-zho-zho avatar bmaltais avatar jesenzhang avatar

Stargazers

M1nd 3xpand3r avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.