From a508d91c8a16dfc513ae2f8440bc57affab6c469 Mon Sep 17 00:00:00 2001 From: RimoChan Date: Fri, 26 Jun 2026 14:51:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=961=E4=B8=8Bpipeline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 14 +- examples/diffusers_match_edit_workflow.json | 1352 +++++++++++++++++ .../diffusers_match_edit_workflow_api.json | 191 --- .../diffusers_match_edit_workflow_gui.json | 333 ---- 4 files changed, 1358 insertions(+), 532 deletions(-) create mode 100644 examples/diffusers_match_edit_workflow.json delete mode 100644 examples/diffusers_match_edit_workflow_api.json delete mode 100644 examples/diffusers_match_edit_workflow_gui.json diff --git a/README.md b/README.md index e4185ab..160b0a1 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ RUM 的原始想法、模型和参考推理代码来自 RimoChan/RUM。本仓库 - 主分支坚持 ComfyUI native 路线,不暴露直接调用 diffusers pipeline 的节点,也不要求用户在 ComfyUI 环境安装 diffusers。 - 上游 `RimoChan/RUM` 当前默认分支是 `slave`,2026-06-23 的 HEAD 是 `1662918`。本仓库和上游训练仓库没有共同祖先,不能直接 `merge` 或 `cherry-pick`;这里同步的是推理契约、默认参数、权重文件名和验证样本。 - `examples/diffusers_match_workflow_api.json` 是 T2I 严格验证路径,默认使用上游当前推荐的 `model-checkpoint-1158000.safetensors`、`960x1152`、20 steps、CFG 9、seed 1 示例。 -- `examples/diffusers_match_edit_workflow_api.json` 和 `examples/diffusers_match_edit_workflow_gui.json` 是新增 edit 路径,默认使用 `model-checkpoint-1202000.safetensors` 和参考图输入。 +- `examples/diffusers_match_edit_workflow.json` 是新增 edit 路径,默认使用 `model-checkpoint-1202000.safetensors` 和参考图输入。 - 新增 `RUMFlux2NativeMatchReferenceEncode` 节点,把 ComfyUI `IMAGE` + `VAE` 编码成专用 `RUM_REFERENCE_LATENTS`;`RUMFlux2DiffusersCFGuider` 增加可选 `reference_latents` 输入,不连接时旧 T2I workflow 行为不变。 这段状态很重要:**主分支不是 diffusers wrapper;严格对齐靠 native diffusers-match workflow。** T2I/edit workflow 已在 `I:\ComfyUI-aki-v1.6\ComfyUI` 生成成功;严格 `pixel_equal=true` 还要求上游 reference 环境、ComfyUI 环境和模型精度完全一致。 @@ -105,8 +105,7 @@ height=1152 ### Edit diffusers-match workflow ```text -examples/diffusers_match_edit_workflow_api.json -examples/diffusers_match_edit_workflow_gui.json +examples/diffusers_match_edit_workflow.json ``` 默认参数: @@ -128,7 +127,7 @@ height=1200 在 ComfyUI UI 中使用 edit workflow: 1. 把上游参考图 `img/抓人.jpg` 放到 `ComfyUI/input/rum_reference.jpg`,或者在 `LoadImage` 节点里选择你自己的参考图。 -2. 打开 `examples/diffusers_match_edit_workflow_gui.json`。 +2. 打开 `examples/diffusers_match_edit_workflow.json`。 3. 确认 `RUMFlux2LoadNativeModel` 选择 `model-checkpoint-1202000.safetensors`。 4. 确认 `RUMFlux2NativeMatchReferenceEncode` 已连接到 `RUMFlux2DiffusersCFGuider.reference_latents`。 5. 不要使用 `--cpu-vae` 做严格像素验证;只想生成可用图片时 CPU VAE 也可以运行,但最终 PNG 可能不是逐像素一致。 @@ -290,7 +289,7 @@ The original RUM idea, model, training work, and reference inference code come f - The main branch stays native-only: it does not expose a node that directly calls a diffusers pipeline, and users do not need to install diffusers into ComfyUI. - Upstream `RimoChan/RUM` currently uses `slave` as the default branch; the 2026-06-23 HEAD is `1662918`. This repository and the upstream training repository do not share common history, so this update syncs inference contracts, defaults, model filenames, and validation samples instead of using `merge` or `cherry-pick`. - `examples/diffusers_match_workflow_api.json` is the T2I strict validation path. It now defaults to the current upstream `model-checkpoint-1158000.safetensors`, `960x1152`, 20 steps, CFG 9, seed 1 sample. -- `examples/diffusers_match_edit_workflow_api.json` and `examples/diffusers_match_edit_workflow_gui.json` add the edit path, defaulting to `model-checkpoint-1202000.safetensors` plus a reference image input. +- `examples/diffusers_match_edit_workflow.json` add the edit path, defaulting to `model-checkpoint-1202000.safetensors` plus a reference image input. - `RUMFlux2NativeMatchReferenceEncode` encodes ComfyUI `IMAGE` + `VAE` into `RUM_REFERENCE_LATENTS`; `RUMFlux2DiffusersCFGuider` now accepts optional `reference_latents`, while disconnected T2I workflows keep the old behavior. Important: **main is not a diffusers wrapper; exact validation is achieved through the native diffusers-match workflow.** T2I and edit workflows have been manually verified to generate images in `I:\ComfyUI-aki-v1.6\ComfyUI`; strict `pixel_equal=true` still requires the upstream reference environment, the ComfyUI environment, and model precision to match. @@ -386,8 +385,7 @@ Current upstream T2I prompt/seed samples: ### Edit diffusers-match Workflow ```text -examples/diffusers_match_edit_workflow_api.json -examples/diffusers_match_edit_workflow_gui.json +examples/diffusers_match_edit_workflow.json ``` Default parameters: @@ -409,7 +407,7 @@ height=1200 To use the edit workflow in the ComfyUI UI: 1. Put upstream `img/抓人.jpg` into `ComfyUI/input/rum_reference.jpg`, or select your own reference image in the `LoadImage` node. -2. Open `examples/diffusers_match_edit_workflow_gui.json`. +2. Open `examples/diffusers_match_edit_workflow.json`. 3. Confirm `RUMFlux2LoadNativeModel` is set to `model-checkpoint-1202000.safetensors`. 4. Confirm `RUMFlux2NativeMatchReferenceEncode` is connected to `RUMFlux2DiffusersCFGuider.reference_latents`. 5. Do not use `--cpu-vae` for strict pixel validation. CPU VAE can still generate usable images, but final PNGs may not be pixel-identical. diff --git a/examples/diffusers_match_edit_workflow.json b/examples/diffusers_match_edit_workflow.json new file mode 100644 index 0000000..892cfde --- /dev/null +++ b/examples/diffusers_match_edit_workflow.json @@ -0,0 +1,1352 @@ +{ + "id": "13f28565-eb81-43e7-ac48-bdf58bc94a74", + "revision": 0, + "last_node_id": 27, + "last_link_id": 53, + "nodes": [ + { + "id": 10, + "type": "LoadImage", + "pos": [ + 920, + 840 + ], + "size": [ + 280, + 360 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 51 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.26.2", + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "test.png", + "image" + ] + }, + { + "id": 26, + "type": "66f6fa19-4b2f-4e59-977a-0552a83141a0", + "pos": [ + 1280, + 840 + ], + "size": [ + 480, + 715.140625 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 51 + } + ], + "outputs": [ + { + "name": "images", + "type": "IMAGE", + "links": [ + 53 + ] + } + ], + "properties": { + "proxyWidgets": [ + [ + "2", + "rum_checkpoint_name" + ], + [ + "6", + "prompt" + ], + [ + "6", + "negative_prompt" + ], + [ + "13", + "noise_seed" + ], + [ + "15", + "steps" + ], + [ + "22", + "cfg" + ], + [ + "18", + "vae_name" + ], + [ + "4", + "clip_name" + ], + [ + "5", + "clip_name1" + ], + [ + "5", + "clip_name2" + ] + ], + "cnr_id": "comfy-core", + "ver": "0.26.2" + }, + "widgets_values": [] + }, + { + "id": 27, + "type": "PreviewImage", + "pos": [ + 1840, + 840 + ], + "size": [ + 225, + 279.140625 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 53 + } + ], + "outputs": [ + { + "name": "images", + "type": "IMAGE", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.26.2", + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [] + } + ], + "links": [ + [ + 51, + 10, + 0, + 26, + 0, + "IMAGE" + ], + [ + 53, + 26, + 0, + 27, + 0, + "IMAGE" + ] + ], + "groups": [], + "definitions": { + "subgraphs": [ + { + "id": "66f6fa19-4b2f-4e59-977a-0552a83141a0", + "version": 1, + "state": { + "lastGroupId": 0, + "lastNodeId": 27, + "lastLinkId": 53, + "lastRerouteId": 0 + }, + "revision": 0, + "config": {}, + "name": "New Subgraph", + "inputNode": { + "id": -10, + "bounding": [ + -88, + 808.5703125, + 128, + 68 + ] + }, + "outputNode": { + "id": -20, + "bounding": [ + 2898.8441406250004, + 808.5703125, + 128, + 68 + ] + }, + "inputs": [ + { + "id": "e4adf1d1-8318-4d11-9a9a-1483e2da7761", + "name": "image", + "type": "IMAGE", + "linkIds": [ + 33, + 48 + ], + "localized_name": "image", + "pos": [ + 16, + 832.5703125 + ] + } + ], + "outputs": [ + { + "id": "f6d8dd9a-a048-4f84-a8bc-ca2913e1e146", + "name": "images", + "type": "IMAGE", + "linkIds": [ + 42 + ], + "localized_name": "images", + "pos": [ + 2922.8441406250004, + 832.5703125 + ] + } + ], + "widgets": [], + "nodes": [ + { + "id": 2, + "type": "RUMFlux2LoadNativeModel", + "pos": [ + 120, + 120 + ], + "size": [ + 320, + 200 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "localized_name": "model", + "name": "model", + "type": "MODEL", + "links": [ + 26 + ] + }, + { + "localized_name": "status", + "name": "status", + "type": "STRING", + "links": null + } + ], + "properties": { + "cnr_id": "comfyui-rum", + "ver": "452e1a6ccb728b846c938cc95599e61413b3f869", + "Node name for S&R": "RUMFlux2LoadNativeModel" + }, + "widgets_values": [ + "model-checkpoint-1246000.safetensors", + 200, + "" + ] + }, + { + "id": 3, + "type": "RUMFlux2DiffusersMatchModelPatch", + "pos": [ + 520, + 120 + ], + "size": [ + 400, + 200 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "localized_name": "model", + "name": "model", + "type": "MODEL", + "link": 26 + } + ], + "outputs": [ + { + "localized_name": "model", + "name": "model", + "type": "MODEL", + "links": [ + 44 + ] + }, + { + "localized_name": "status", + "name": "status", + "type": "STRING", + "links": null + } + ], + "properties": { + "cnr_id": "comfyui-rum", + "ver": "452e1a6ccb728b846c938cc95599e61413b3f869", + "Node name for S&R": "RUMFlux2DiffusersMatchModelPatch" + }, + "widgets_values": [ + 200, + 77, + true + ] + }, + { + "id": 4, + "type": "CLIPLoader", + "pos": [ + 120, + 400 + ], + "size": [ + 280, + 160 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "localized_name": "CLIP", + "name": "CLIP", + "type": "CLIP", + "links": [ + 27 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.26.2", + "Node name for S&R": "CLIPLoader" + }, + "widgets_values": [ + "qwen_3_4b.safetensors", + "flux2", + "default" + ] + }, + { + "id": 5, + "type": "DualCLIPLoader", + "pos": [ + 120, + 640 + ], + "size": [ + 280, + 200 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "localized_name": "CLIP", + "name": "CLIP", + "type": "CLIP", + "links": [ + 28 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.26.2", + "Node name for S&R": "DualCLIPLoader" + }, + "widgets_values": [ + "waiIllustriousSDXL_v140_clip_l.safetensors", + "waiIllustriousSDXL_v140_clip_g.safetensors", + "sdxl", + "default" + ] + }, + { + "id": 6, + "type": "RUMFlux2NativeMatchTextEncode", + "pos": [ + 520, + 400 + ], + "size": [ + 400, + 480 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "localized_name": "qwen_clip", + "name": "qwen_clip", + "type": "CLIP", + "link": 27 + }, + { + "localized_name": "sdxl_clip", + "name": "sdxl_clip", + "type": "CLIP", + "link": 28 + } + ], + "outputs": [ + { + "localized_name": "positive", + "name": "positive", + "type": "CONDITIONING", + "links": [ + 45 + ] + }, + { + "localized_name": "negative", + "name": "negative", + "type": "CONDITIONING", + "links": [ + 46 + ] + }, + { + "localized_name": "status", + "name": "status", + "type": "STRING", + "links": null + } + ], + "properties": { + "cnr_id": "comfyui-rum", + "ver": "452e1a6ccb728b846c938cc95599e61413b3f869", + "Node name for S&R": "RUMFlux2NativeMatchTextEncode" + }, + "widgets_values": [ + "将服装改为school uniform, short sleeves", + "", + 0, + false, + 200, + 77, + 2048, + "10,20,30" + ] + }, + { + "id": 12, + "type": "EmptyFlux2LatentImage", + "pos": [ + 1520, + 120 + ], + "size": [ + 280, + 160 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "localized_name": "width", + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 29 + }, + { + "localized_name": "height", + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 30 + } + ], + "outputs": [ + { + "localized_name": "Latent", + "name": "LATENT", + "type": "LATENT", + "links": [ + 39 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.26.2", + "Node name for S&R": "EmptyFlux2LatentImage" + }, + "widgets_values": [ + 1024, + 1024, + 1 + ] + }, + { + "id": 13, + "type": "RUMFlux2DiffusersNoise", + "pos": [ + 120, + 1120 + ], + "size": [ + 320, + 160 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [ + { + "localized_name": "noise", + "name": "noise", + "type": "NOISE", + "links": [ + 35 + ] + } + ], + "properties": { + "cnr_id": "comfyui-rum", + "ver": "452e1a6ccb728b846c938cc95599e61413b3f869", + "Node name for S&R": "RUMFlux2DiffusersNoise" + }, + "widgets_values": [ + 1, + "fixed", + "bfloat16" + ] + }, + { + "id": 14, + "type": "RUMFlux2DiffusersEulerSampler", + "pos": [ + 120, + 1360 + ], + "size": [ + 320, + 80 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [ + { + "localized_name": "sampler", + "name": "sampler", + "type": "SAMPLER", + "links": [ + 37 + ] + } + ], + "properties": { + "cnr_id": "comfyui-rum", + "ver": "452e1a6ccb728b846c938cc95599e61413b3f869", + "Node name for S&R": "RUMFlux2DiffusersEulerSampler" + }, + "widgets_values": [] + }, + { + "id": 15, + "type": "RUMFlux2DiffusersScheduler", + "pos": [ + 1520, + 360 + ], + "size": [ + 320, + 200 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "localized_name": "width", + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 31 + }, + { + "localized_name": "height", + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 32 + } + ], + "outputs": [ + { + "localized_name": "sigmas", + "name": "sigmas", + "type": "SIGMAS", + "links": [ + 38 + ] + } + ], + "properties": { + "cnr_id": "comfyui-rum", + "ver": "452e1a6ccb728b846c938cc95599e61413b3f869", + "Node name for S&R": "RUMFlux2DiffusersScheduler" + }, + "widgets_values": [ + 20, + 960, + 1024 + ] + }, + { + "id": 16, + "type": "RUMFlux2NativeMatchReferenceEncode", + "pos": [ + 520, + 1040 + ], + "size": [ + 360, + 120 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "link": 33 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 34 + } + ], + "outputs": [ + { + "localized_name": "reference_latents", + "name": "reference_latents", + "type": "RUM_REFERENCE_LATENTS", + "links": [ + 47 + ] + }, + { + "localized_name": "status", + "name": "status", + "type": "STRING", + "links": null + } + ], + "properties": { + "cnr_id": "comfyui-rum", + "ver": "452e1a6ccb728b846c938cc95599e61413b3f869", + "Node name for S&R": "RUMFlux2NativeMatchReferenceEncode" + }, + "widgets_values": [] + }, + { + "id": 17, + "type": "SamplerCustomAdvanced", + "pos": [ + 1920, + 120 + ], + "size": [ + 240, + 400 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "localized_name": "噪波", + "name": "noise", + "type": "NOISE", + "link": 35 + }, + { + "localized_name": "引导器", + "name": "guider", + "type": "GUIDER", + "link": 36 + }, + { + "localized_name": "采样器", + "name": "sampler", + "type": "SAMPLER", + "link": 37 + }, + { + "localized_name": "西格玛", + "name": "sigmas", + "type": "SIGMAS", + "link": 38 + }, + { + "localized_name": "Latent图像", + "name": "latent_image", + "type": "LATENT", + "link": 39 + } + ], + "outputs": [ + { + "localized_name": "Latent", + "name": "output", + "type": "LATENT", + "links": [ + 40 + ] + }, + { + "localized_name": "降噪Latent", + "name": "denoised_output", + "type": "LATENT", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.26.2", + "Node name for S&R": "SamplerCustomAdvanced" + }, + "widgets_values": [] + }, + { + "id": 18, + "type": "VAELoader", + "pos": [ + 120, + 1520 + ], + "size": [ + 280, + 80 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [], + "outputs": [ + { + "localized_name": "VAE", + "name": "VAE", + "type": "VAE", + "links": [ + 34, + 41 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.26.2", + "Node name for S&R": "VAELoader" + }, + "widgets_values": [ + "flux2-vae.safetensors" + ] + }, + { + "id": 19, + "type": "RUMFlux2NativeMatchVAEDecode", + "pos": [ + 2200, + 120 + ], + "size": [ + 320, + 120 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "localized_name": "samples", + "name": "samples", + "type": "LATENT", + "link": 40 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 41 + } + ], + "outputs": [ + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "links": [ + 43 + ] + } + ], + "properties": { + "cnr_id": "comfyui-rum", + "ver": "452e1a6ccb728b846c938cc95599e61413b3f869", + "Node name for S&R": "RUMFlux2NativeMatchVAEDecode" + }, + "widgets_values": [] + }, + { + "id": 21, + "type": "RUMRoundImageForSave", + "pos": [ + 2600, + 120 + ], + "size": [ + 240, + 80 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "localized_name": "images", + "name": "images", + "type": "IMAGE", + "link": 43 + } + ], + "outputs": [ + { + "localized_name": "images", + "name": "images", + "type": "IMAGE", + "links": [ + 42 + ] + } + ], + "properties": { + "cnr_id": "comfyui-rum", + "ver": "452e1a6ccb728b846c938cc95599e61413b3f869", + "Node name for S&R": "RUMRoundImageForSave" + }, + "widgets_values": [] + }, + { + "id": 22, + "type": "RUMFlux2DiffusersCFGuider", + "pos": [ + 1000, + 800 + ], + "size": [ + 360, + 200 + ], + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "localized_name": "model", + "name": "model", + "type": "MODEL", + "link": 44 + }, + { + "localized_name": "positive", + "name": "positive", + "type": "CONDITIONING", + "link": 45 + }, + { + "localized_name": "negative", + "name": "negative", + "type": "CONDITIONING", + "link": 46 + }, + { + "localized_name": "reference_latents", + "name": "reference_latents", + "shape": 7, + "type": "RUM_REFERENCE_LATENTS", + "link": 47 + } + ], + "outputs": [ + { + "localized_name": "guider", + "name": "guider", + "type": "GUIDER", + "links": [ + 36 + ] + } + ], + "properties": { + "cnr_id": "comfyui-rum", + "ver": "452e1a6ccb728b846c938cc95599e61413b3f869", + "Node name for S&R": "RUMFlux2DiffusersCFGuider" + }, + "widgets_values": [ + 9 + ] + }, + { + "id": 23, + "type": "GetImageSize", + "pos": [ + 520, + 840 + ], + "size": [ + 240, + 120 + ], + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "localized_name": "图像", + "name": "image", + "type": "IMAGE", + "link": 48 + } + ], + "outputs": [ + { + "localized_name": "宽度", + "name": "width", + "type": "INT", + "links": [ + 49 + ] + }, + { + "localized_name": "高度", + "name": "height", + "type": "INT", + "links": [ + 50 + ] + }, + { + "localized_name": "批处理大小", + "name": "batch_size", + "type": "INT", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.26.2", + "Node name for S&R": "GetImageSize" + }, + "widgets_values": [] + }, + { + "id": 24, + "type": "ComfyMathExpression", + "pos": [ + 1000, + 120 + ], + "size": [ + 400, + 200 + ], + "flags": {}, + "order": 16, + "mode": 0, + "inputs": [ + { + "label": "a", + "localized_name": "values.a", + "name": "values.a", + "type": "FLOAT,INT,BOOLEAN", + "link": 49 + }, + { + "label": "b", + "localized_name": "values.b", + "name": "values.b", + "shape": 7, + "type": "FLOAT,INT,BOOLEAN", + "link": null + } + ], + "outputs": [ + { + "localized_name": "浮点", + "name": "FLOAT", + "type": "FLOAT", + "links": null + }, + { + "localized_name": "整数", + "name": "INT", + "type": "INT", + "links": [ + 29, + 31 + ] + }, + { + "localized_name": "布尔值", + "name": "BOOL", + "type": "BOOLEAN", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.26.2", + "Node name for S&R": "ComfyMathExpression" + }, + "widgets_values": [ + "a//16*16" + ] + }, + { + "id": 25, + "type": "ComfyMathExpression", + "pos": [ + 1000, + 480 + ], + "size": [ + 400, + 200 + ], + "flags": {}, + "order": 17, + "mode": 0, + "inputs": [ + { + "label": "a", + "localized_name": "values.a", + "name": "values.a", + "type": "FLOAT,INT,BOOLEAN", + "link": 50 + }, + { + "label": "b", + "localized_name": "values.b", + "name": "values.b", + "shape": 7, + "type": "FLOAT,INT,BOOLEAN", + "link": null + } + ], + "outputs": [ + { + "localized_name": "浮点", + "name": "FLOAT", + "type": "FLOAT", + "links": null + }, + { + "localized_name": "整数", + "name": "INT", + "type": "INT", + "links": [ + 30, + 32 + ] + }, + { + "localized_name": "布尔值", + "name": "BOOL", + "type": "BOOLEAN", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.26.2", + "Node name for S&R": "ComfyMathExpression" + }, + "widgets_values": [ + "a//16*16" + ] + } + ], + "groups": [], + "links": [ + { + "id": 26, + "origin_id": 2, + "origin_slot": 0, + "target_id": 3, + "target_slot": 0, + "type": "MODEL" + }, + { + "id": 27, + "origin_id": 4, + "origin_slot": 0, + "target_id": 6, + "target_slot": 0, + "type": "CLIP" + }, + { + "id": 28, + "origin_id": 5, + "origin_slot": 0, + "target_id": 6, + "target_slot": 1, + "type": "CLIP" + }, + { + "id": 29, + "origin_id": 24, + "origin_slot": 1, + "target_id": 12, + "target_slot": 0, + "type": "INT" + }, + { + "id": 30, + "origin_id": 25, + "origin_slot": 1, + "target_id": 12, + "target_slot": 1, + "type": "INT" + }, + { + "id": 31, + "origin_id": 24, + "origin_slot": 1, + "target_id": 15, + "target_slot": 0, + "type": "INT" + }, + { + "id": 32, + "origin_id": 25, + "origin_slot": 1, + "target_id": 15, + "target_slot": 1, + "type": "INT" + }, + { + "id": 34, + "origin_id": 18, + "origin_slot": 0, + "target_id": 16, + "target_slot": 1, + "type": "VAE" + }, + { + "id": 35, + "origin_id": 13, + "origin_slot": 0, + "target_id": 17, + "target_slot": 0, + "type": "NOISE" + }, + { + "id": 36, + "origin_id": 22, + "origin_slot": 0, + "target_id": 17, + "target_slot": 1, + "type": "GUIDER" + }, + { + "id": 37, + "origin_id": 14, + "origin_slot": 0, + "target_id": 17, + "target_slot": 2, + "type": "SAMPLER" + }, + { + "id": 38, + "origin_id": 15, + "origin_slot": 0, + "target_id": 17, + "target_slot": 3, + "type": "SIGMAS" + }, + { + "id": 39, + "origin_id": 12, + "origin_slot": 0, + "target_id": 17, + "target_slot": 4, + "type": "LATENT" + }, + { + "id": 40, + "origin_id": 17, + "origin_slot": 0, + "target_id": 19, + "target_slot": 0, + "type": "LATENT" + }, + { + "id": 41, + "origin_id": 18, + "origin_slot": 0, + "target_id": 19, + "target_slot": 1, + "type": "VAE" + }, + { + "id": 43, + "origin_id": 19, + "origin_slot": 0, + "target_id": 21, + "target_slot": 0, + "type": "IMAGE" + }, + { + "id": 44, + "origin_id": 3, + "origin_slot": 0, + "target_id": 22, + "target_slot": 0, + "type": "MODEL" + }, + { + "id": 45, + "origin_id": 6, + "origin_slot": 0, + "target_id": 22, + "target_slot": 1, + "type": "CONDITIONING" + }, + { + "id": 46, + "origin_id": 6, + "origin_slot": 1, + "target_id": 22, + "target_slot": 2, + "type": "CONDITIONING" + }, + { + "id": 47, + "origin_id": 16, + "origin_slot": 0, + "target_id": 22, + "target_slot": 3, + "type": "RUM_REFERENCE_LATENTS" + }, + { + "id": 49, + "origin_id": 23, + "origin_slot": 0, + "target_id": 24, + "target_slot": 0, + "type": "INT" + }, + { + "id": 50, + "origin_id": 23, + "origin_slot": 1, + "target_id": 25, + "target_slot": 0, + "type": "INT" + }, + { + "id": 33, + "origin_id": -10, + "origin_slot": 0, + "target_id": 16, + "target_slot": 0, + "type": "IMAGE" + }, + { + "id": 48, + "origin_id": -10, + "origin_slot": 0, + "target_id": 23, + "target_slot": 0, + "type": "IMAGE" + }, + { + "id": 42, + "origin_id": 21, + "origin_slot": 0, + "target_id": -20, + "target_slot": 0, + "type": "IMAGE" + } + ], + "extra": {} + } + ] + }, + "config": {}, + "extra": { + "ds": { + "scale": 0.8909996095396207, + "offset": [ + -452.48559302306023, + -400.35368190268804 + ] + }, + "frontendVersion": "1.45.19" + }, + "version": 0.4 +} diff --git a/examples/diffusers_match_edit_workflow_api.json b/examples/diffusers_match_edit_workflow_api.json deleted file mode 100644 index df3b467..0000000 --- a/examples/diffusers_match_edit_workflow_api.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "2": { - "class_type": "RUMFlux2LoadNativeModel", - "inputs": { - "rum_checkpoint_name": "model-checkpoint-1202000.safetensors", - "base_text_tokens": 200, - "rum_checkpoint_path": "" - } - }, - "3": { - "class_type": "RUMFlux2DiffusersMatchModelPatch", - "inputs": { - "model": [ - "2", - 0 - ], - "base_text_tokens": 200, - "extra_text_tokens": 77, - "disable_guidance": true - } - }, - "4": { - "class_type": "CLIPLoader", - "inputs": { - "clip_name": "qwen_3_4b.safetensors", - "type": "flux2", - "device": "default" - } - }, - "5": { - "class_type": "DualCLIPLoader", - "inputs": { - "clip_name1": "waiNSFWIllustrious_v140_clip_l.safetensors", - "clip_name2": "waiNSFWIllustrious_v140_clip_g.safetensors", - "type": "sdxl", - "device": "cpu" - } - }, - "6": { - "class_type": "RUMFlux2NativeMatchTextEncode", - "inputs": { - "qwen_clip": [ - "4", - 0 - ], - "sdxl_clip": [ - "5", - 0 - ], - "prompt": "将服装改为school uniform, short sleeves", - "negative_prompt": "", - "guidance": 0, - "use_guidance_embedding": false, - "base_text_tokens": 200, - "extra_text_tokens": 77, - "qwen_layers": "10,20,30", - "sdxl_clip_width": 2048 - } - }, - "10": { - "class_type": "LoadImage", - "inputs": { - "image": "rum_reference.jpg" - } - }, - "12": { - "class_type": "EmptyFlux2LatentImage", - "inputs": { - "width": 656, - "height": 1200, - "batch_size": 1 - } - }, - "13": { - "class_type": "RUMFlux2DiffusersNoise", - "inputs": { - "noise_seed": 1, - "dtype": "bfloat16" - } - }, - "14": { - "class_type": "RUMFlux2DiffusersEulerSampler", - "inputs": {} - }, - "15": { - "class_type": "RUMFlux2DiffusersScheduler", - "inputs": { - "steps": 20, - "width": 656, - "height": 1200 - } - }, - "16": { - "class_type": "RUMFlux2NativeMatchReferenceEncode", - "inputs": { - "image": [ - "10", - 0 - ], - "vae": [ - "18", - 0 - ] - } - }, - "17": { - "class_type": "SamplerCustomAdvanced", - "inputs": { - "noise": [ - "13", - 0 - ], - "guider": [ - "22", - 0 - ], - "sampler": [ - "14", - 0 - ], - "sigmas": [ - "15", - 0 - ], - "latent_image": [ - "12", - 0 - ] - } - }, - "18": { - "class_type": "VAELoader", - "inputs": { - "vae_name": "flux2-vae.safetensors" - } - }, - "19": { - "class_type": "RUMFlux2NativeMatchVAEDecode", - "inputs": { - "samples": [ - "17", - 0 - ], - "vae": [ - "18", - 0 - ] - } - }, - "20": { - "class_type": "SaveImage", - "inputs": { - "filename_prefix": "RUM_native_diffusers_match_edit", - "images": [ - "21", - 0 - ] - } - }, - "21": { - "class_type": "RUMRoundImageForSave", - "inputs": { - "images": [ - "19", - 0 - ] - } - }, - "22": { - "class_type": "RUMFlux2DiffusersCFGuider", - "inputs": { - "model": [ - "3", - 0 - ], - "positive": [ - "6", - 0 - ], - "negative": [ - "6", - 1 - ], - "cfg": 9.0, - "reference_latents": [ - "16", - 0 - ] - } - } -} diff --git a/examples/diffusers_match_edit_workflow_gui.json b/examples/diffusers_match_edit_workflow_gui.json deleted file mode 100644 index 89de4cf..0000000 --- a/examples/diffusers_match_edit_workflow_gui.json +++ /dev/null @@ -1,333 +0,0 @@ -{ - "id": "rum-diffusers-match-edit", - "revision": 0, - "last_node_id": 22, - "last_link_id": 20, - "nodes": [ - { - "id": 2, - "type": "RUMFlux2LoadNativeModel", - "pos": [80, 80], - "size": [430, 96], - "flags": {}, - "order": 0, - "mode": 0, - "inputs": [ - {"name": "rum_checkpoint_name", "type": "COMBO", "widget": {"name": "rum_checkpoint_name"}, "link": null}, - {"name": "base_text_tokens", "type": "INT", "widget": {"name": "base_text_tokens"}, "link": null}, - {"name": "rum_checkpoint_path", "type": "STRING", "widget": {"name": "rum_checkpoint_path"}, "link": null} - ], - "outputs": [ - {"name": "model", "type": "MODEL", "links": [1]}, - {"name": "status", "type": "STRING", "links": null} - ], - "properties": {"Node name for S&R": "RUMFlux2LoadNativeModel"}, - "widgets_values": ["model-checkpoint-1202000.safetensors", 200, ""] - }, - { - "id": 3, - "type": "RUMFlux2DiffusersMatchModelPatch", - "pos": [560, 80], - "size": [340, 118], - "flags": {}, - "order": 1, - "mode": 0, - "inputs": [ - {"name": "model", "type": "MODEL", "link": 1}, - {"name": "base_text_tokens", "type": "INT", "widget": {"name": "base_text_tokens"}, "link": null}, - {"name": "extra_text_tokens", "type": "INT", "widget": {"name": "extra_text_tokens"}, "link": null}, - {"name": "disable_guidance", "type": "BOOLEAN", "widget": {"name": "disable_guidance"}, "link": null} - ], - "outputs": [ - {"name": "model", "type": "MODEL", "links": [12]}, - {"name": "status", "type": "STRING", "links": null} - ], - "properties": {"Node name for S&R": "RUMFlux2DiffusersMatchModelPatch"}, - "widgets_values": [200, 77, true] - }, - { - "id": 4, - "type": "CLIPLoader", - "pos": [80, 260], - "size": [430, 104], - "flags": {}, - "order": 2, - "mode": 0, - "inputs": [ - {"name": "clip_name", "type": "COMBO", "widget": {"name": "clip_name"}, "link": null}, - {"name": "type", "type": "COMBO", "widget": {"name": "type"}, "link": null}, - {"name": "device", "type": "COMBO", "widget": {"name": "device"}, "link": null} - ], - "outputs": [{"name": "CLIP", "type": "CLIP", "links": [2]}], - "properties": {"Node name for S&R": "CLIPLoader"}, - "widgets_values": ["qwen_3_4b.safetensors", "flux2", "default"] - }, - { - "id": 5, - "type": "DualCLIPLoader", - "pos": [80, 400], - "size": [430, 126], - "flags": {}, - "order": 3, - "mode": 0, - "inputs": [ - {"name": "clip_name1", "type": "COMBO", "widget": {"name": "clip_name1"}, "link": null}, - {"name": "clip_name2", "type": "COMBO", "widget": {"name": "clip_name2"}, "link": null}, - {"name": "type", "type": "COMBO", "widget": {"name": "type"}, "link": null}, - {"name": "device", "type": "COMBO", "widget": {"name": "device"}, "link": null} - ], - "outputs": [{"name": "CLIP", "type": "CLIP", "links": [3]}], - "properties": {"Node name for S&R": "DualCLIPLoader"}, - "widgets_values": ["waiNSFWIllustrious_v140_clip_l.safetensors", "waiNSFWIllustrious_v140_clip_g.safetensors", "sdxl", "cpu"] - }, - { - "id": 6, - "type": "RUMFlux2NativeMatchTextEncode", - "pos": [560, 260], - "size": [560, 286], - "flags": {}, - "order": 4, - "mode": 0, - "inputs": [ - {"name": "qwen_clip", "type": "CLIP", "link": 2}, - {"name": "sdxl_clip", "type": "CLIP", "link": 3}, - {"name": "prompt", "type": "STRING", "widget": {"name": "prompt"}, "link": null}, - {"name": "negative_prompt", "type": "STRING", "widget": {"name": "negative_prompt"}, "link": null}, - {"name": "guidance", "type": "FLOAT", "widget": {"name": "guidance"}, "link": null}, - {"name": "use_guidance_embedding", "type": "BOOLEAN", "widget": {"name": "use_guidance_embedding"}, "link": null}, - {"name": "base_text_tokens", "type": "INT", "widget": {"name": "base_text_tokens"}, "link": null}, - {"name": "extra_text_tokens", "type": "INT", "widget": {"name": "extra_text_tokens"}, "link": null}, - {"name": "sdxl_clip_width", "type": "INT", "widget": {"name": "sdxl_clip_width"}, "link": null}, - {"name": "qwen_layers", "type": "STRING", "widget": {"name": "qwen_layers"}, "link": null} - ], - "outputs": [ - {"name": "positive", "type": "CONDITIONING", "links": [13]}, - {"name": "negative", "type": "CONDITIONING", "links": [14]}, - {"name": "status", "type": "STRING", "links": null} - ], - "properties": {"Node name for S&R": "RUMFlux2NativeMatchTextEncode"}, - "widgets_values": ["将服装改为school uniform, short sleeves", "", 0, false, 200, 77, 2048, "10,20,30"] - }, - { - "id": 10, - "type": "LoadImage", - "pos": [80, 580], - "size": [330, 86], - "flags": {}, - "order": 5, - "mode": 0, - "inputs": [{"name": "image", "type": "COMBO", "widget": {"name": "image"}, "link": null}], - "outputs": [ - {"name": "IMAGE", "type": "IMAGE", "links": [19]}, - {"name": "MASK", "type": "MASK", "links": null} - ], - "properties": {"Node name for S&R": "LoadImage"}, - "widgets_values": ["rum_reference.jpg"] - }, - { - "id": 12, - "type": "EmptyFlux2LatentImage", - "pos": [80, 720], - "size": [280, 90], - "flags": {}, - "order": 6, - "mode": 0, - "inputs": [ - {"name": "width", "type": "INT", "widget": {"name": "width"}, "link": null}, - {"name": "height", "type": "INT", "widget": {"name": "height"}, "link": null}, - {"name": "batch_size", "type": "INT", "widget": {"name": "batch_size"}, "link": null} - ], - "outputs": [{"name": "LATENT", "type": "LATENT", "links": [11]}], - "properties": {"Node name for S&R": "EmptyFlux2LatentImage"}, - "widgets_values": [656, 1200, 1] - }, - { - "id": 13, - "type": "RUMFlux2DiffusersNoise", - "pos": [80, 860], - "size": [280, 72], - "flags": {}, - "order": 7, - "mode": 0, - "inputs": [ - {"name": "noise_seed", "type": "INT", "widget": {"name": "noise_seed"}, "link": null}, - {"name": "dtype", "type": "COMBO", "widget": {"name": "dtype"}, "link": null} - ], - "outputs": [{"name": "noise", "type": "NOISE", "links": [8]}], - "properties": {"Node name for S&R": "RUMFlux2DiffusersNoise"}, - "widgets_values": [1, "bfloat16"] - }, - { - "id": 14, - "type": "RUMFlux2DiffusersEulerSampler", - "pos": [410, 860], - "size": [260, 56], - "flags": {}, - "order": 8, - "mode": 0, - "inputs": [], - "outputs": [{"name": "sampler", "type": "SAMPLER", "links": [10]}], - "properties": {"Node name for S&R": "RUMFlux2DiffusersEulerSampler"}, - "widgets_values": [] - }, - { - "id": 15, - "type": "RUMFlux2DiffusersScheduler", - "pos": [710, 860], - "size": [260, 96], - "flags": {}, - "order": 9, - "mode": 0, - "inputs": [ - {"name": "steps", "type": "INT", "widget": {"name": "steps"}, "link": null}, - {"name": "width", "type": "INT", "widget": {"name": "width"}, "link": null}, - {"name": "height", "type": "INT", "widget": {"name": "height"}, "link": null} - ], - "outputs": [{"name": "sigmas", "type": "SIGMAS", "links": [7]}], - "properties": {"Node name for S&R": "RUMFlux2DiffusersScheduler"}, - "widgets_values": [20, 656, 1200] - }, - { - "id": 18, - "type": "VAELoader", - "pos": [560, 580], - "size": [310, 58], - "flags": {}, - "order": 10, - "mode": 0, - "inputs": [{"name": "vae_name", "type": "COMBO", "widget": {"name": "vae_name"}, "link": null}], - "outputs": [{"name": "VAE", "type": "VAE", "links": [16, 20]}], - "properties": {"Node name for S&R": "VAELoader"}, - "widgets_values": ["flux2-vae.safetensors"] - }, - { - "id": 16, - "type": "RUMFlux2NativeMatchReferenceEncode", - "pos": [940, 560], - "size": [360, 90], - "flags": {}, - "order": 11, - "mode": 0, - "inputs": [ - {"name": "image", "type": "IMAGE", "link": 19}, - {"name": "vae", "type": "VAE", "link": 20} - ], - "outputs": [ - {"name": "reference_latents", "type": "RUM_REFERENCE_LATENTS", "links": [15]}, - {"name": "status", "type": "STRING", "links": null} - ], - "properties": {"Node name for S&R": "RUMFlux2NativeMatchReferenceEncode"}, - "widgets_values": [] - }, - { - "id": 22, - "type": "RUMFlux2DiffusersCFGuider", - "pos": [1180, 260], - "size": [330, 150], - "flags": {}, - "order": 12, - "mode": 0, - "inputs": [ - {"name": "model", "type": "MODEL", "link": 12}, - {"name": "positive", "type": "CONDITIONING", "link": 13}, - {"name": "negative", "type": "CONDITIONING", "link": 14}, - {"name": "cfg", "type": "FLOAT", "widget": {"name": "cfg"}, "link": null}, - {"name": "reference_latents", "type": "RUM_REFERENCE_LATENTS", "link": 15} - ], - "outputs": [{"name": "guider", "type": "GUIDER", "links": [9]}], - "properties": {"Node name for S&R": "RUMFlux2DiffusersCFGuider"}, - "widgets_values": [9] - }, - { - "id": 17, - "type": "SamplerCustomAdvanced", - "pos": [1180, 720], - "size": [330, 170], - "flags": {}, - "order": 13, - "mode": 0, - "inputs": [ - {"name": "noise", "type": "NOISE", "link": 8}, - {"name": "guider", "type": "GUIDER", "link": 9}, - {"name": "sampler", "type": "SAMPLER", "link": 10}, - {"name": "sigmas", "type": "SIGMAS", "link": 7}, - {"name": "latent_image", "type": "LATENT", "link": 11} - ], - "outputs": [ - {"name": "output", "type": "LATENT", "links": [17]}, - {"name": "denoised_output", "type": "LATENT", "links": null} - ], - "properties": {"Node name for S&R": "SamplerCustomAdvanced"}, - "widgets_values": [] - }, - { - "id": 19, - "type": "RUMFlux2NativeMatchVAEDecode", - "pos": [1560, 740], - "size": [310, 82], - "flags": {}, - "order": 14, - "mode": 0, - "inputs": [ - {"name": "samples", "type": "LATENT", "link": 17}, - {"name": "vae", "type": "VAE", "link": 16} - ], - "outputs": [{"name": "IMAGE", "type": "IMAGE", "links": [18]}], - "properties": {"Node name for S&R": "RUMFlux2NativeMatchVAEDecode"}, - "widgets_values": [] - }, - { - "id": 21, - "type": "RUMRoundImageForSave", - "pos": [1910, 740], - "size": [280, 58], - "flags": {}, - "order": 15, - "mode": 0, - "inputs": [{"name": "images", "type": "IMAGE", "link": 18}], - "outputs": [{"name": "images", "type": "IMAGE", "links": [21]}], - "properties": {"Node name for S&R": "RUMRoundImageForSave"}, - "widgets_values": [] - }, - { - "id": 20, - "type": "SaveImage", - "pos": [2240, 720], - "size": [330, 92], - "flags": {}, - "order": 16, - "mode": 0, - "inputs": [ - {"name": "images", "type": "IMAGE", "link": 21}, - {"name": "filename_prefix", "type": "STRING", "widget": {"name": "filename_prefix"}, "link": null} - ], - "outputs": [], - "properties": {"Node name for S&R": "SaveImage"}, - "widgets_values": ["RUM_native_diffusers_match_edit_gui"] - } - ], - "links": [ - [1, 2, 0, 3, 0, "MODEL"], - [2, 4, 0, 6, 0, "CLIP"], - [3, 5, 0, 6, 1, "CLIP"], - [8, 13, 0, 17, 0, "NOISE"], - [9, 22, 0, 17, 1, "GUIDER"], - [7, 15, 0, 17, 3, "SIGMAS"], - [10, 14, 0, 17, 2, "SAMPLER"], - [11, 12, 0, 17, 4, "LATENT"], - [12, 3, 0, 22, 0, "MODEL"], - [13, 6, 0, 22, 1, "CONDITIONING"], - [14, 6, 1, 22, 2, "CONDITIONING"], - [15, 16, 0, 22, 4, "RUM_REFERENCE_LATENTS"], - [16, 18, 0, 19, 1, "VAE"], - [17, 17, 0, 19, 0, "LATENT"], - [18, 19, 0, 21, 0, "IMAGE"], - [19, 10, 0, 16, 0, "IMAGE"], - [20, 18, 0, 16, 1, "VAE"], - [21, 21, 0, 20, 0, "IMAGE"] - ], - "groups": [], - "config": {}, - "extra": {"ds": {"scale": 0.8, "offset": [0, 0]}}, - "version": 0.4 -}