From b61ea6f33bbcff71cb404f5ed60d565cc07c45d8 Mon Sep 17 00:00:00 2001 From: xsl Date: Sun, 26 Jul 2026 22:43:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A35):=20=E7=94=9F=E5=8F=91?= =?UTF-8?q?=E6=9C=BA=E5=88=B6=E5=AF=B9=E9=BD=90=E6=8E=A5=E5=8F=A32=20+=20?= =?UTF-8?q?=E7=BB=9F=E4=B8=80ComfyUI=E9=87=8D=E7=BB=98=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 接口5改造(生发机制与接口2一致,按性别分流): - generate_hairline_pngs: 生发图来源从 _grow_from_texture(局部inpaint) 改为按性别分流——female走 generate_grow_results_swap(swapHair+Flux整帧重绘), male走 generate_grow_results(ComfyUI add_hair) - 新增参数 redraw_max_side/unet_name/v2_defaults(female路径透传) - 接口5 handler 加 flux_model/redraw_max_side Form参数 - 保留接口5独有输出: 3档叠图(middle/high/low)/中心点/face_measure - 已验证: female日志出现"接口2女 管线降分辨率max_side=640"+swap+Flux; male走add_hair.json; generate_grow_image=false正确跳过生发 统一ComfyUI重绘提示词: - "填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜" → "填充遮罩区域的头发" - 覆盖: _REDRAW_PROMPT/_DEFAULT_PROMPT常量 + app.py各接口Form默认 + 工作流JSON节点60(add_hair/0716add-hair-api/hair_repaint) + 全部测试页输入框 --- 0716add-hair-api.json | 2 +- 0716add-hair.json | 2 +- add_hair.json | 2 +- app.py | 29 ++++++++++------ benchmark_hairstyle.py | 2 +- benchmark_matrix.py | 2 +- face_analysis/hairline_grow.py | 2 +- hair_repaint.json | 2 +- hairline/redraw.py | 4 +-- hairline/service.py | 55 ++++++++++++++++++++---------- local_test/app.py | 2 +- local_test/bench.py | 2 +- local_test/bench2.py | 2 +- local_test/bench_quality.py | 2 +- local_test/index.html | 2 +- local_test/test_api.py | 2 +- static/test_interface12.html | 4 +-- static/test_interface12_final.html | 4 +-- static/test_interface2.html | 2 +- static/test_interface3.html | 2 +- static/test_interface7.html | 2 +- 21 files changed, 77 insertions(+), 51 deletions(-) diff --git a/0716add-hair-api.json b/0716add-hair-api.json index 1a36579..b48fe09 100644 --- a/0716add-hair-api.json +++ b/0716add-hair-api.json @@ -29,7 +29,7 @@ "60": { "class_type": "JjkText", "inputs": { - "text": "填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜" + "text": "填充遮罩区域的头发" } }, "22": { diff --git a/0716add-hair.json b/0716add-hair.json index db7e4e1..a4e1929 100644 --- a/0716add-hair.json +++ b/0716add-hair.json @@ -1 +1 @@ -{"id": "431f1189-2c6a-448d-925e-5f6c85416393", "revision": 0, "last_node_id": 63, "last_link_id": 104, "nodes": [{"id": 37, "type": "Image To Mask", "pos": [330.00017074563834, -900.0000465455873], "size": [280, 110], "flags": {}, "order": 13, "mode": 0, "inputs": [{"label": "图像", "localized_name": "图像", "name": "image", "type": "IMAGE", "link": 47}, {"label": "方法", "localized_name": "方法", "name": "method", "type": "COMBO", "widget": {"name": "method"}, "link": null}], "outputs": [{"label": "遮罩", "localized_name": "遮罩", "name": "MASK", "type": "MASK", "links": [79]}], "properties": {"Node name for S&R": "Image To Mask", "cnr_id": "masquerade-nodes-comfyui", "ver": "432cb4d146a391b387a0cd25ace824328b5b61cf", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["intensity"], "color": "#223", "bgcolor": "#335"}, {"id": 33, "type": "Mask Fill Holes", "pos": [320.0000351119579, -1320.0000465455873], "size": [290, 80], "flags": {}, "order": 9, "mode": 0, "inputs": [{"label": "遮罩", "localized_name": "遮罩", "name": "masks", "type": "MASK", "link": 38}], "outputs": [{"label": "遮罩", "localized_name": "遮罩", "name": "MASKS", "type": "MASK", "links": [41]}], "properties": {"cnr_id": "was-node-suite-comfyui", "ver": "1cd8d304eda256c412b8589ce1f00be3c61cf9ec", "Node name for S&R": "Mask Fill Holes", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 32, "type": "LayerUtility: ImageScaleByAspectRatio V2", "pos": [650.0000351119579, -1399.9999109119071], "size": [320, 480], "flags": {}, "order": 14, "mode": 0, "inputs": [{"label": "图像", "localized_name": "image", "name": "image", "shape": 7, "type": "IMAGE", "link": 101}, {"label": "遮罩", "localized_name": "mask", "name": "mask", "shape": 7, "type": "MASK", "link": 79}, {"localized_name": "aspect_ratio", "name": "aspect_ratio", "type": "COMBO", "widget": {"name": "aspect_ratio"}, "link": null}, {"label": "proportional_width", "localized_name": "proportional_width", "name": "proportional_width", "type": "INT", "widget": {"name": "proportional_width"}, "link": 55}, {"label": "proportional_height", "localized_name": "proportional_height", "name": "proportional_height", "type": "INT", "widget": {"name": "proportional_height"}, "link": 56}, {"localized_name": "fit", "name": "fit", "type": "COMBO", "widget": {"name": "fit"}, "link": null}, {"localized_name": "method", "name": "method", "type": "COMBO", "widget": {"name": "method"}, "link": null}, {"localized_name": "round_to_multiple", "name": "round_to_multiple", "type": "COMBO", "widget": {"name": "round_to_multiple"}, "link": null}, {"localized_name": "scale_to_side", "name": "scale_to_side", "type": "COMBO", "widget": {"name": "scale_to_side"}, "link": null}, {"localized_name": "scale_to_length", "name": "scale_to_length", "type": "INT", "widget": {"name": "scale_to_length"}, "link": null}, {"localized_name": "background_color", "name": "background_color", "type": "STRING", "widget": {"name": "background_color"}, "link": null}], "outputs": [{"label": "图像", "localized_name": "image", "name": "image", "type": "IMAGE", "links": [57]}, {"label": "遮罩", "localized_name": "mask", "name": "mask", "type": "MASK", "links": [58]}, {"label": "原始大小", "localized_name": "original_size", "name": "original_size", "type": "BOX"}, {"label": "width", "localized_name": "width", "name": "width", "type": "INT"}, {"label": "height", "localized_name": "height", "name": "height", "type": "INT"}], "properties": {"cnr_id": "comfyui_layerstyle", "ver": "a46b1e6d26d45be9784c49f7065ba44700ef2b63", "Node name for S&R": "LayerUtility: ImageScaleByAspectRatio V2", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": ["custom", 1, 1, "letterbox", "lanczos", "8", "None", 1024, "#000000"], "color": "rgba(38, 73, 116, 0.7)"}, {"id": 14, "type": "GetImageSize+", "pos": [1400.0001707456386, -930.0000465455873], "size": [320, 120.15625], "flags": {}, "order": 17, "mode": 0, "inputs": [{"label": "图像", "localized_name": "图像", "name": "image", "type": "IMAGE", "link": 62}], "outputs": [{"label": "宽度", "localized_name": "宽度", "name": "width", "type": "INT", "links": [3, 7]}, {"label": "高度", "localized_name": "高度", "name": "height", "type": "INT", "links": [4, 8]}, {"label": "count", "localized_name": "count", "name": "count", "type": "INT"}], "properties": {"cnr_id": "comfyui_essentials", "ver": "9d9f4bedfc9f0321c19faf71855e228c93bd0dc9", "Node name for S&R": "GetImageSize+", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 13, "type": "VAEEncode", "pos": [1409.9998994782773, -1100.0000465455873], "size": [320, 100], "flags": {}, "order": 18, "mode": 0, "inputs": [{"label": "图像", "localized_name": "像素", "name": "pixels", "type": "IMAGE", "link": 63}, {"label": "VAE", "localized_name": "vae", "name": "vae", "type": "VAE", "link": 18}], "outputs": [{"label": "Latent", "localized_name": "Latent", "name": "LATENT", "type": "LATENT", "links": [6]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "VAEEncode", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 9, "type": "SamplerCustomAdvanced", "pos": [2500.000170745638, -1220.0000465455873], "size": [270, 330], "flags": {}, "order": 24, "mode": 0, "inputs": [{"label": "噪波生成", "localized_name": "噪波", "name": "noise", "type": "NOISE", "link": 9}, {"label": "引导", "localized_name": "引导器", "name": "guider", "type": "GUIDER", "link": 10}, {"label": "采样器", "localized_name": "采样器", "name": "sampler", "type": "SAMPLER", "link": 11}, {"label": "Sigmas", "localized_name": "西格玛", "name": "sigmas", "type": "SIGMAS", "link": 12}, {"label": "Latent", "localized_name": "Latent图像", "name": "latent_image", "type": "LATENT", "link": 13}], "outputs": [{"label": "输出", "localized_name": "Latent", "name": "output", "type": "LATENT", "slot_index": 0, "links": [14]}, {"label": "降噪输出", "localized_name": "降噪Latent", "name": "denoised_output", "type": "LATENT"}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "SamplerCustomAdvanced", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 22, "type": "CLIPTextEncode", "pos": [1300.0001707456386, -1709.999910911907], "size": [390, 140], "flags": {}, "order": 7, "mode": 0, "inputs": [{"label": "CLIP", "localized_name": "clip", "name": "clip", "type": "CLIP", "link": 92}, {"label": "text", "localized_name": "文本", "name": "text", "type": "STRING", "widget": {"name": "text"}, "link": 98}], "outputs": [{"label": "条件", "localized_name": "条件", "name": "CONDITIONING", "type": "CONDITIONING", "slot_index": 0, "links": [24]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "CLIPTextEncode", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": ["The yellow part of the picture is replaced by a black bowl."], "color": "#232", "bgcolor": "#353"}, {"id": 10, "type": "VAEDecode", "pos": [2759.9998994782773, -1370.0000465455873], "size": [320, 100], "flags": {}, "order": 25, "mode": 0, "inputs": [{"label": "Latent", "localized_name": "Latent", "name": "samples", "type": "LATENT", "link": 14}, {"label": "VAE", "localized_name": "vae", "name": "vae", "type": "VAE", "link": 15}], "outputs": [{"label": "图像", "localized_name": "图像", "name": "IMAGE", "type": "IMAGE", "slot_index": 0, "links": [95]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "VAEDecode", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 39, "type": "ImageScale", "pos": [320.0000351119579, -1150.0000465455873], "size": [290, 210], "flags": {}, "order": 12, "mode": 0, "inputs": [{"label": "图像", "localized_name": "图像", "name": "image", "type": "IMAGE", "link": 44}, {"localized_name": "缩放算法", "name": "upscale_method", "type": "COMBO", "widget": {"name": "upscale_method"}, "link": null}, {"label": "width", "localized_name": "宽度", "name": "width", "type": "INT", "widget": {"name": "width"}, "link": 45}, {"label": "height", "localized_name": "高度", "name": "height", "type": "INT", "widget": {"name": "height"}, "link": 46}, {"localized_name": "裁剪", "name": "crop", "type": "COMBO", "widget": {"name": "crop"}, "link": null}], "outputs": [{"label": "图像", "localized_name": "图像", "name": "IMAGE", "type": "IMAGE", "links": [47]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.43", "Node name for S&R": "ImageScale", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["nearest-exact", 512, 512, "disabled"], "color": "#223", "bgcolor": "#335"}, {"id": 36, "type": "Convert Masks to Images", "pos": [320.0000351119579, -1250.0000465455873], "size": [290, 80], "flags": {}, "order": 11, "mode": 0, "inputs": [{"label": "遮罩", "localized_name": "遮罩", "name": "masks", "type": "MASK", "link": 41}], "outputs": [{"label": "图像", "localized_name": "图像", "name": "IMAGES", "type": "IMAGE", "links": [44]}], "properties": {"cnr_id": "was-node-suite-comfyui", "ver": "1cd8d304eda256c412b8589ce1f00be3c61cf9ec", "Node name for S&R": "Convert Masks to Images", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 44, "type": "ImageAndMaskPreview", "pos": [639.9998994782773, -990.0000465455873], "size": [290, 200], "flags": {}, "order": 15, "mode": 0, "inputs": [{"label": "图像", "localized_name": "图像", "name": "image", "shape": 7, "type": "IMAGE", "link": 57}, {"label": "遮罩", "localized_name": "遮罩", "name": "mask", "shape": 7, "type": "MASK", "link": 58}, {"label": "遮罩不透明", "localized_name": "遮罩不透明", "name": "mask_opacity", "type": "FLOAT", "widget": {"name": "mask_opacity"}, "link": null}, {"label": "遮罩颜色", "localized_name": "遮罩颜色", "name": "mask_color", "type": "STRING", "widget": {"name": "mask_color"}, "link": null}, {"label": "穿透", "localized_name": "穿透", "name": "pass_through", "type": "BOOLEAN", "widget": {"name": "pass_through"}, "link": null}], "outputs": [{"label": "图像", "localized_name": "图像", "name": "composite", "type": "IMAGE", "links": [59, 62, 63]}], "properties": {"cnr_id": "comfyui-kjnodes", "ver": "aeab1a7de581dc7253f48257392e8287bbeee4a9", "Node name for S&R": "ImageAndMaskPreview", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [1, "FFFF00", true], "color": "#223", "bgcolor": "#335"}, {"id": 7, "type": "EmptySD3LatentImage", "pos": [1789.9998994782773, -990.0000465455873], "size": [310, 170], "flags": {}, "order": 20, "mode": 0, "inputs": [{"label": "width", "localized_name": "宽度", "name": "width", "type": "INT", "widget": {"name": "width"}, "link": 7}, {"label": "height", "localized_name": "高度", "name": "height", "type": "INT", "widget": {"name": "height"}, "link": 8}, {"localized_name": "批量大小", "name": "batch_size", "type": "INT", "widget": {"name": "batch_size"}, "link": null}], "outputs": [{"label": "Latent", "localized_name": "Latent", "name": "LATENT", "type": "LATENT", "slot_index": 0, "links": [13]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "EmptySD3LatentImage", "ue_properties": {"version": "7.7", "widget_ue_connectable": {"width": true, "height": true}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [1024, 1024, 1], "color": "#223", "bgcolor": "#335"}, {"id": 62, "type": "ColorMatch", "pos": [2790.000170745638, -1210.0000465455873], "size": [270, 200], "flags": {}, "order": 26, "mode": 0, "inputs": [{"label": "参考图像", "localized_name": "参考图像", "name": "image_ref", "type": "IMAGE", "link": 102}, {"label": "目标图像", "localized_name": "目标图像", "name": "image_target", "type": "IMAGE", "link": 95}, {"label": "方法", "localized_name": "方法", "name": "method", "type": "COMBO", "widget": {"name": "method"}, "link": null}, {"label": "强度", "localized_name": "强度", "name": "strength", "shape": 7, "type": "FLOAT", "widget": {"name": "strength"}, "link": null}, {"label": "多线程", "localized_name": "多线程", "name": "multithread", "shape": 7, "type": "BOOLEAN", "widget": {"name": "multithread"}, "link": null}], "outputs": [{"label": "图像", "localized_name": "图像", "name": "image", "type": "IMAGE", "links": [96, 97]}], "properties": {"cnr_id": "comfyui-kjnodes", "ver": "5b38397a6430fdb16c7bd14a6bd64c2b0e69a5f0", "Node name for S&R": "ColorMatch", "ue_properties": {"widget_ue_connectable": {}, "input_ue_unconnectable": {}, "version": "7.6.2"}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["mkl", 1, true], "color": "#223", "bgcolor": "#335"}, {"id": 1, "type": "BasicScheduler", "pos": [2150.000170745638, -1220.0000465455873], "size": [320, 180], "flags": {}, "order": 22, "mode": 0, "inputs": [{"label": "模型", "localized_name": "模型", "name": "model", "type": "MODEL", "link": 1}, {"localized_name": "调度器", "name": "scheduler", "type": "COMBO", "widget": {"name": "scheduler"}, "link": null}, {"localized_name": "步数", "name": "steps", "type": "INT", "widget": {"name": "steps"}, "link": null}, {"localized_name": "降噪", "name": "denoise", "type": "FLOAT", "widget": {"name": "denoise"}, "link": null}], "outputs": [{"label": "Sigmas", "localized_name": "Sigmas", "name": "SIGMAS", "type": "SIGMAS", "links": [12]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "BasicScheduler", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["simple", 6, 1], "color": "#223", "bgcolor": "#335"}, {"id": 6, "type": "RandomNoise", "pos": [1770.0001707456386, -1170.0000465455873], "size": [310, 110], "flags": {}, "order": 0, "mode": 0, "inputs": [{"localized_name": "噪波随机种", "name": "noise_seed", "type": "INT", "widget": {"name": "noise_seed"}, "link": null}], "outputs": [{"label": "噪波生成", "localized_name": "噪波", "name": "NOISE", "type": "NOISE", "links": [9]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "RandomNoise", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": [1109407891267066, "randomize"], "color": "#2a363b", "bgcolor": "#3f5159"}, {"id": 8, "type": "KSamplerSelect", "pos": [1750.0001707456386, -1290.0000465455873], "size": [320, 110], "flags": {}, "order": 1, "mode": 0, "inputs": [{"localized_name": "采样器名称", "name": "sampler_name", "type": "COMBO", "widget": {"name": "sampler_name"}, "link": null}], "outputs": [{"label": "采样器", "localized_name": "采样器", "name": "SAMPLER", "type": "SAMPLER", "links": [11]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "KSamplerSelect", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["euler"], "color": "#223", "bgcolor": "#335"}, {"id": 31, "type": "easy imageSize", "pos": [-29.999964888042086, -1380.0000465455873], "size": [290, 170], "flags": {}, "order": 8, "mode": 0, "inputs": [{"label": "图像", "localized_name": "图像", "name": "image", "type": "IMAGE", "link": 100}], "outputs": [{"label": "宽度", "localized_name": "宽度", "name": "width_int", "type": "INT", "links": [45, 55]}, {"label": "高度", "localized_name": "高度", "name": "height_int", "type": "INT", "links": [46, 56]}], "properties": {"cnr_id": "comfyui-easy-use", "ver": "501d97bb5ca8d61b486d47379fb1f21a41b772d7", "Node name for S&R": "easy imageSize", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["Width: 767 , Height: 747"], "color": "#223", "bgcolor": "#335"}, {"id": 20, "type": "BasicGuider", "pos": [2170.000170745638, -1350.0000465455873], "size": [270, 100], "flags": {}, "order": 23, "mode": 0, "inputs": [{"label": "模型", "localized_name": "模型", "name": "model", "type": "MODEL", "link": 25}, {"label": "条件", "localized_name": "条件", "name": "conditioning", "type": "CONDITIONING", "link": 104}], "outputs": [{"label": "引导", "localized_name": "引导器", "name": "GUIDER", "type": "GUIDER", "slot_index": 0, "links": [10]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "BasicGuider", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 5, "type": "ReferenceLatent", "pos": [1409.9998994782773, -1220.0000465455873], "size": [310, 100], "flags": {}, "order": 21, "mode": 0, "inputs": [{"label": "conditioning", "localized_name": "条件", "name": "conditioning", "type": "CONDITIONING", "link": 5}, {"label": "latent", "localized_name": "Latent", "name": "latent", "shape": 7, "type": "LATENT", "link": 6}], "outputs": [{"label": "CONDITIONING", "localized_name": "条件", "name": "CONDITIONING", "type": "CONDITIONING", "links": [104]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "ReferenceLatent", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 19, "type": "FluxGuidance", "pos": [1420.0001707456386, -1350.0000465455873], "size": [310, 110], "flags": {}, "order": 10, "mode": 0, "inputs": [{"label": "条件", "localized_name": "条件", "name": "conditioning", "type": "CONDITIONING", "link": 24}, {"localized_name": "引导", "name": "guidance", "type": "FLOAT", "widget": {"name": "guidance"}, "link": null}], "outputs": [{"label": "条件", "localized_name": "条件", "name": "CONDITIONING", "type": "CONDITIONING", "slot_index": 0, "links": [5]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "FluxGuidance", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": [1], "color": "#233", "bgcolor": "#355"}, {"id": 2, "type": "ModelSamplingFlux", "pos": [2130.000170745638, -1020.0000465455873], "size": [320, 200], "flags": {}, "order": 19, "mode": 0, "inputs": [{"label": "模型", "localized_name": "模型", "name": "model", "type": "MODEL", "link": 2}, {"localized_name": "最大移位", "name": "max_shift", "type": "FLOAT", "widget": {"name": "max_shift"}, "link": null}, {"localized_name": "基础移位", "name": "base_shift", "type": "FLOAT", "widget": {"name": "base_shift"}, "link": null}, {"label": "width", "localized_name": "宽度", "name": "width", "type": "INT", "widget": {"name": "width"}, "link": 3}, {"label": "height", "localized_name": "高度", "name": "height", "type": "INT", "widget": {"name": "height"}, "link": 4}], "outputs": [{"label": "模型", "localized_name": "模型", "name": "MODEL", "type": "MODEL", "slot_index": 0, "links": [1, 25]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "ModelSamplingFlux", "ue_properties": {"version": "7.7", "widget_ue_connectable": {"width": true, "height": true}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [1.15, 0.5, 1024, 1024], "color": "#223", "bgcolor": "#335"}, {"id": 16, "type": "UNETLoader", "pos": [1010.0000351119579, -1390.0000465455873], "size": [310, 150], "flags": {}, "order": 2, "mode": 0, "inputs": [{"localized_name": "UNet名称", "name": "unet_name", "type": "COMBO", "widget": {"name": "unet_name"}, "link": null}, {"localized_name": "数据类型", "name": "weight_dtype", "type": "COMBO", "widget": {"name": "weight_dtype"}, "link": null}], "outputs": [{"label": "模型", "localized_name": "模型", "name": "MODEL", "type": "MODEL", "slot_index": 0, "links": [2]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "UNETLoader", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": ["flux2.0/flux-2-klein-9b-fp8.safetensors", "fp8_e4m3fn"], "color": "#223", "bgcolor": "#335"}, {"id": 3, "type": "VAELoader", "pos": [1010.0000351119579, -1250.0000465455873], "size": [310, 110], "flags": {}, "order": 3, "mode": 0, "inputs": [{"localized_name": "vae名称", "name": "vae_name", "type": "COMBO", "widget": {"name": "vae_name"}, "link": null}], "outputs": [{"label": "VAE", "localized_name": "VAE", "name": "VAE", "type": "VAE", "slot_index": 0, "links": [15, 18]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "VAELoader", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["flux2-vae.safetensors"], "color": "#223", "bgcolor": "#335"}, {"id": 61, "type": "CLIPLoader", "pos": [1000.0000351119579, -1110.0000465455873], "size": [350, 180], "flags": {}, "order": 4, "mode": 0, "inputs": [{"label": "clip_name", "localized_name": "CLIP名称", "name": "clip_name", "type": "COMBO", "widget": {"name": "clip_name"}, "link": null}, {"label": "type", "localized_name": "类型", "name": "type", "type": "COMBO", "widget": {"name": "type"}, "link": null}, {"label": "device", "localized_name": "设备", "name": "device", "shape": 7, "type": "COMBO", "widget": {"name": "device"}, "link": null}], "outputs": [{"label": "CLIP", "localized_name": "CLIP", "name": "CLIP", "type": "CLIP", "links": [92]}], "properties": {"cnr_id": "comfy-core", "ver": "0.8.2", "Node name for S&R": "CLIPLoader", "ue_properties": {"version": "7.2.2", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "hasSecondTab": false, "models": [{"name": "qwen_3_4b.safetensors", "directory": "text_encoders", "url": "https://huggingface.co/Comfy-Org/flux2-klein-4B/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors"}], "secondTabText": "Send Back", "enableTabs": false, "secondTabOffset": 80, "tabWidth": 65, "secondTabWidth": 65, "tabXOffset": 10, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}, "widget_ue_connectable": {"clip_name": true, "type": true, "device": true}}, "widgets_values": ["qwen_3_8b_fp8mixed.safetensors", "flux2", "default"], "color": "#223", "bgcolor": "#335"}, {"id": 45, "type": "PreviewImage", "pos": [710.0000351119579, -2120.000046545588], "size": [490, 500], "flags": {}, "order": 16, "mode": 0, "inputs": [{"label": "图像", "localized_name": "图像", "name": "images", "type": "IMAGE", "link": 59}], "outputs": [], "properties": {"cnr_id": "comfy-core", "ver": "0.3.43", "Node name for S&R": "PreviewImage", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": [], "color": "#233", "bgcolor": "#355"}, {"id": 53, "type": "Image Comparer (rgthree)", "pos": [1804.9843155517362, -2156.5215467241615], "size": [650, 550], "flags": {}, "order": 28, "mode": 0, "inputs": [{"dir": 3, "label": "图像_A", "name": "image_a", "type": "IMAGE", "link": 97}, {"dir": 3, "label": "图像_B", "name": "image_b", "type": "IMAGE", "link": 75}], "outputs": [], "properties": {"cnr_id": "rgthree-comfy", "ver": "84a146fee39f7b3a8c6631dcac29bc13b077eb49", "comparer_mode": "Slide", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": [[{"name": "A", "selected": true, "url": "/api/view?filename=rgthree.compare._temp_nqvym_00029_.png&type=temp&subfolder=&rand=0.5791789168392755"}, {"name": "B", "selected": true, "url": "/api/view?filename=rgthree.compare._temp_nqvym_00030_.png&type=temp&subfolder=&rand=0.21946935876437912"}]], "color": "#2a363b", "bgcolor": "#3f5159"}, {"id": 17, "type": "SaveImage", "pos": [2480.000170745638, -2170.000046545588], "size": [570, 580], "flags": {}, "order": 27, "mode": 0, "inputs": [{"label": "图像", "localized_name": "图片", "name": "images", "type": "IMAGE", "link": 96}, {"localized_name": "文件名前缀", "name": "filename_prefix", "type": "STRING", "widget": {"name": "filename_prefix"}, "link": null}], "outputs": [], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "SaveImage", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": ["ComfyUI"], "color": "#2a363b", "bgcolor": "#3f5159"}, {"id": 60, "type": "JjkText", "pos": [1290.0001707456386, -2100.000046545588], "size": [410, 320], "flags": {}, "order": 5, "mode": 0, "inputs": [{"label": "text", "localized_name": "text", "name": "text", "type": "STRING", "widget": {"name": "text"}, "link": null}], "outputs": [{"label": "text", "localized_name": "text", "name": "text", "type": "STRING", "links": [98]}], "properties": {"Node name for S&R": "JjkText", "cnr_id": "ComfyUI-Jjk-Nodes", "ver": "b3c99bb78a99551776b5eab1a820e1cd58f84f31", "ue_properties": {"widget_ue_connectable": {}, "input_ue_unconnectable": {}, "version": "7.7"}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜"], "color": "#223", "bgcolor": "#335"}, {"id": 26, "type": "LoadImage", "pos": [20.000035111957914, -2120.000046545588], "size": [590, 530], "flags": {}, "order": 6, "mode": 0, "inputs": [{"localized_name": "图像", "name": "image", "type": "COMBO", "widget": {"name": "image"}, "link": null}, {"localized_name": "选择文件上传", "name": "upload", "type": "IMAGEUPLOAD", "widget": {"name": "upload"}, "link": null}], "outputs": [{"label": "图像", "localized_name": "图像", "name": "IMAGE", "type": "IMAGE", "links": [75, 100, 101, 102]}, {"label": "遮罩", "localized_name": "遮罩", "name": "MASK", "type": "MASK", "links": [38]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.43", "Node name for S&R": "LoadImage", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "#sdppp_variant": "default", "#sdppp_simple_content": "canvas", "#sdppp_simple_mask": "canvas", "#sdppp_simple_boundary": "canvas", "#sdppp_label": "", "image": "clipspace/clipspace-painted-masked-1784202952306.png [input]"}, "widgets_values": ["clipspace/clipspace-painted-masked-1784202952306.png [input]", "image"], "color": "#2a363b", "bgcolor": "#3f5159"}], "links": [[1, 2, 0, 1, 0, "MODEL"], [2, 16, 0, 2, 0, "MODEL"], [3, 14, 0, 2, 3, "INT"], [4, 14, 1, 2, 4, "INT"], [5, 19, 0, 5, 0, "CONDITIONING"], [6, 13, 0, 5, 1, "LATENT"], [7, 14, 0, 7, 0, "INT"], [8, 14, 1, 7, 1, "INT"], [9, 6, 0, 9, 0, "NOISE"], [10, 20, 0, 9, 1, "GUIDER"], [11, 8, 0, 9, 2, "SAMPLER"], [12, 1, 0, 9, 3, "SIGMAS"], [13, 7, 0, 9, 4, "LATENT"], [14, 9, 0, 10, 0, "LATENT"], [15, 3, 0, 10, 1, "VAE"], [18, 3, 0, 13, 1, "VAE"], [24, 22, 0, 19, 0, "CONDITIONING"], [25, 2, 0, 20, 0, "MODEL"], [38, 26, 1, 33, 0, "MASK"], [41, 33, 0, 36, 0, "MASK"], [44, 36, 0, 39, 0, "IMAGE"], [45, 31, 0, 39, 2, "INT"], [46, 31, 1, 39, 3, "INT"], [47, 39, 0, 37, 0, "IMAGE"], [55, 31, 0, 32, 3, "INT"], [56, 31, 1, 32, 4, "INT"], [57, 32, 0, 44, 0, "IMAGE"], [58, 32, 1, 44, 1, "MASK"], [59, 44, 0, 45, 0, "IMAGE"], [62, 44, 0, 14, 0, "IMAGE"], [63, 44, 0, 13, 0, "IMAGE"], [75, 26, 0, 53, 1, "IMAGE"], [79, 37, 0, 32, 1, "MASK"], [92, 61, 0, 22, 0, "CLIP"], [95, 10, 0, 62, 1, "IMAGE"], [96, 62, 0, 17, 0, "IMAGE"], [97, 62, 0, 53, 0, "IMAGE"], [98, 60, 0, 22, 1, "STRING"], [100, 26, 0, 31, 0, "IMAGE"], [101, 26, 0, 32, 0, "IMAGE"], [102, 26, 0, 62, 0, "IMAGE"], [104, 5, 0, 20, 1, "CONDITIONING"]], "groups": [{"id": 2, "title": "图片上传(图片上右键open in maskeditor画遮罩范围,不用涂)", "bounding": [-10, -2270, 1249.2113037109375, 726.7728881835938], "color": "#A88", "font_size": 45, "flags": {}}, {"id": 5, "title": "提示词【很重要】", "bounding": [1260, -2260, 481.13201904296875, 714.9009399414062], "color": "#8A8", "font_size": 24, "flags": {}}, {"id": 6, "title": "最终效果区", "bounding": [1760, -2260, 1330.0355224609375, 711.3678588867188], "color": "#3f789e", "font_size": 24, "flags": {}}, {"id": 7, "title": "核心工作区", "bounding": [990, -1480, 379.9303894042969, 546.5068969726562], "color": "#3f789e", "font_size": 24, "flags": {}}, {"id": 9, "title": "Group", "bounding": [310, -1470, 635.491455078125, 641.5743408203125], "color": "#3f789e", "font_size": 24, "flags": {}}, {"id": 10, "title": "Group", "bounding": [-50, -1460, 321.03936767578125, 291.3662414550781], "color": "#3f789e", "font_size": 24, "flags": {}}, {"id": 11, "title": "Group", "bounding": [1390, -1470, 1745.5640869140625, 621.2001342773438], "color": "#3f789e", "font_size": 24, "flags": {}}], "config": {}, "extra": {"links_added_by_ue": [], "VHS_KeepIntermediate": true, "ue_links": [], "VHS_MetadataImage": true, "0246.VERSION": [0, 0, 4], "VHS_latentpreviewrate": 0, "frontendVersion": "1.41.21", "VHS_latentpreview": false, "ds": {"scale": 0.45, "offset": [1726.6666011315049, 2886.944475612862]}, "workflowRendererVersion": "LG", "favoritedWidgets": {"favorites": [{"nodeLocatorId": "26", "widgetName": "$$canvas-image-preview"}]}}, "version": 0.4} \ No newline at end of file +{"id": "431f1189-2c6a-448d-925e-5f6c85416393", "revision": 0, "last_node_id": 63, "last_link_id": 104, "nodes": [{"id": 37, "type": "Image To Mask", "pos": [330.00017074563834, -900.0000465455873], "size": [280, 110], "flags": {}, "order": 13, "mode": 0, "inputs": [{"label": "图像", "localized_name": "图像", "name": "image", "type": "IMAGE", "link": 47}, {"label": "方法", "localized_name": "方法", "name": "method", "type": "COMBO", "widget": {"name": "method"}, "link": null}], "outputs": [{"label": "遮罩", "localized_name": "遮罩", "name": "MASK", "type": "MASK", "links": [79]}], "properties": {"Node name for S&R": "Image To Mask", "cnr_id": "masquerade-nodes-comfyui", "ver": "432cb4d146a391b387a0cd25ace824328b5b61cf", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["intensity"], "color": "#223", "bgcolor": "#335"}, {"id": 33, "type": "Mask Fill Holes", "pos": [320.0000351119579, -1320.0000465455873], "size": [290, 80], "flags": {}, "order": 9, "mode": 0, "inputs": [{"label": "遮罩", "localized_name": "遮罩", "name": "masks", "type": "MASK", "link": 38}], "outputs": [{"label": "遮罩", "localized_name": "遮罩", "name": "MASKS", "type": "MASK", "links": [41]}], "properties": {"cnr_id": "was-node-suite-comfyui", "ver": "1cd8d304eda256c412b8589ce1f00be3c61cf9ec", "Node name for S&R": "Mask Fill Holes", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 32, "type": "LayerUtility: ImageScaleByAspectRatio V2", "pos": [650.0000351119579, -1399.9999109119071], "size": [320, 480], "flags": {}, "order": 14, "mode": 0, "inputs": [{"label": "图像", "localized_name": "image", "name": "image", "shape": 7, "type": "IMAGE", "link": 101}, {"label": "遮罩", "localized_name": "mask", "name": "mask", "shape": 7, "type": "MASK", "link": 79}, {"localized_name": "aspect_ratio", "name": "aspect_ratio", "type": "COMBO", "widget": {"name": "aspect_ratio"}, "link": null}, {"label": "proportional_width", "localized_name": "proportional_width", "name": "proportional_width", "type": "INT", "widget": {"name": "proportional_width"}, "link": 55}, {"label": "proportional_height", "localized_name": "proportional_height", "name": "proportional_height", "type": "INT", "widget": {"name": "proportional_height"}, "link": 56}, {"localized_name": "fit", "name": "fit", "type": "COMBO", "widget": {"name": "fit"}, "link": null}, {"localized_name": "method", "name": "method", "type": "COMBO", "widget": {"name": "method"}, "link": null}, {"localized_name": "round_to_multiple", "name": "round_to_multiple", "type": "COMBO", "widget": {"name": "round_to_multiple"}, "link": null}, {"localized_name": "scale_to_side", "name": "scale_to_side", "type": "COMBO", "widget": {"name": "scale_to_side"}, "link": null}, {"localized_name": "scale_to_length", "name": "scale_to_length", "type": "INT", "widget": {"name": "scale_to_length"}, "link": null}, {"localized_name": "background_color", "name": "background_color", "type": "STRING", "widget": {"name": "background_color"}, "link": null}], "outputs": [{"label": "图像", "localized_name": "image", "name": "image", "type": "IMAGE", "links": [57]}, {"label": "遮罩", "localized_name": "mask", "name": "mask", "type": "MASK", "links": [58]}, {"label": "原始大小", "localized_name": "original_size", "name": "original_size", "type": "BOX"}, {"label": "width", "localized_name": "width", "name": "width", "type": "INT"}, {"label": "height", "localized_name": "height", "name": "height", "type": "INT"}], "properties": {"cnr_id": "comfyui_layerstyle", "ver": "a46b1e6d26d45be9784c49f7065ba44700ef2b63", "Node name for S&R": "LayerUtility: ImageScaleByAspectRatio V2", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": ["custom", 1, 1, "letterbox", "lanczos", "8", "None", 1024, "#000000"], "color": "rgba(38, 73, 116, 0.7)"}, {"id": 14, "type": "GetImageSize+", "pos": [1400.0001707456386, -930.0000465455873], "size": [320, 120.15625], "flags": {}, "order": 17, "mode": 0, "inputs": [{"label": "图像", "localized_name": "图像", "name": "image", "type": "IMAGE", "link": 62}], "outputs": [{"label": "宽度", "localized_name": "宽度", "name": "width", "type": "INT", "links": [3, 7]}, {"label": "高度", "localized_name": "高度", "name": "height", "type": "INT", "links": [4, 8]}, {"label": "count", "localized_name": "count", "name": "count", "type": "INT"}], "properties": {"cnr_id": "comfyui_essentials", "ver": "9d9f4bedfc9f0321c19faf71855e228c93bd0dc9", "Node name for S&R": "GetImageSize+", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 13, "type": "VAEEncode", "pos": [1409.9998994782773, -1100.0000465455873], "size": [320, 100], "flags": {}, "order": 18, "mode": 0, "inputs": [{"label": "图像", "localized_name": "像素", "name": "pixels", "type": "IMAGE", "link": 63}, {"label": "VAE", "localized_name": "vae", "name": "vae", "type": "VAE", "link": 18}], "outputs": [{"label": "Latent", "localized_name": "Latent", "name": "LATENT", "type": "LATENT", "links": [6]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "VAEEncode", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 9, "type": "SamplerCustomAdvanced", "pos": [2500.000170745638, -1220.0000465455873], "size": [270, 330], "flags": {}, "order": 24, "mode": 0, "inputs": [{"label": "噪波生成", "localized_name": "噪波", "name": "noise", "type": "NOISE", "link": 9}, {"label": "引导", "localized_name": "引导器", "name": "guider", "type": "GUIDER", "link": 10}, {"label": "采样器", "localized_name": "采样器", "name": "sampler", "type": "SAMPLER", "link": 11}, {"label": "Sigmas", "localized_name": "西格玛", "name": "sigmas", "type": "SIGMAS", "link": 12}, {"label": "Latent", "localized_name": "Latent图像", "name": "latent_image", "type": "LATENT", "link": 13}], "outputs": [{"label": "输出", "localized_name": "Latent", "name": "output", "type": "LATENT", "slot_index": 0, "links": [14]}, {"label": "降噪输出", "localized_name": "降噪Latent", "name": "denoised_output", "type": "LATENT"}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "SamplerCustomAdvanced", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 22, "type": "CLIPTextEncode", "pos": [1300.0001707456386, -1709.999910911907], "size": [390, 140], "flags": {}, "order": 7, "mode": 0, "inputs": [{"label": "CLIP", "localized_name": "clip", "name": "clip", "type": "CLIP", "link": 92}, {"label": "text", "localized_name": "文本", "name": "text", "type": "STRING", "widget": {"name": "text"}, "link": 98}], "outputs": [{"label": "条件", "localized_name": "条件", "name": "CONDITIONING", "type": "CONDITIONING", "slot_index": 0, "links": [24]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "CLIPTextEncode", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": ["The yellow part of the picture is replaced by a black bowl."], "color": "#232", "bgcolor": "#353"}, {"id": 10, "type": "VAEDecode", "pos": [2759.9998994782773, -1370.0000465455873], "size": [320, 100], "flags": {}, "order": 25, "mode": 0, "inputs": [{"label": "Latent", "localized_name": "Latent", "name": "samples", "type": "LATENT", "link": 14}, {"label": "VAE", "localized_name": "vae", "name": "vae", "type": "VAE", "link": 15}], "outputs": [{"label": "图像", "localized_name": "图像", "name": "IMAGE", "type": "IMAGE", "slot_index": 0, "links": [95]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "VAEDecode", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 39, "type": "ImageScale", "pos": [320.0000351119579, -1150.0000465455873], "size": [290, 210], "flags": {}, "order": 12, "mode": 0, "inputs": [{"label": "图像", "localized_name": "图像", "name": "image", "type": "IMAGE", "link": 44}, {"localized_name": "缩放算法", "name": "upscale_method", "type": "COMBO", "widget": {"name": "upscale_method"}, "link": null}, {"label": "width", "localized_name": "宽度", "name": "width", "type": "INT", "widget": {"name": "width"}, "link": 45}, {"label": "height", "localized_name": "高度", "name": "height", "type": "INT", "widget": {"name": "height"}, "link": 46}, {"localized_name": "裁剪", "name": "crop", "type": "COMBO", "widget": {"name": "crop"}, "link": null}], "outputs": [{"label": "图像", "localized_name": "图像", "name": "IMAGE", "type": "IMAGE", "links": [47]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.43", "Node name for S&R": "ImageScale", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["nearest-exact", 512, 512, "disabled"], "color": "#223", "bgcolor": "#335"}, {"id": 36, "type": "Convert Masks to Images", "pos": [320.0000351119579, -1250.0000465455873], "size": [290, 80], "flags": {}, "order": 11, "mode": 0, "inputs": [{"label": "遮罩", "localized_name": "遮罩", "name": "masks", "type": "MASK", "link": 41}], "outputs": [{"label": "图像", "localized_name": "图像", "name": "IMAGES", "type": "IMAGE", "links": [44]}], "properties": {"cnr_id": "was-node-suite-comfyui", "ver": "1cd8d304eda256c412b8589ce1f00be3c61cf9ec", "Node name for S&R": "Convert Masks to Images", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 44, "type": "ImageAndMaskPreview", "pos": [639.9998994782773, -990.0000465455873], "size": [290, 200], "flags": {}, "order": 15, "mode": 0, "inputs": [{"label": "图像", "localized_name": "图像", "name": "image", "shape": 7, "type": "IMAGE", "link": 57}, {"label": "遮罩", "localized_name": "遮罩", "name": "mask", "shape": 7, "type": "MASK", "link": 58}, {"label": "遮罩不透明", "localized_name": "遮罩不透明", "name": "mask_opacity", "type": "FLOAT", "widget": {"name": "mask_opacity"}, "link": null}, {"label": "遮罩颜色", "localized_name": "遮罩颜色", "name": "mask_color", "type": "STRING", "widget": {"name": "mask_color"}, "link": null}, {"label": "穿透", "localized_name": "穿透", "name": "pass_through", "type": "BOOLEAN", "widget": {"name": "pass_through"}, "link": null}], "outputs": [{"label": "图像", "localized_name": "图像", "name": "composite", "type": "IMAGE", "links": [59, 62, 63]}], "properties": {"cnr_id": "comfyui-kjnodes", "ver": "aeab1a7de581dc7253f48257392e8287bbeee4a9", "Node name for S&R": "ImageAndMaskPreview", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [1, "FFFF00", true], "color": "#223", "bgcolor": "#335"}, {"id": 7, "type": "EmptySD3LatentImage", "pos": [1789.9998994782773, -990.0000465455873], "size": [310, 170], "flags": {}, "order": 20, "mode": 0, "inputs": [{"label": "width", "localized_name": "宽度", "name": "width", "type": "INT", "widget": {"name": "width"}, "link": 7}, {"label": "height", "localized_name": "高度", "name": "height", "type": "INT", "widget": {"name": "height"}, "link": 8}, {"localized_name": "批量大小", "name": "batch_size", "type": "INT", "widget": {"name": "batch_size"}, "link": null}], "outputs": [{"label": "Latent", "localized_name": "Latent", "name": "LATENT", "type": "LATENT", "slot_index": 0, "links": [13]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "EmptySD3LatentImage", "ue_properties": {"version": "7.7", "widget_ue_connectable": {"width": true, "height": true}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [1024, 1024, 1], "color": "#223", "bgcolor": "#335"}, {"id": 62, "type": "ColorMatch", "pos": [2790.000170745638, -1210.0000465455873], "size": [270, 200], "flags": {}, "order": 26, "mode": 0, "inputs": [{"label": "参考图像", "localized_name": "参考图像", "name": "image_ref", "type": "IMAGE", "link": 102}, {"label": "目标图像", "localized_name": "目标图像", "name": "image_target", "type": "IMAGE", "link": 95}, {"label": "方法", "localized_name": "方法", "name": "method", "type": "COMBO", "widget": {"name": "method"}, "link": null}, {"label": "强度", "localized_name": "强度", "name": "strength", "shape": 7, "type": "FLOAT", "widget": {"name": "strength"}, "link": null}, {"label": "多线程", "localized_name": "多线程", "name": "multithread", "shape": 7, "type": "BOOLEAN", "widget": {"name": "multithread"}, "link": null}], "outputs": [{"label": "图像", "localized_name": "图像", "name": "image", "type": "IMAGE", "links": [96, 97]}], "properties": {"cnr_id": "comfyui-kjnodes", "ver": "5b38397a6430fdb16c7bd14a6bd64c2b0e69a5f0", "Node name for S&R": "ColorMatch", "ue_properties": {"widget_ue_connectable": {}, "input_ue_unconnectable": {}, "version": "7.6.2"}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["mkl", 1, true], "color": "#223", "bgcolor": "#335"}, {"id": 1, "type": "BasicScheduler", "pos": [2150.000170745638, -1220.0000465455873], "size": [320, 180], "flags": {}, "order": 22, "mode": 0, "inputs": [{"label": "模型", "localized_name": "模型", "name": "model", "type": "MODEL", "link": 1}, {"localized_name": "调度器", "name": "scheduler", "type": "COMBO", "widget": {"name": "scheduler"}, "link": null}, {"localized_name": "步数", "name": "steps", "type": "INT", "widget": {"name": "steps"}, "link": null}, {"localized_name": "降噪", "name": "denoise", "type": "FLOAT", "widget": {"name": "denoise"}, "link": null}], "outputs": [{"label": "Sigmas", "localized_name": "Sigmas", "name": "SIGMAS", "type": "SIGMAS", "links": [12]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "BasicScheduler", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["simple", 6, 1], "color": "#223", "bgcolor": "#335"}, {"id": 6, "type": "RandomNoise", "pos": [1770.0001707456386, -1170.0000465455873], "size": [310, 110], "flags": {}, "order": 0, "mode": 0, "inputs": [{"localized_name": "噪波随机种", "name": "noise_seed", "type": "INT", "widget": {"name": "noise_seed"}, "link": null}], "outputs": [{"label": "噪波生成", "localized_name": "噪波", "name": "NOISE", "type": "NOISE", "links": [9]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "RandomNoise", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": [1109407891267066, "randomize"], "color": "#2a363b", "bgcolor": "#3f5159"}, {"id": 8, "type": "KSamplerSelect", "pos": [1750.0001707456386, -1290.0000465455873], "size": [320, 110], "flags": {}, "order": 1, "mode": 0, "inputs": [{"localized_name": "采样器名称", "name": "sampler_name", "type": "COMBO", "widget": {"name": "sampler_name"}, "link": null}], "outputs": [{"label": "采样器", "localized_name": "采样器", "name": "SAMPLER", "type": "SAMPLER", "links": [11]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "KSamplerSelect", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["euler"], "color": "#223", "bgcolor": "#335"}, {"id": 31, "type": "easy imageSize", "pos": [-29.999964888042086, -1380.0000465455873], "size": [290, 170], "flags": {}, "order": 8, "mode": 0, "inputs": [{"label": "图像", "localized_name": "图像", "name": "image", "type": "IMAGE", "link": 100}], "outputs": [{"label": "宽度", "localized_name": "宽度", "name": "width_int", "type": "INT", "links": [45, 55]}, {"label": "高度", "localized_name": "高度", "name": "height_int", "type": "INT", "links": [46, 56]}], "properties": {"cnr_id": "comfyui-easy-use", "ver": "501d97bb5ca8d61b486d47379fb1f21a41b772d7", "Node name for S&R": "easy imageSize", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["Width: 767 , Height: 747"], "color": "#223", "bgcolor": "#335"}, {"id": 20, "type": "BasicGuider", "pos": [2170.000170745638, -1350.0000465455873], "size": [270, 100], "flags": {}, "order": 23, "mode": 0, "inputs": [{"label": "模型", "localized_name": "模型", "name": "model", "type": "MODEL", "link": 25}, {"label": "条件", "localized_name": "条件", "name": "conditioning", "type": "CONDITIONING", "link": 104}], "outputs": [{"label": "引导", "localized_name": "引导器", "name": "GUIDER", "type": "GUIDER", "slot_index": 0, "links": [10]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "BasicGuider", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 5, "type": "ReferenceLatent", "pos": [1409.9998994782773, -1220.0000465455873], "size": [310, 100], "flags": {}, "order": 21, "mode": 0, "inputs": [{"label": "conditioning", "localized_name": "条件", "name": "conditioning", "type": "CONDITIONING", "link": 5}, {"label": "latent", "localized_name": "Latent", "name": "latent", "shape": 7, "type": "LATENT", "link": 6}], "outputs": [{"label": "CONDITIONING", "localized_name": "条件", "name": "CONDITIONING", "type": "CONDITIONING", "links": [104]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "ReferenceLatent", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [], "color": "#223", "bgcolor": "#335"}, {"id": 19, "type": "FluxGuidance", "pos": [1420.0001707456386, -1350.0000465455873], "size": [310, 110], "flags": {}, "order": 10, "mode": 0, "inputs": [{"label": "条件", "localized_name": "条件", "name": "conditioning", "type": "CONDITIONING", "link": 24}, {"localized_name": "引导", "name": "guidance", "type": "FLOAT", "widget": {"name": "guidance"}, "link": null}], "outputs": [{"label": "条件", "localized_name": "条件", "name": "CONDITIONING", "type": "CONDITIONING", "slot_index": 0, "links": [5]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "FluxGuidance", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": [1], "color": "#233", "bgcolor": "#355"}, {"id": 2, "type": "ModelSamplingFlux", "pos": [2130.000170745638, -1020.0000465455873], "size": [320, 200], "flags": {}, "order": 19, "mode": 0, "inputs": [{"label": "模型", "localized_name": "模型", "name": "model", "type": "MODEL", "link": 2}, {"localized_name": "最大移位", "name": "max_shift", "type": "FLOAT", "widget": {"name": "max_shift"}, "link": null}, {"localized_name": "基础移位", "name": "base_shift", "type": "FLOAT", "widget": {"name": "base_shift"}, "link": null}, {"label": "width", "localized_name": "宽度", "name": "width", "type": "INT", "widget": {"name": "width"}, "link": 3}, {"label": "height", "localized_name": "高度", "name": "height", "type": "INT", "widget": {"name": "height"}, "link": 4}], "outputs": [{"label": "模型", "localized_name": "模型", "name": "MODEL", "type": "MODEL", "slot_index": 0, "links": [1, 25]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "ModelSamplingFlux", "ue_properties": {"version": "7.7", "widget_ue_connectable": {"width": true, "height": true}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": [1.15, 0.5, 1024, 1024], "color": "#223", "bgcolor": "#335"}, {"id": 16, "type": "UNETLoader", "pos": [1010.0000351119579, -1390.0000465455873], "size": [310, 150], "flags": {}, "order": 2, "mode": 0, "inputs": [{"localized_name": "UNet名称", "name": "unet_name", "type": "COMBO", "widget": {"name": "unet_name"}, "link": null}, {"localized_name": "数据类型", "name": "weight_dtype", "type": "COMBO", "widget": {"name": "weight_dtype"}, "link": null}], "outputs": [{"label": "模型", "localized_name": "模型", "name": "MODEL", "type": "MODEL", "slot_index": 0, "links": [2]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "UNETLoader", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": ["flux2.0/flux-2-klein-9b-fp8.safetensors", "fp8_e4m3fn"], "color": "#223", "bgcolor": "#335"}, {"id": 3, "type": "VAELoader", "pos": [1010.0000351119579, -1250.0000465455873], "size": [310, 110], "flags": {}, "order": 3, "mode": 0, "inputs": [{"localized_name": "vae名称", "name": "vae_name", "type": "COMBO", "widget": {"name": "vae_name"}, "link": null}], "outputs": [{"label": "VAE", "localized_name": "VAE", "name": "VAE", "type": "VAE", "slot_index": 0, "links": [15, 18]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "VAELoader", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["flux2-vae.safetensors"], "color": "#223", "bgcolor": "#335"}, {"id": 61, "type": "CLIPLoader", "pos": [1000.0000351119579, -1110.0000465455873], "size": [350, 180], "flags": {}, "order": 4, "mode": 0, "inputs": [{"label": "clip_name", "localized_name": "CLIP名称", "name": "clip_name", "type": "COMBO", "widget": {"name": "clip_name"}, "link": null}, {"label": "type", "localized_name": "类型", "name": "type", "type": "COMBO", "widget": {"name": "type"}, "link": null}, {"label": "device", "localized_name": "设备", "name": "device", "shape": 7, "type": "COMBO", "widget": {"name": "device"}, "link": null}], "outputs": [{"label": "CLIP", "localized_name": "CLIP", "name": "CLIP", "type": "CLIP", "links": [92]}], "properties": {"cnr_id": "comfy-core", "ver": "0.8.2", "Node name for S&R": "CLIPLoader", "ue_properties": {"version": "7.2.2", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "hasSecondTab": false, "models": [{"name": "qwen_3_4b.safetensors", "directory": "text_encoders", "url": "https://huggingface.co/Comfy-Org/flux2-klein-4B/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors"}], "secondTabText": "Send Back", "enableTabs": false, "secondTabOffset": 80, "tabWidth": 65, "secondTabWidth": 65, "tabXOffset": 10, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}, "widget_ue_connectable": {"clip_name": true, "type": true, "device": true}}, "widgets_values": ["qwen_3_8b_fp8mixed.safetensors", "flux2", "default"], "color": "#223", "bgcolor": "#335"}, {"id": 45, "type": "PreviewImage", "pos": [710.0000351119579, -2120.000046545588], "size": [490, 500], "flags": {}, "order": 16, "mode": 0, "inputs": [{"label": "图像", "localized_name": "图像", "name": "images", "type": "IMAGE", "link": 59}], "outputs": [], "properties": {"cnr_id": "comfy-core", "ver": "0.3.43", "Node name for S&R": "PreviewImage", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": [], "color": "#233", "bgcolor": "#355"}, {"id": 53, "type": "Image Comparer (rgthree)", "pos": [1804.9843155517362, -2156.5215467241615], "size": [650, 550], "flags": {}, "order": 28, "mode": 0, "inputs": [{"dir": 3, "label": "图像_A", "name": "image_a", "type": "IMAGE", "link": 97}, {"dir": 3, "label": "图像_B", "name": "image_b", "type": "IMAGE", "link": 75}], "outputs": [], "properties": {"cnr_id": "rgthree-comfy", "ver": "84a146fee39f7b3a8c6631dcac29bc13b077eb49", "comparer_mode": "Slide", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": [[{"name": "A", "selected": true, "url": "/api/view?filename=rgthree.compare._temp_nqvym_00029_.png&type=temp&subfolder=&rand=0.5791789168392755"}, {"name": "B", "selected": true, "url": "/api/view?filename=rgthree.compare._temp_nqvym_00030_.png&type=temp&subfolder=&rand=0.21946935876437912"}]], "color": "#2a363b", "bgcolor": "#3f5159"}, {"id": 17, "type": "SaveImage", "pos": [2480.000170745638, -2170.000046545588], "size": [570, 580], "flags": {}, "order": 27, "mode": 0, "inputs": [{"label": "图像", "localized_name": "图片", "name": "images", "type": "IMAGE", "link": 96}, {"localized_name": "文件名前缀", "name": "filename_prefix", "type": "STRING", "widget": {"name": "filename_prefix"}, "link": null}], "outputs": [], "properties": {"cnr_id": "comfy-core", "ver": "0.3.41", "Node name for S&R": "SaveImage", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}}, "widgets_values": ["ComfyUI"], "color": "#2a363b", "bgcolor": "#3f5159"}, {"id": 60, "type": "JjkText", "pos": [1290.0001707456386, -2100.000046545588], "size": [410, 320], "flags": {}, "order": 5, "mode": 0, "inputs": [{"label": "text", "localized_name": "text", "name": "text", "type": "STRING", "widget": {"name": "text"}, "link": null}], "outputs": [{"label": "text", "localized_name": "text", "name": "text", "type": "STRING", "links": [98]}], "properties": {"Node name for S&R": "JjkText", "cnr_id": "ComfyUI-Jjk-Nodes", "ver": "b3c99bb78a99551776b5eab1a820e1cd58f84f31", "ue_properties": {"widget_ue_connectable": {}, "input_ue_unconnectable": {}, "version": "7.7"}, "ttNbgOverride": {"color": "#223", "bgcolor": "#335", "groupcolor": "#88A"}}, "widgets_values": ["填充遮罩区域的头发"], "color": "#223", "bgcolor": "#335"}, {"id": 26, "type": "LoadImage", "pos": [20.000035111957914, -2120.000046545588], "size": [590, 530], "flags": {}, "order": 6, "mode": 0, "inputs": [{"localized_name": "图像", "name": "image", "type": "COMBO", "widget": {"name": "image"}, "link": null}, {"localized_name": "选择文件上传", "name": "upload", "type": "IMAGEUPLOAD", "widget": {"name": "upload"}, "link": null}], "outputs": [{"label": "图像", "localized_name": "图像", "name": "IMAGE", "type": "IMAGE", "links": [75, 100, 101, 102]}, {"label": "遮罩", "localized_name": "遮罩", "name": "MASK", "type": "MASK", "links": [38]}], "properties": {"cnr_id": "comfy-core", "ver": "0.3.43", "Node name for S&R": "LoadImage", "ue_properties": {"version": "7.7", "widget_ue_connectable": {}, "input_ue_unconnectable": {}}, "#sdppp_variant": "default", "#sdppp_simple_content": "canvas", "#sdppp_simple_mask": "canvas", "#sdppp_simple_boundary": "canvas", "#sdppp_label": "", "image": "clipspace/clipspace-painted-masked-1784202952306.png [input]"}, "widgets_values": ["clipspace/clipspace-painted-masked-1784202952306.png [input]", "image"], "color": "#2a363b", "bgcolor": "#3f5159"}], "links": [[1, 2, 0, 1, 0, "MODEL"], [2, 16, 0, 2, 0, "MODEL"], [3, 14, 0, 2, 3, "INT"], [4, 14, 1, 2, 4, "INT"], [5, 19, 0, 5, 0, "CONDITIONING"], [6, 13, 0, 5, 1, "LATENT"], [7, 14, 0, 7, 0, "INT"], [8, 14, 1, 7, 1, "INT"], [9, 6, 0, 9, 0, "NOISE"], [10, 20, 0, 9, 1, "GUIDER"], [11, 8, 0, 9, 2, "SAMPLER"], [12, 1, 0, 9, 3, "SIGMAS"], [13, 7, 0, 9, 4, "LATENT"], [14, 9, 0, 10, 0, "LATENT"], [15, 3, 0, 10, 1, "VAE"], [18, 3, 0, 13, 1, "VAE"], [24, 22, 0, 19, 0, "CONDITIONING"], [25, 2, 0, 20, 0, "MODEL"], [38, 26, 1, 33, 0, "MASK"], [41, 33, 0, 36, 0, "MASK"], [44, 36, 0, 39, 0, "IMAGE"], [45, 31, 0, 39, 2, "INT"], [46, 31, 1, 39, 3, "INT"], [47, 39, 0, 37, 0, "IMAGE"], [55, 31, 0, 32, 3, "INT"], [56, 31, 1, 32, 4, "INT"], [57, 32, 0, 44, 0, "IMAGE"], [58, 32, 1, 44, 1, "MASK"], [59, 44, 0, 45, 0, "IMAGE"], [62, 44, 0, 14, 0, "IMAGE"], [63, 44, 0, 13, 0, "IMAGE"], [75, 26, 0, 53, 1, "IMAGE"], [79, 37, 0, 32, 1, "MASK"], [92, 61, 0, 22, 0, "CLIP"], [95, 10, 0, 62, 1, "IMAGE"], [96, 62, 0, 17, 0, "IMAGE"], [97, 62, 0, 53, 0, "IMAGE"], [98, 60, 0, 22, 1, "STRING"], [100, 26, 0, 31, 0, "IMAGE"], [101, 26, 0, 32, 0, "IMAGE"], [102, 26, 0, 62, 0, "IMAGE"], [104, 5, 0, 20, 1, "CONDITIONING"]], "groups": [{"id": 2, "title": "图片上传(图片上右键open in maskeditor画遮罩范围,不用涂)", "bounding": [-10, -2270, 1249.2113037109375, 726.7728881835938], "color": "#A88", "font_size": 45, "flags": {}}, {"id": 5, "title": "提示词【很重要】", "bounding": [1260, -2260, 481.13201904296875, 714.9009399414062], "color": "#8A8", "font_size": 24, "flags": {}}, {"id": 6, "title": "最终效果区", "bounding": [1760, -2260, 1330.0355224609375, 711.3678588867188], "color": "#3f789e", "font_size": 24, "flags": {}}, {"id": 7, "title": "核心工作区", "bounding": [990, -1480, 379.9303894042969, 546.5068969726562], "color": "#3f789e", "font_size": 24, "flags": {}}, {"id": 9, "title": "Group", "bounding": [310, -1470, 635.491455078125, 641.5743408203125], "color": "#3f789e", "font_size": 24, "flags": {}}, {"id": 10, "title": "Group", "bounding": [-50, -1460, 321.03936767578125, 291.3662414550781], "color": "#3f789e", "font_size": 24, "flags": {}}, {"id": 11, "title": "Group", "bounding": [1390, -1470, 1745.5640869140625, 621.2001342773438], "color": "#3f789e", "font_size": 24, "flags": {}}], "config": {}, "extra": {"links_added_by_ue": [], "VHS_KeepIntermediate": true, "ue_links": [], "VHS_MetadataImage": true, "0246.VERSION": [0, 0, 4], "VHS_latentpreviewrate": 0, "frontendVersion": "1.41.21", "VHS_latentpreview": false, "ds": {"scale": 0.45, "offset": [1726.6666011315049, 2886.944475612862]}, "workflowRendererVersion": "LG", "favoritedWidgets": {"favorites": [{"nodeLocatorId": "26", "widgetName": "$$canvas-image-preview"}]}}, "version": 0.4} \ No newline at end of file diff --git a/add_hair.json b/add_hair.json index fdcab91..efda7e3 100644 --- a/add_hair.json +++ b/add_hair.json @@ -410,7 +410,7 @@ }, "60": { "inputs": { - "text": "填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜" + "text": "填充遮罩区域的头发" }, "class_type": "JjkText", "_meta": { diff --git a/app.py b/app.py index 1ff177f..0d2cc93 100644 --- a/app.py +++ b/app.py @@ -775,7 +775,7 @@ async def hair_grow( hair_style: Optional[str] = Form(default=None, description="发型序号逗号分隔(必填),如 1,2,3。female:1-5 male:1-4"), beauty_enabled: bool = Form(default=False, description="是否开启美颜(本期不生效)"), use_mask: bool = Form(default=True, description="是否启用 inpaint 遮罩(测试对比用)。false 时用干净原图生成(空遮罩,不烧模板线)"), - prompt: str = Form(default="填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜", description="ComfyUI 提示词,会替换工作流节点60的文本"), + prompt: str = Form(default="填充遮罩区域的头发", description="ComfyUI 提示词,会替换工作流节点60的文本"), flux_model: Optional[str] = Form(default=None, description="Flux 模型文件名(切换模型用)。None=工作流默认;如 flux-2-klein-9b-Q5_K_M.gguf / flux-2-klein-9b-Q4_K_M.gguf / flux2.0/flux-2-klein-9b-fp8.safetensors"), redraw_max_side: Optional[int] = Form(default=None, description="重绘压图长边像素。None=默认896;0=不缩图(原图直送);其他如 768/640/1024"), ): @@ -890,7 +890,7 @@ async def hair_grow_b( marked_image_url: Optional[str] = Form(default=None, description="划线图片 URL"), marked_image_base64: Optional[str] = Form(default=None, description="划线图片 base64"), use_mask: bool = Form(default=True, description="是否画发际线(测试对比用)。false 时跳过划线检测、直接送划线图"), - prompt: str = Form(default="填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜", description="ComfyUI 提示词,会替换工作流节点60的文本"), + prompt: str = Form(default="填充遮罩区域的头发", description="ComfyUI 提示词,会替换工作流节点60的文本"), ): # 划线图三选一取图(只需这一张) marked_raw, e = await resolve_image_bytes(marked_image_file, marked_image_url, marked_image_base64) @@ -1019,10 +1019,13 @@ async def face_features( - 必填 `gender`(`male`/`female`),决定发型集合(female 5 / male 4)。 - 必填 `hair_style`(发型序号,逗号分隔如 `1,2,3`),决定返回哪些发际线类型。缺失/越界/非法返回 `1007`。 `female`:1=ellipse,2=flower,3=heart,4=straight,5=wave;`male`:1=ellipse,2=inverse_arc,3=m,4=straight。 -- 可选 `use_mask` / `prompt`:同接口2 的生发控制参数。 - 注:生发黑模板固定取 `hairline_texture_black/`(middle 档),即三档叠图分别用各自贴图、但生发目标固定 middle。 -- 可选 `generate_grow_image`(默认 `true`):是否生成生发效果图(ComfyUI 生发,全流程最耗时)。 +- 可选 `use_mask` / `prompt`:同接口2 的生发控制参数(仅 male 路径生效)。 +- 可选 `generate_grow_image`(默认 `true`):是否生成生发效果图(最耗时)。 `false` 时跳过生发,各发型 `grown_image_*` 恒为 `null`,仅返回三档发际线叠图与中心点,大幅降低耗时。 +- **生发机制(同接口2,按性别分流)**: + `female` 走「换发型 + Flux-2 整帧重绘」(依赖 change_hair:8801 与 ComfyUI:8188); + `male` 走 ComfyUI `add_hair` 原生 inpaint。 +- 可选 `flux_model` / `redraw_max_side`:同接口2(仅 female 路径生效)。 **返回说明**: @@ -1099,9 +1102,11 @@ async def hairline_generate( image_base64: Optional[str] = Form(default=None, description="图片 base64(需带 data:image/...;base64, 前缀)"), gender: Optional[str] = Form(default=None, description="性别 male/female(必填)"), hair_style: Optional[str] = Form(default=None, description="发型序号逗号分隔(必填,如 1,2,3)。female:1-5 male:1-4"), - use_mask: bool = Form(default=True, description="生发是否启用 inpaint 遮罩(同接口2,测试对比用)"), - prompt: str = Form(default="填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜", description="ComfyUI 提示词(同接口2),会替换工作流节点60的文本"), - generate_grow_image: bool = Form(default=True, description="是否生成生发效果图(ComfyUI 生发,最耗时)。默认 true 出图;false 时跳过生发,各发型 grown_image 恒为 null,仅返回三档发际线叠图与中心点"), + use_mask: bool = Form(default=True, description="生发是否启用 inpaint 遮罩(同接口2,仅 male 路径生效)"), + prompt: str = Form(default="填充遮罩区域的头发", description="ComfyUI 提示词(同接口2,仅 male 路径生效),会替换工作流节点60的文本"), + generate_grow_image: bool = Form(default=True, description="是否生成生发效果图(最耗时)。默认 true 出图;false 时跳过生发,各发型 grown_image 恒为 null,仅返回三档发际线叠图与中心点"), + flux_model: Optional[str] = Form(default=None, description="Flux 模型文件名(同接口2,切换模型用)。None=工作流默认"), + redraw_max_side: Optional[int] = Form(default=None, description="重绘压图长边像素(同接口2,仅 female 路径生效)。None=默认896;0=不缩图(原图直送);其他如 768/640/1024"), ): if gender not in ("male", "female"): return err(1004, "gender 必填且只能为 male / female") @@ -1126,7 +1131,9 @@ async def hairline_generate( res = await run_in_threadpool( generate_hairline_pngs, image, gender, hair_styles, use_mask, prompt, - generate_grow_image=generate_grow_image) + generate_grow_image=generate_grow_image, + redraw_max_side=redraw_max_side, unet_name=flux_model, + v2_defaults=_V2_FINAL_DEFAULTS) if res is None: return err(1001, "无法识别人像") @@ -1494,7 +1501,7 @@ async def hairline_grow_v2( inpainting_fill: int = Form(default=1, description="change_hair服务端重绘填充:0=保留原图 | 1=噪声 | 2=纯色 | 3=潜变量。默认 1"), mask_blur: int = Form(default=11, description="change_hair服务端遮罩边缘模糊像素,默认 11"), mask_dilate_scale: float = Form(default=1.0, description="change_hair服务端遮罩膨胀缩放,默认 1.0"), - comfyui_prompt: Optional[str] = Form(default=None, description="Flux-2 重绘提示词,None 用默认「填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜」"), + comfyui_prompt: Optional[str] = Form(default=None, description="Flux-2 重绘提示词,None 用默认「填充遮罩区域的头发」"), beauty_alpha: float = Form(default=0.6, description="redraw_band 版 band 外的全脸美颜融入强度(0=band外无美颜纯用final,1≈整帧版),默认 0.6"), band_lo_mult: float = Form(default=0.5, description="重绘带外推倍率下限(相对 hairline_push_cm,内轮廓=0×、原外推线=1.0×),默认 0.5"), band_hi_mult: float = Form(default=1.5, description="重绘带外推倍率上限(相对 hairline_push_cm),默认 1.5"), @@ -1660,7 +1667,7 @@ async def hairline_grow_v2_final_v2( async def api_redraw( image_file: UploadFile = File(..., description="人物图片(JPG/PNG)"), mask_file: UploadFile = File(..., description="遮罩图片(PNG,支持红/白/alpha 格式)"), - prompt: str = Form(default="填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜", + prompt: str = Form(default="填充遮罩区域的头发", description="ComfyUI 提示词"), ): image_bytes = await image_file.read() diff --git a/benchmark_hairstyle.py b/benchmark_hairstyle.py index a1ba06d..72eab9d 100644 --- a/benchmark_hairstyle.py +++ b/benchmark_hairstyle.py @@ -55,7 +55,7 @@ def gpu_used(): def call(img_path, hair_num, model_file, res_val): fd = {"gender": "female", "hair_style": str(hair_num), "use_mask": "true", - "prompt": "填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜"} + "prompt": "填充遮罩区域的头发"} if model_file: fd["flux_model"] = model_file if res_val != "": diff --git a/benchmark_matrix.py b/benchmark_matrix.py index d2f4583..bd1f519 100644 --- a/benchmark_matrix.py +++ b/benchmark_matrix.py @@ -54,7 +54,7 @@ def call(img_path, model_file, res_val): "gender": "female", "hair_style": "2", # 花瓣形 "use_mask": "true", - "prompt": "填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜", + "prompt": "填充遮罩区域的头发", } if model_file: fd["flux_model"] = model_file diff --git a/face_analysis/hairline_grow.py b/face_analysis/hairline_grow.py index 6b32fe5..6dea2eb 100644 --- a/face_analysis/hairline_grow.py +++ b/face_analysis/hairline_grow.py @@ -1107,7 +1107,7 @@ def generate_hairline_redraw(image_bgr, hairline_id, is_hr=False, seg_model="seg "hairline_id": hairline_id, "blend_method": blend_method, "hairline_push_cm": round(float(hairline_push_cm), 2), - "comfyui_prompt": comfyui_prompt or "填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜", + "comfyui_prompt": comfyui_prompt or "填充遮罩区域的头发", "beauty_alpha": beauty_alpha, "px_per_cm": round(float(px_per_cm), 4), "mask_pixels": mask_viz["mask_pixels"], diff --git a/hair_repaint.json b/hair_repaint.json index 55bfa8f..99e27b4 100644 --- a/hair_repaint.json +++ b/hair_repaint.json @@ -410,7 +410,7 @@ }, "60": { "inputs": { - "text": "填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜" + "text": "填充遮罩区域的头发" }, "class_type": "JjkText", "_meta": { diff --git a/hairline/redraw.py b/hairline/redraw.py index 76eefb8..6065781 100644 --- a/hairline/redraw.py +++ b/hairline/redraw.py @@ -16,7 +16,7 @@ from . import comfyui logger = logging.getLogger("hair.worker") -_DEFAULT_PROMPT = "填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜" +_DEFAULT_PROMPT = "填充遮罩区域的头发" _REPO = os.path.dirname(os.path.dirname(__file__)) _REPAINT_WORKFLOW = os.path.join(_REPO, "0716add-hair-api.json") @@ -62,7 +62,7 @@ def run_redraw(image_bytes: bytes, mask_bytes: bytes, Args: image_bytes: 人物图片字节(JPG/PNG) mask_bytes: 遮罩图片字节(支持红/白/alpha 遮罩格式) - prompt: 提示词,None 用默认 "填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜" + prompt: 提示词,None 用默认 "填充遮罩区域的头发" timeout: ComfyUI 超时秒数 front: True 时任务插到 ComfyUI 队列最前(接口2 时延敏感路径用) unet_name: 非 None 时切换 Flux 模型(如 flux-2-klein-9b-Q5_K_M.gguf),None 用工作流默认 diff --git a/hairline/service.py b/hairline/service.py index a2fa87a..382432d 100644 --- a/hairline/service.py +++ b/hairline/service.py @@ -46,7 +46,7 @@ _BLACK_TEXTURE_DIR = os.path.join(_REPO, "hairline_texture_black") # 关键:ComfyUI 单卡显存装不下 Flux(7.7G)+qwen CLIP(3.9G) 同驻,靠缓存 CLIP 文本条件避免重载。 # prompt 不同会使缓存失效 → 重载 CLIP 并挤出 Flux(每次 +4s)。三接口用同一字符串即可全程命中。 # 与 app.py 接口2/接口3 的默认 prompt 保持一致;可用 REDRAW_PROMPT 覆盖。 -_REDRAW_PROMPT = os.getenv("REDRAW_PROMPT", "填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜") +_REDRAW_PROMPT = os.getenv("REDRAW_PROMPT", "填充遮罩区域的头发") # 接口2 女重绘整条管线(swapHair + ComfyUI)送模型前限边。真实照片常达 1257x1495: # 全分辨率 ComfyUI 重绘要 13~21s 且激活显存把模型挤出。女性路径含 swapHair(SD WebUI ~5.3s @@ -410,14 +410,22 @@ def _grow_from_texture(image_bgr: np.ndarray, ctx: dict, white_path: str | None, def generate_hairline_pngs(image_bgr: np.ndarray, gender: str, hair_styles: list[int], use_mask: bool = True, prompt: str | None = None, - generate_grow_image: bool = True): + generate_grow_image: bool = True, + redraw_max_side: int | None = None, + unet_name: str | None = None, + v2_defaults: dict | None = None): """接口5:对选中发型返回 middle/high/low 三档发际线透明叠图 + 生发图(同接口2)。 入参同接口2:先选 gender,再多选 hair_styles(必填,1-indexed 按贴图排序)。 每个选中发型返回三档叠图(middle/high/low,RGBA 透明层只含发际线曲线)与一张生发图; - 三档贴图同名,生发黑模板固定取自 hairline_texture_black/(middle),故生发目标固定 middle 档。 - use_mask/prompt:同接口2 的生发参数。 - generate_grow_image(默认 True):是否生成生发图(ComfyUI,最耗时)。False 时跳过生发, + + 生发机制(同接口2,按性别分流): + - female:generate_grow_results_swap(swapHair + Flux-2 整帧重绘) + - male:generate_grow_results(ComfyUI add_hair inpaint) + redraw_max_side / unet_name / v2_defaults:female 路径参数,同接口2。 + male 路径仅用 unet_name;redraw_max_side/v2_defaults 对 male 无意义(忽略)。 + use_mask/prompt:仅 male 路径生效(同接口2 male)。 + generate_grow_image(默认 True):是否生成生发图(最耗时)。False 时跳过生发, 各发型 grown_png 恒为 None,可大幅降低耗时(仅留三档发际线叠图与中心点)。 Returns: {"images":[{hairline_type,order,overlays:{middle,high,low}((H,W,4) RGBA 透明层),grown_png}], "best_centers":{"middle":(x,y),"high":(x,y),"low":(x,y)}};无人脸 None。 @@ -439,11 +447,27 @@ def generate_hairline_pngs(image_bgr: np.ndarray, gender: str, # 三档贴图表(同性别、同 key 顺序,因三个文件夹同名) tex_by_level = {lv: get_texture_map(lv)[gender] for lv in _TEXTURE_DIRS} - # use_mask=False:干净原图+空遮罩与贴图无关,只跑一次 ComfyUI,选中项复用 - # generate_grow_image=False:完全跳过生发(最耗时),grown_png 恒为 None - shared_grown = None - if generate_grow_image and not use_mask: - shared_grown = _grow_from_texture(image_bgr, ctx, None, use_mask=False, prompt=prompt) + # 生发图(同接口2,按性别分流):一次性算出所有选中发型的生发图,按 order 对应回叠图。 + # female→generate_grow_results_swap(swapHair+Flux-2 整帧重绘); + # male→generate_grow_results(ComfyUI add_hair inpaint)。 + # generate_grow_image=False 时跳过,grown_by_order 为空 dict(各发型 grown_png 恒 None)。 + grown_by_order: dict[int, bytes | None] = {} + if generate_grow_image: + try: + if gender == "female": + items = generate_grow_results_swap( + image_bgr, hair_styles, v2_defaults or {}, + redraw_max_side=redraw_max_side, unet_name=unet_name) + else: + items = generate_grow_results( + image_bgr, gender, use_mask, prompt, hair_styles, + unet_name=unet_name) + if items is None: + return None # 无人脸(同接口2 的 None 语义) + for it in items: + grown_by_order[it["order"]] = it.get("grown_png") + except Exception as e: # noqa: BLE001 整批生发失败不拖垮叠图主结果 + logger.warning("接口5 生发批量失败(gender=%s):%s", gender, e) def _center_of(overlay): """从某档发际线透明叠图取面部中轴处的发际线中点 (x,y),无像素返回 None。""" @@ -456,18 +480,13 @@ def generate_hairline_pngs(image_bgr: np.ndarray, gender: str, images, best_centers = [], None for s in hair_styles: # s = 1-indexed 发型序号 - key, mid_path = tex_by_level["middle"][s - 1] + key, _mid_path = tex_by_level["middle"][s - 1] overlays = {} for lv in _TEXTURE_DIRS: white = load_texture_rgba(tex_by_level[lv][s - 1][1]) overlays[lv] = build_overlay_layer(h, w, ctx["points"], ext_faces, uv, white) - # 生发:固定 middle 黑模板(generate_grow_image=False 时跳过,恒 None) - if not generate_grow_image: - grown_png = None - elif not use_mask: - grown_png = shared_grown - else: - grown_png = _grow_from_texture(image_bgr, ctx, mid_path, use_mask=True, prompt=prompt) + # 生发图:从按性别算好的结果里按 order 取(generate_grow_image=False 时缺省 None) + grown_png = grown_by_order.get(s) images.append({"hairline_type": key, "order": s, "overlays": overlays, "grown_png": grown_png}) # best_centers:首个选中发型三档(middle/high/low)发际线中点 diff --git a/local_test/app.py b/local_test/app.py index f7f1079..c41e3d9 100644 --- a/local_test/app.py +++ b/local_test/app.py @@ -206,7 +206,7 @@ def generate(): return jsonify({"error": msg}), 400 image_file = request.files["image"] mask_file = request.files["mask"] - prompt_text = request.form.get("prompt", "填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜") + prompt_text = request.form.get("prompt", "填充遮罩区域的头发") log.info( "收到请求: image=%s mask=%s prompt=%r", image_file.filename, mask_file.filename, prompt_text, diff --git a/local_test/bench.py b/local_test/bench.py index db82cf1..73dc679 100644 --- a/local_test/bench.py +++ b/local_test/bench.py @@ -27,7 +27,7 @@ def prep_and_upload(): def run_once(fname, model, dtype, steps): - wf = A.build_workflow(fname, "填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜") + wf = A.build_workflow(fname, "填充遮罩区域的头发") wf["16"]["inputs"]["unet_name"] = model wf["16"]["inputs"]["weight_dtype"] = dtype wf["1"]["inputs"]["steps"] = steps diff --git a/local_test/bench2.py b/local_test/bench2.py index 379ae88..71b73b0 100644 --- a/local_test/bench2.py +++ b/local_test/bench2.py @@ -33,7 +33,7 @@ def upload(scale=1.0): def run(fname, steps): - wf = A.build_workflow(fname, "填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜") + wf = A.build_workflow(fname, "填充遮罩区域的头发") wf["16"]["inputs"]["unet_name"] = MODEL wf["16"]["inputs"]["weight_dtype"] = DTYPE wf["1"]["inputs"]["steps"] = steps diff --git a/local_test/bench_quality.py b/local_test/bench_quality.py index 70af6f7..d8b24d0 100644 --- a/local_test/bench_quality.py +++ b/local_test/bench_quality.py @@ -30,7 +30,7 @@ SEED = 123456789 imgs = [] labels = [] for steps in [2, 3, 4, 6]: - wf = A.build_workflow(fname, "填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜", seed=SEED) + wf = A.build_workflow(fname, "填充遮罩区域的头发", seed=SEED) wf["16"]["inputs"]["unet_name"] = MODEL wf["16"]["inputs"]["weight_dtype"] = DTYPE wf["1"]["inputs"]["steps"] = steps diff --git a/local_test/index.html b/local_test/index.html index 51d0382..ea46293 100644 --- a/local_test/index.html +++ b/local_test/index.html @@ -55,7 +55,7 @@ button { padding: 10px 24px; border: none; border-radius: 6px; cursor: pointer;
- +
diff --git a/local_test/test_api.py b/local_test/test_api.py index a84574c..051c863 100644 --- a/local_test/test_api.py +++ b/local_test/test_api.py @@ -25,7 +25,7 @@ resp = requests.post( "image": ("original.jpg", img_data, "image/jpeg"), "mask": ("mask.png", mask_data, "image/png"), }, - data={"prompt": "填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜"}, + data={"prompt": "填充遮罩区域的头发"}, timeout=600, ) diff --git a/static/test_interface12.html b/static/test_interface12.html index d4602d0..6c2b87f 100644 --- a/static/test_interface12.html +++ b/static/test_interface12.html @@ -69,7 +69,7 @@
- +
@@ -354,7 +354,7 @@ function dataUriToBlob(dataUri) { async function runLocalRedraw() { if (!_finalDataUri || !_maskDataUri) { setStatus('缺少 final 或遮罩,请先生成', 'error'); return; } - const prompt = $('localTestPrompt').value.trim() || '填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜'; + const prompt = $('localTestPrompt').value.trim() || '填充遮罩区域的头发'; const btn = $('redrawBtn'); btn.disabled = true; btn.textContent = '⏳ 重绘中...'; flog('===== 调后端重绘 =====', 'info'); diff --git a/static/test_interface12_final.html b/static/test_interface12_final.html index 63512ca..51c7477 100644 --- a/static/test_interface12_final.html +++ b/static/test_interface12_final.html @@ -56,7 +56,7 @@
- +
@@ -169,7 +169,7 @@ async function submitTest() { async function runLocalRedraw() { if (!_finalDataUri || !_maskDataUri) { setStatus('缺少 final 或遮罩,请先生成', 'error'); return; } - const prompt = $('localTestPrompt').value.trim() || '填充遮罩区域的头发,皮肤加一点磨皮,再加一点美颜'; + const prompt = $('localTestPrompt').value.trim() || '填充遮罩区域的头发'; const btn = $('redrawBtn'); btn.disabled = true; btn.textContent = '⏳ 重绘中...'; diff --git a/static/test_interface2.html b/static/test_interface2.html index 31ff52f..86bb3d1 100644 --- a/static/test_interface2.html +++ b/static/test_interface2.html @@ -117,7 +117,7 @@
JPG/PNG  |  生发图生成较慢(数十秒~数分钟),请耐心等待
- +
diff --git a/static/test_interface3.html b/static/test_interface3.html index 9877e16..70011b0 100644 --- a/static/test_interface3.html +++ b/static/test_interface3.html @@ -94,7 +94,7 @@
💬 提示词(prompt)
- +
diff --git a/static/test_interface7.html b/static/test_interface7.html index f4f330c..01a661f 100644 --- a/static/test_interface7.html +++ b/static/test_interface7.html @@ -104,7 +104,7 @@
JPG/PNG  |  生发图生成较慢(数十秒~数分钟),请耐心等待  |  工作流: add_hair2.json
- +