AUTOBUY購物中心

ComfyUI教學 - 使用 Z-Image 文生圖產生高品質的成品

  • 2026-06-18 17:53:21

    除了使用 SDXL 進行文生圖之外,ComfyUI 近期也提供了 Z-Image-Base 模型的範本工作流,能夠快速生成細節豐富、品質優異的圖片,是相當值得嘗試的文生圖方案。

    首先,在 ComfyUI 左側功能列中點選 「Templates」,接著於模板分類中選擇:

    GENERATION TYPE:Image

    然後再點選:

    Z-Image:Text to Image

    此時 ComfyUI 會自動載入 Z-Image 所需的完整工作流。不過第一次使用時,系統會提示缺少必要模型,分別為:

    z_image_bf16.safetensors
    qwen_3_4b.safetensors

    這兩個模型都可以直接透過 ComfyUI 提供的下載功能取得。下載完成後,請依照下列路徑放置:

    z_image_bf16.safetensors

    ComfyUI\models\diffusion_models\

    qwen_3_4b.safetensors

    ComfyUI\models\text_encoders\

    模型檔案放置完成後,建議重新啟動 ComfyUI,確認系統已正確載入相關資源。

    接下來便可開始進行文生圖創作。我們只需要輸入想要的提示詞(Prompt),並設定輸出圖片的尺寸與比例,即可利用 Z-Image-Base 模型生成高品質的圖片內容。

    相較於傳統文生圖模型,Z-Image-Base 在畫面細節、構圖理解以及文字提示的遵循度方面都有相當不錯的表現。搭配 ComfyUI 內建的範本工作流,即使是初次接觸 AI 繪圖的使用者,也能在幾分鐘內完成第一張高品質作品。

  • 2026-06-22 15:24:16

    另外,小編也找到了一套相當實用的 Z-Image-Turbo 資源,讓大家能夠在 ComfyUI 中快速體驗高品質的文生圖功能。

    Z-Image-Turbo 主要需要下載以下三個模型:

    • z_image_turbo_bf16.safetensors[下載
    • ae.safetensors[下載
    • qwen_3_4b.safetensors[下載

    下載完成後,請依照模型類型分別放置到對應目錄:

    ComfyUI\models\diffusion_models\
    └─ z_image_turbo_bf16.safetensors
    
    ComfyUI\models\vae\
    └─ ae.safetensors
    
    ComfyUI\models\text_encoders\
    └─ qwen_3_4b.safetensors

    完成模型部署後,重新啟動 ComfyUI,接著載入下方提供的 Workflow JSON 檔案。

    {
      "id": "d45a6fab-47b7-4ecf-94ec-600dfd20b7f9",
      "revision": 0,
      "last_node_id": 56,
      "last_link_id": 62,
      "nodes": [
        {
          "id": 46,
          "type": "UNETLoader",
          "pos": [
            110,
            313
          ],
          "size": [
            270,
            82
          ],
          "flags": {},
          "order": 0,
          "mode": 0,
          "inputs": [],
          "outputs": [
            {
              "name": "MODEL",
              "type": "MODEL",
              "links": [
                62
              ]
            }
          ],
          "properties": {
            "cnr_id": "comfy-core",
            "ver": "0.21.1",
            "Node name for S&R": "UNETLoader",
            "ue_properties": {
              "widget_ue_connectable": {},
              "version": "7.8",
              "input_ue_unconnectable": {}
            }
          },
          "widgets_values": [
            "z_image_turbo_bf16.safetensors",
            "default"
          ]
        },
        {
          "id": 47,
          "type": "ModelSamplingAuraFlow",
          "pos": [
            902,
            267
          ],
          "size": [
            270,
            58
          ],
          "flags": {},
          "order": 4,
          "mode": 0,
          "inputs": [
            {
              "name": "model",
              "type": "MODEL",
              "link": 62
            }
          ],
          "outputs": [
            {
              "name": "MODEL",
              "type": "MODEL",
              "links": [
                40
              ]
            }
          ],
          "properties": {
            "cnr_id": "comfy-core",
            "ver": "0.21.1",
            "Node name for S&R": "ModelSamplingAuraFlow",
            "ue_properties": {
              "widget_ue_connectable": {},
              "version": "7.8",
              "input_ue_unconnectable": {}
            }
          },
          "widgets_values": [
            3
          ]
        },
        {
          "id": 39,
          "type": "CLIPLoader",
          "pos": [
            110,
            438
          ],
          "size": [
            270,
            106
          ],
          "flags": {},
          "order": 1,
          "mode": 0,
          "inputs": [],
          "outputs": [
            {
              "name": "CLIP",
              "type": "CLIP",
              "links": [
                44
              ]
            }
          ],
          "properties": {
            "cnr_id": "comfy-core",
            "ver": "0.21.1",
            "Node name for S&R": "CLIPLoader",
            "ue_properties": {
              "widget_ue_connectable": {},
              "version": "7.8",
              "input_ue_unconnectable": {}
            }
          },
          "widgets_values": [
            "qwen_3_4b.safetensors",
            "lumina2",
            "default"
          ]
        },
        {
          "id": 42,
          "type": "ConditioningZeroOut",
          "pos": [
            658,
            728
          ],
          "size": [
            204.134765625,
            26
          ],
          "flags": {},
          "order": 6,
          "mode": 0,
          "inputs": [
            {
              "name": "conditioning",
              "type": "CONDITIONING",
              "link": 36
            }
          ],
          "outputs": [
            {
              "name": "CONDITIONING",
              "type": "CONDITIONING",
              "links": [
                42
              ]
            }
          ],
          "properties": {
            "cnr_id": "comfy-core",
            "ver": "0.21.1",
            "Node name for S&R": "ConditioningZeroOut",
            "ue_properties": {
              "widget_ue_connectable": {},
              "version": "7.8",
              "input_ue_unconnectable": {}
            }
          },
          "widgets_values": []
        },
        {
          "id": 44,
          "type": "KSampler",
          "pos": [
            900,
            375
          ],
          "size": [
            270,
            262
          ],
          "flags": {},
          "order": 7,
          "mode": 0,
          "inputs": [
            {
              "name": "model",
              "type": "MODEL",
              "link": 40
            },
            {
              "name": "positive",
              "type": "CONDITIONING",
              "link": 41
            },
            {
              "name": "negative",
              "type": "CONDITIONING",
              "link": 42
            },
            {
              "name": "latent_image",
              "type": "LATENT",
              "link": 43
            }
          ],
          "outputs": [
            {
              "name": "LATENT",
              "type": "LATENT",
              "links": [
                38
              ]
            }
          ],
          "properties": {
            "cnr_id": "comfy-core",
            "ver": "0.21.1",
            "Node name for S&R": "KSampler",
            "ue_properties": {
              "widget_ue_connectable": {},
              "version": "7.8",
              "input_ue_unconnectable": {}
            }
          },
          "widgets_values": [
            479070766613392,
            "randomize",
            9,
            1,
            "res_multistep",
            "simple",
            1
          ]
        },
        {
          "id": 40,
          "type": "VAELoader",
          "pos": [
            110,
            583
          ],
          "size": [
            270,
            58
          ],
          "flags": {},
          "order": 2,
          "mode": 0,
          "inputs": [],
          "outputs": [
            {
              "name": "VAE",
              "type": "VAE",
              "links": [
                39
              ]
            }
          ],
          "properties": {
            "cnr_id": "comfy-core",
            "ver": "0.21.1",
            "Node name for S&R": "VAELoader",
            "ue_properties": {
              "widget_ue_connectable": {},
              "version": "7.8",
              "input_ue_unconnectable": {}
            }
          },
          "widgets_values": [
            "ae.safetensors"
          ]
        },
        {
          "id": 43,
          "type": "VAEDecode",
          "pos": [
            1247,
            172
          ],
          "size": [
            140,
            46
          ],
          "flags": {},
          "order": 8,
          "mode": 0,
          "inputs": [
            {
              "name": "samples",
              "type": "LATENT",
              "link": 38
            },
            {
              "name": "vae",
              "type": "VAE",
              "link": 39
            }
          ],
          "outputs": [
            {
              "name": "IMAGE",
              "type": "IMAGE",
              "links": [
                45
              ]
            }
          ],
          "properties": {
            "cnr_id": "comfy-core",
            "ver": "0.21.1",
            "Node name for S&R": "VAEDecode",
            "ue_properties": {
              "widget_ue_connectable": {},
              "version": "7.8",
              "input_ue_unconnectable": {}
            }
          },
          "widgets_values": []
        },
        {
          "id": 9,
          "type": "SaveImage",
          "pos": [
            1240,
            260
          ],
          "size": [
            270,
            270
          ],
          "flags": {},
          "order": 9,
          "mode": 0,
          "inputs": [
            {
              "name": "images",
              "type": "IMAGE",
              "link": 45
            }
          ],
          "outputs": [],
          "properties": {
            "cnr_id": "comfy-core",
            "ver": "0.21.1",
            "Node name for S&R": "SaveImage",
            "ue_properties": {
              "widget_ue_connectable": {},
              "version": "7.8",
              "input_ue_unconnectable": {}
            }
          },
          "widgets_values": [
            "Z-Image/ComfyUI"
          ]
        },
        {
          "id": 45,
          "type": "CLIPTextEncode",
          "pos": [
            448,
            313
          ],
          "size": [
            400,
            200
          ],
          "flags": {},
          "order": 5,
          "mode": 0,
          "inputs": [
            {
              "name": "clip",
              "type": "CLIP",
              "link": 44
            }
          ],
          "outputs": [
            {
              "name": "CONDITIONING",
              "type": "CONDITIONING",
              "links": [
                36,
                41
              ]
            }
          ],
          "properties": {
            "cnr_id": "comfy-core",
            "ver": "0.21.1",
            "Node name for S&R": "CLIPTextEncode",
            "ue_properties": {
              "widget_ue_connectable": {},
              "version": "7.8",
              "input_ue_unconnectable": {}
            }
          },
          "widgets_values": [
            "A professional female cosplay model dressed in a blue and pink futuristic combat suit with white armor details and a pink cat-ear gaming headset. The design resembles a high-end Korean esports pilot uniform with a cute rabbit emblem on the chest.\n\nShe has long dark hair, soft bangs, large expressive eyes, natural makeup, glossy lips, and smooth realistic skin. Her expression is friendly and charming.\n\nThe portrait is photographed from a slightly elevated angle, emphasizing eye contact and creating an intimate connection with the viewer.\n\nSoft studio lighting, beauty dish lighting, premium cosplay photography, realistic skin texture, subtle bokeh background, shallow depth of field, high-end fashion photography, photorealistic, detailed costume materials, realistic leather and armor textures, cinematic quality.\n"
          ]
        },
        {
          "id": 41,
          "type": "EmptySD3LatentImage",
          "pos": [
            114,
            741
          ],
          "size": [
            270,
            106
          ],
          "flags": {},
          "order": 3,
          "mode": 0,
          "inputs": [],
          "outputs": [
            {
              "name": "LATENT",
              "type": "LATENT",
              "links": [
                43
              ]
            }
          ],
          "properties": {
            "cnr_id": "comfy-core",
            "ver": "0.21.1",
            "Node name for S&R": "EmptySD3LatentImage",
            "ue_properties": {
              "widget_ue_connectable": {},
              "version": "7.8",
              "input_ue_unconnectable": {}
            }
          },
          "widgets_values": [
            832,
            1472,
            1
          ]
        }
      ],
      "links": [
        [
          62,
          46,
          0,
          47,
          0,
          "MODEL"
        ],
        [
          40,
          47,
          0,
          44,
          0,
          "MODEL"
        ],
        [
          44,
          39,
          0,
          45,
          0,
          "CLIP"
        ],
        [
          36,
          45,
          0,
          42,
          0,
          "CONDITIONING"
        ],
        [
          41,
          45,
          0,
          44,
          1,
          "CONDITIONING"
        ],
        [
          42,
          42,
          0,
          44,
          2,
          "CONDITIONING"
        ],
        [
          43,
          41,
          0,
          44,
          3,
          "LATENT"
        ],
        [
          38,
          44,
          0,
          43,
          0,
          "LATENT"
        ],
        [
          39,
          40,
          0,
          43,
          1,
          "VAE"
        ],
        [
          45,
          43,
          0,
          9,
          0,
          "IMAGE"
        ]
      ],
      "groups": [],
      "config": {},
      "extra": {
        "ue_links": [],
        "ds": {
          "scale": 1.0013793103448276,
          "offset": [
            -9.134814049586794,
            -18.527777777777885
          ]
        },
        "links_added_by_ue": [],
        "frontendVersion": "1.43.18",
        "VHS_latentpreview": false,
        "VHS_latentpreviewrate": 0,
        "VHS_MetadataImage": true,
        "VHS_KeepIntermediate": true
      },
      "version": 0.4
    }

    設定完成後,即可透過 Z-Image-Turbo 輸入提示詞(Prompt),快速生成高品質且符合需求的 AI 圖像。相較於傳統工作流,Z-Image-Turbo 擁有更簡潔的設定流程,非常適合作為入門體驗或日常快速生成圖片的工具。