CAFECA-IO / KnowledgeManagement

Creating, Sharing, Using and Managing the knowledge and information of CAFECA
https://mermer.com.tw/knowledge-management
MIT License
0 stars 1 forks source link

[用戶頭像生成器] 使用 Restful 介面調用 ComfyUI 生成用戶頭像: 用 image 生成 avatar #255

Closed TzuHanLiang closed 2 months ago

TzuHanLiang commented 2 months ago

使用 workflow :

{
  "last_node_id": 25,
  "last_link_id": 28,
  "nodes": [
    {
      "id": 10,
      "type": "IPAdapterModelLoader",
      "pos": [443, 730],
      "size": { "0": 315, "1": 58 },
      "flags": {},
      "order": 0,
      "mode": 0,
      "outputs": [
        {
          "name": "IPADAPTER",
          "type": "IPADAPTER",
          "links": [10],
          "shape": 3,
          "slot_index": 0
        }
      ],
      "properties": { "Node name for S&R": "IPAdapterModelLoader" },
      "widgets_values": ["ip-adapter-plus-face_sd15.bin"]
    },
    {
      "id": 11,
      "type": "IPAdapterApply",
      "pos": [804, 877],
      "size": { "0": 315, "1": 186 },
      "flags": {},
      "order": 4,
      "mode": 0,
      "inputs": [
        { "name": "ipadapter", "type": "IPADAPTER", "link": 10 },
        { "name": "clip_vision", "type": "CLIP_VISION", "link": 8 },
        { "name": "image", "type": "IMAGE", "link": 9 },
        { "name": "model", "type": "MODEL", "link": 28 },
        { "name": "attn_mask", "type": "MASK", "link": null }
      ],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [15],
          "shape": 3,
          "slot_index": 0
        }
      ],
      "properties": { "Node name for S&R": "IPAdapterApply" },
      "widgets_values": [1.05, 0.05, "original"]
    },
    {
      "id": 13,
      "type": "CLIPVisionLoader",
      "pos": [441, 833],
      "size": { "0": 315, "1": 58 },
      "flags": {},
      "order": 1,
      "mode": 0,
      "outputs": [
        {
          "name": "CLIP_VISION",
          "type": "CLIP_VISION",
          "links": [8],
          "shape": 3,
          "slot_index": 0
        }
      ],
      "properties": { "Node name for S&R": "CLIPVisionLoader" },
      "widgets_values": ["SD1.5\\model.safetensors"]
    },
    {
      "id": 21,
      "type": "KSampler (Efficient)",
      "pos": [1143, 878],
      "size": [431.68129222656125, 662.2113110546868],
      "flags": {},
      "order": 5,
      "mode": 0,
      "inputs": [
        { "name": "model", "type": "MODEL", "link": 15 },
        { "name": "positive", "type": "CONDITIONING", "link": 27 },
        { "name": "negative", "type": "CONDITIONING", "link": 26 },
        {
          "name": "latent_image",
          "type": "LATENT",
          "link": 25,
          "slot_index": 3
        },
        { "name": "optional_vae", "type": "VAE", "link": 24, "slot_index": 4 },
        { "name": "script", "type": "SCRIPT", "link": null }
      ],
      "outputs": [
        { "name": "MODEL", "type": "MODEL", "links": null, "shape": 3 },
        {
          "name": "CONDITIONING+",
          "type": "CONDITIONING",
          "links": null,
          "shape": 3
        },
        {
          "name": "CONDITIONING-",
          "type": "CONDITIONING",
          "links": null,
          "shape": 3
        },
        { "name": "LATENT", "type": "LATENT", "links": null, "shape": 3 },
        { "name": "VAE", "type": "VAE", "links": null, "shape": 3 },
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [],
          "shape": 3,
          "slot_index": 5
        }
      ],
      "properties": { "Node name for S&R": "KSampler (Efficient)" },
      "widgets_values": [-1, null, 20, 5, "euler", "normal", 1, "auto", "true"],
      "color": "#223333",
      "bgcolor": "#335555",
      "shape": 1
    },
    {
      "id": 14,
      "type": "LoadImage",
      "pos": [-23, 940],
      "size": { "0": 315, "1": 314 },
      "flags": {},
      "order": 2,
      "mode": 0,
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [9],
          "shape": 3,
          "slot_index": 0
        },
        { "name": "MASK", "type": "MASK", "links": null, "shape": 3 }
      ],
      "properties": { "Node name for S&R": "LoadImage" },
      "widgets_values": ["JJ2.JPG", "image"]
    },
    {
      "id": 25,
      "type": "Efficient Loader",
      "pos": [327, 937],
      "size": [440.2795682812491, 610.1588569921867],
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [
        { "name": "lora_stack", "type": "LORA_STACK", "link": null },
        { "name": "cnet_stack", "type": "CONTROL_NET_STACK", "link": null }
      ],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [28],
          "shape": 3,
          "slot_index": 0
        },
        {
          "name": "CONDITIONING+",
          "type": "CONDITIONING",
          "links": [27],
          "shape": 3,
          "slot_index": 1
        },
        {
          "name": "CONDITIONING-",
          "type": "CONDITIONING",
          "links": [26],
          "shape": 3,
          "slot_index": 2
        },
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [25],
          "shape": 3,
          "slot_index": 3
        },
        {
          "name": "VAE",
          "type": "VAE",
          "links": [24],
          "shape": 3,
          "slot_index": 4
        },
        { "name": "CLIP", "type": "CLIP", "links": null, "shape": 3 },
        {
          "name": "DEPENDENCIES",
          "type": "DEPENDENCIES",
          "links": null,
          "shape": 3
        }
      ],
      "properties": { "Node name for S&R": "Efficient Loader" },
      "widgets_values": [
        "SD1.5\\revAnimated_v121.safetensors",
        "vae-ft-mse-840000-ema-pruned.safetensors",
        -1,
        "Add More Details - Detail Enhancer _ Tweaker (细节调整) LoRA_v1.0.safetensors",
        0.35000000000000003,
        1,
        "best quality, masterpiece, 8k, Pixar protagonist, cute 3D avatar, smiling, chibi, simple background, super detail",
        "(worst quality:2),(low quality:2),lowres,(ugly:1.331),(duplicate:1.331),(morbid:1.21),(poorly drawn hands:1.5),blurry,(bad anatomy:1.21),(bad proportions:1.331),extra limbs,(disfigured:1.331),(missing arms:1.331),(extra legs:1.331),(fused fingers:1.61051),(too many fingers:1.61051),(unclear eyes:1.331),bad hands,missing fingers,extra digit,(((extra arms and legs))), jpeg artifacts,",
        "none",
        "comfy",
        512,
        512,
        2
      ],
      "color": "#222233",
      "bgcolor": "#333355",
      "shape": 1
    }
  ],
  "links": [
    [8, 13, 0, 11, 1, "CLIP_VISION"],
    [9, 14, 0, 11, 2, "IMAGE"],
    [10, 10, 0, 11, 0, "IPADAPTER"],
    [15, 11, 0, 21, 0, "MODEL"],
    [24, 25, 4, 21, 4, "VAE"],
    [25, 25, 3, 21, 3, "LATENT"],
    [26, 25, 2, 21, 2, "CONDITIONING"],
    [27, 25, 1, 21, 1, "CONDITIONING"],
    [28, 25, 0, 11, 3, "MODEL"]
  ],
  "groups": [],
  "config": {},
  "extra": {},
  "version": 0.4
}
TzuHanLiang commented 2 months ago
TzuHanLiang commented 2 months ago

took 8hrs done