Ming صورة 0.2 Design: تحرير الصورة
حرّر صورة موجودة باستخدام Ming Image 0.2 Design، وهو نموذج بحجم 6B مُهيّأ لواجهات المستخدم والإنفوجرافيك والملصقات. يأخذ صورة الإدخال بالإضافة إلى المربعات...
حول
Edit an existing image with Ming Image 0.2 Design, a 6B model tuned for UI, infographics, and posters. It takes one input image plus the boxes you draw on it — position, description, and colour palette — and rebuilds them into a layer-by-layer caption, returning one re-rendered image. Ideal for restaging a layout, poster-style re-renders, and turning a photograph into a designed composition.
Graph: 4522b5d6-7f71-4b60-8fab-1e6ffbd5f1c1, BuildJsonPromptIdeogram, CreateBoundingBoxes, GetImageSize, ImageStitch, LoadImage, MarkdownNote, PreviewAny, PreviewImage, ResizeImageMaskNode, SaveImageAdvanced, ae951efd-07f6-49cb-bfdb-0b8e3eee4cda. Output: image.
ما تقدّمه
- جارٍ قراءة سير العمل
يعمل في ComfyUI. لا يمكن تشغيل سير العمل هذا على هذه الصفحة. نزّله وافتحه في ComfyUI.
تنزيل سير العمللا توجد مخرجات نموذجية لسير العمل هذا بعد.
داخل سير العمل
معاينة للقراءة فقط لرسم العقد البياني. افتحه في Comfy Cloud أو نزّله لتعديل العقد.
Loading the graph
Open full-size workflow previewالملفات في سير العمل هذا
- المخرج
- صورة
- المؤلف
- المؤلف غير متاح
يتطلب عُقدًا مخصصة
- جارٍ قراءة سير العمل
استخدم سير العمل هذا من خلال التعليمات البرمجية
يتم إنشاؤه من مخطط سير العمل والمدخلات عندما يكون ذلك ممكنًا؛ وإلا فتُعرض الأمثلة المخزنة. راجع بيانات الاعتماد ونقاط النهاية قبل تشغيل التعليمات البرمجية، إذ قد تترتب عليها رسوم.
What you need
- Runs on
- Comfy Cloud
- المفتاح
- COMFY_API_KEY
يتطلب خطة Cloud مدفوعة ورصيدًا.
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"49": {
"class_type": "LoadImage",
"inputs": {
"image": "yellow_arch_daisy_field.png"
},
"_meta": {
"title": "Load Image"
}
},
"81": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"49",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"91": {
"class_type": "CreateBoundingBoxes",
"inputs": {
"background": [
"49",
0
],
"editor_state": {
"__value__": []
},
"height": 1152,
"last_incoming": {
"__value__": [
{
"height": 1152,
"metadata": {
"desc": "the whole picture reprinted as a mid-century screen-print poster sheet: flat unmodulated colour planes, hand-cut stencil edges, warm off-white paper stock with fine print grain, one faint ink misregistration, a thin dark-ink rule inset a few millimetres from the trimmed edge, no photographic depth of field",
"palette": [
"#F5F0E3",
"#E4B23C",
"#2F5FA8",
"#1E2A38"
],
"text": "",
"type": "obj"
},
"width": 896,
"x": 0,
"y": 0
},
{
"height": 555,
"metadata": {
"desc": "the sunlit tiled facade redrawn as two flat ochre plates, one in full sun and one in shade, split by one crisp diagonal shadow that runs from the top edge near the centre down to the left edge about a fifth of the way down; the tile grout becomes a sparse regular grid of thin lighter lines",
"palette": [
"#E4B23C",
"#C6952F",
"#F0C85A"
],
"text": "",
"type": "obj"
},
"width": 896,
"x": 0,
"y": 0
},
{
"height": 350,
"metadata": {
"desc": "the left round-headed arch opening cut cleanly through the facade: inside it a flat pale-blue sky with one simplified cream cloud bank, edges stencil-cut, no gradients",
"palette": [
"#4E86C8",
"#A9C9E8",
"#F5F0E3"
],
"text": "",
"type": "obj"
},
"width": 193,
"x": 57,
"y": 205
},
{
"height": 363,
"metadata": {
"desc": "the centre arch opening, the tallest of the three: flat pale-blue sky, one low cream cloud shape near its base, and the daisy horizon showing as a thin band of small white dots across the bottom of the opening",
"palette": [
"#4E86C8",
"#A9C9E8",
"#F5F0E3"
],
"text": "",
"type": "obj"
},
"width": 196,
"x": 357,
"y": 192
},
{
"height": 355,
"metadata": {
"desc": "the right arch opening holding a single tree: trunk and crown reduced to a two-tone silhouette of dark olive green and deep umber against the pale blue sky, branches simplified to a few decisive lines, foliage as clustered flat shapes, no leaf texture",
"palette": [
"#4E86C8",
"#6E8B4A",
"#3B4A2E"
],
"text": "",
"type": "obj"
},
"width": 203,
"x": 652,
"y": 200
},
{
"height": 652,
"metadata": {
"desc": "the daisy meadow drawn as poster shapes: the field as broad olive-green swathes rising to a soft ridge line, every daisy a simple white petal rosette with a flat ochre centre, evenly staggered and overlapping in loose rows, the nearest flowers large and crisp, the distant ones small pale dots",
"palette": [
"#8FA05A",
"#B7C68A",
"#F5F0E3",
"#E4A62C"
],
"text": "",
"type": "obj"
},
"width": 896,
"x": 0,
"y": 500
},
{
"height": 88,
"metadata": {
"desc": "an open parasol held high above her, seen from behind: the canopy a flat disc of deep rust-red silk with a black scalloped lace edge printed as a row of small half-circles and straight thin dark ribs radiating from the centre, a slim dark-wood shaft falling to her raised hand; the canopy tilted slightly to the left, one paler rust tone on its sunlit right half",
"palette": [
"#9E3B2E",
"#6E2A22",
"#1E2A38"
],
"text": "",
"type": "obj"
},
"width": 170,
"x": 348,
"y": 486
},
{
"height": 280,
"metadata": {
"desc": "a graceful woman standing with her back to the camera, full length, drawn in the same flat screen-print language: a classical floor-length gown of deep rust-red silk, high waisted with one soft vertical fold falling from her shoulder blades to the hem, printed as two flat planes of rust separated by a single crisp fold line; her long hair gathered in a low classical chignon with a thin printed ribbon and two loose strands; bare shoulders and arms as flat warm-skin planes with one darker shadow tone along her right side; slim, tall and perfectly still, her weight on her left foot, one arm raised holding the parasol and the other relaxed at her side; her hem and feet disappearing into the daisies, the pressed grass in front of her printed as a few flat dark strokes",
"palette": [
"#9E3B2E",
"#E8B893",
"#1E2A38"
],
"text": "",
"type": "obj"
},
"width": 112,
"x": 372,
"y": 566
},
{
"height": 196,
"metadata": {
"desc": "a full-width band of warm cream paper across the foot of the poster, printed flat with a single thin ochre rule along its top edge and no texture, holding the typography with generous air between the lines",
"palette": [
"#F3EADA",
"#C6952F"
],
"text": "",
"type": "obj"
},
"width": 896,
"x": 0,
"y": 956
},
{
"height": 38,
"metadata": {
"desc": "the title set in an elegant thin-stroke classical serif, all capitals with very wide letterspacing, ink navy, one line, centred in the band with generous air above and below; spelled exactly as written",
"palette": [
"#1E2A38"
],
"text": "WHERE THE LIGHT LINGERS",
"type": "text"
},
"width": 734,
"x": 81,
"y": 984
},
{
"height": 24,
"metadata": {
"desc": "a single lower-case line in a small italic serif, ochre ink, wide letterspacing, centred, the commas kept; spelled exactly as written",
"palette": [
"#C6952F"
],
"text": "a meadow, a parasol, an unhurried summer",
"type": "text"
},
"width": 628,
"x": 134,
"y": 1042
},
{
"height": 16,
"metadata": {
"desc": "a very small line of wide-tracked capitals in ink navy at the very foot of the band, centred; spelled exactly C O M F Y space O R G",
"palette": [
"#1E2A38"
],
"text": "COMFY ORG",
"type": "text"
},
"width": 502,
"x": 197,
"y": 1104
}
]
},
"width": 896
},
"_meta": {
"title": "Create Bounding Boxes"
}
},
"92": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"91",
1
]
},
"_meta": {
"title": "Preview as Text"
}
},
"93": {
"class_type": "BuildJsonPromptIdeogram",
"inputs": {
"aesthetics": "mid-century modern, vintage travel poster, classical grace and stillness, elegant romantic figure, nostalgic, print-era, artful",
"background": "the poster environment: a tiled ochre facade pierced by three round-headed arches that open onto a flat pale-blue sky with one cream cloud bank; through the right arch a single tree; a daisy meadow filling the lower half of the frame",
"color_palette": {
"__value__": []
},
"element": [
"91",
2
],
"high_level_description": "A mid-century screen-print travel poster: a graceful classical woman in a long gown stands with her back to the camera under an open parasol in a meadow of white daisies, before a sunlit ochre facade pierced by three round-headed arches, the poster typography set in a cream band across the foot.",
"lighting": "hard late-afternoon sun from the upper right throwing one crisp diagonal shadow across the facade; bright even light over the meadow; the woman and her parasol reading as one clean silhouette against the pale blue sky; no gradients, no lens effects",
"medium": "graphic_design",
"style": "art_style",
"style.art_style": "mid-century screen-print travel-poster illustration, flat unmodulated colour planes, hand-cut stencil edges, posterised simplification, slight ink misregistration, warm off-white paper stock with fine print grain; the figure printed in the same flat language with only two or three tones per form"
},
"_meta": {
"title": "Build JSON Prompt (Ideogram)"
}
},
"94": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"93",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"98": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"91",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"250": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"339:249",
0
]
},
"_meta": {
"title": "PreviewAny (Ming caption)"
}
},
"340": {
"class_type": "ImageStitch",
"inputs": {
"direction": "right",
"image1": [
"49",
0
],
"image2": [
"98",
0
],
"match_image_size": True,
"spacing_color": "white",
"spacing_width": 0
},
"_meta": {
"title": "Stitch Images"
}
},
"341": {
"class_type": "ImageStitch",
"inputs": {
"direction": "right",
"image1": [
"340",
0
],
"image2": [
"344",
0
],
"match_image_size": True,
"spacing_color": "white",
"spacing_width": 0
},
"_meta": {
"title": "Stitch Images"
}
},
"342": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"341",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"344": {
"class_type": "SaveImageAdvanced",
"inputs": {
"filename_prefix": "Ming_Image",
"format": "png",
"format.bit_depth": "8-bit",
"format.input_color_space": "sRGB",
"images": [
"80:15",
0
]
},
"_meta": {
"title": "Save Image (Advanced)"
}
},
"339:200": {
"class_type": "ConvertDictionaryToString",
"inputs": {
"dictionary": [
"93",
0
],
"indent": 0
},
"_meta": {
"title": "Convert Dictionary to String (Ideogram prompt → text)"
}
},
"339:201": {
"class_type": "ConvertArrayToString",
"inputs": {
"array": [
"91",
2
],
"indent": 0
},
"_meta": {
"title": "Convert Array to String (boxes → text, the queue)"
}
},
"339:202": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "[^{]",
"replace": "",
"string": [
"339:201",
0
]
},
"_meta": {
"title": "Replace Text (Regex) (count the boxes)"
}
},
"339:203": {
"class_type": "StringLength",
"inputs": {
"string": [
"339:202",
0
]
},
"_meta": {
"title": "Text Length"
}
},
"339:204": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": False,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": False,
"regex_pattern": "\"lighting\":\\s*\"([^\"]*)\"",
"string": [
"339:200",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"339:205": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": False,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": False,
"regex_pattern": "\"medium\":\\s*\"([^\"]*)\"",
"string": [
"339:200",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"339:206": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": False,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": False,
"regex_pattern": "\"(?:art_style|photo)\":\\s*\"([^\"]*)\"",
"string": [
"339:200",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"339:207": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": False,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": False,
"regex_pattern": "\"aesthetics\":\\s*\"([^\"]*)\"",
"string": [
"339:200",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"339:208": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": False,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": False,
"regex_pattern": "\"background\":\\s*\"([^\"]*)\"",
"string": [
"339:200",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"339:209": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": False,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": False,
"regex_pattern": "\"color_palette\":\\s*(\\[[^\\]]*\\])",
"string": [
"339:200",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"339:210": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "^$",
"replace": "[]",
"string": [
"339:209",
0
]
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"339:211": {
"class_type": "StringFormat",
"inputs": {
"f_string": "{a}; {b}; aesthetics: {c}",
"values.a": [
"339:205",
0
],
"values.b": [
"339:206",
0
],
"values.c": [
"339:207",
0
]
},
"_meta": {
"title": "Format Text"
}
},
"339:212": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": False,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": False,
"regex_pattern": "\"high_level_description\":\\s*\"([^\"]*)\"",
"string": [
"339:200",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"339:213": {
"class_type": "StringFormat",
"inputs": {
"f_string": "{a} {b}",
"values.a": [
"339:212",
0
],
"values.b": [
"339:208",
0
]
},
"_meta": {
"title": "Format Text"
}
},
"339:214": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "\"",
"replace": "\\\"",
"string": [
"339:213",
0
]
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"339:215": {
"class_type": "StringFormat",
"inputs": {
"f_string": " {{\"description\": \"{a}\", \"coordinates\": \"cx: 0.500, cy: 0.500, w: 1.000, h: 1.000\", \"hierarchy_and_relation\": \"Base layer: fills the whole canvas, behind every other layer.\", \"color_specs\": {b}}}",
"values.a": [
"339:214",
0
],
"values.b": [
"339:210",
0
]
},
"_meta": {
"title": "Format Text (base layer, whole canvas)"
}
},
"339:216": {
"class_type": "CreateList",
"inputs": {
"inputs.input0": [
"339:215",
0
],
"inputs.input1": [
"339:201",
0
]
},
"_meta": {
"title": "Create List (seed = base layer + queue)"
}
},
"339:217": {
"class_type": "StartLoop",
"inputs": {
"cache_iterations": False,
"initial_iteration_value": [
"339:216",
0
],
"mode": "For",
"mode.max_iteration": 12,
"mode.start_iteration_index": 0,
"mode.step": 1
},
"_meta": {
"title": "Start Loop (one iteration per box)"
}
},
"339:218": {
"class_type": "GetItemFromList",
"inputs": {
"index": 0,
"list": [
"339:217",
4
]
},
"_meta": {
"title": "Get Item From List (layers so far)"
}
},
"339:219": {
"class_type": "GetItemFromList",
"inputs": {
"index": 1,
"list": [
"339:217",
4
]
},
"_meta": {
"title": "Get Item From List (remaining boxes)"
}
},
"339:220": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": False,
"dotall": False,
"group_index": 0,
"mode": "First Match",
"multiline": False,
"regex_pattern": "\\{[^{}]*\\}",
"string": [
"339:219",
0
]
},
"_meta": {
"title": "Extract Text (next box)"
}
},
"339:221": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": False,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": False,
"regex_pattern": "\"bbox\":\\s*\\[\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*\\]",
"string": [
"339:220",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"339:222": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": False,
"dotall": False,
"group_index": 2,
"mode": "First Group",
"multiline": False,
"regex_pattern": "\"bbox\":\\s*\\[\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*\\]",
"string": [
"339:220",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"339:223": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": False,
"dotall": False,
"group_index": 3,
"mode": "First Group",
"multiline": False,
"regex_pattern": "\"bbox\":\\s*\\[\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*\\]",
"string": [
"339:220",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"339:224": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": False,
"dotall": False,
"group_index": 4,
"mode": "First Group",
"multiline": False,
"regex_pattern": "\"bbox\":\\s*\\[\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*,\\s*(-?\\d+)\\s*\\]",
"string": [
"339:220",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"339:225": {
"class_type": "ComfyNumberConvert",
"inputs": {
"value": [
"339:221",
0
]
},
"_meta": {
"title": "Convert Number"
}
},
"339:226": {
"class_type": "ComfyNumberConvert",
"inputs": {
"value": [
"339:222",
0
]
},
"_meta": {
"title": "Convert Number"
}
},
"339:227": {
"class_type": "ComfyNumberConvert",
"inputs": {
"value": [
"339:223",
0
]
},
"_meta": {
"title": "Convert Number"
}
},
"339:228": {
"class_type": "ComfyNumberConvert",
"inputs": {
"value": [
"339:224",
0
]
},
"_meta": {
"title": "Convert Number"
}
},
"339:229": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "(a + b) / 2000",
"values.a": [
"339:225",
0
],
"values.b": [
"339:227",
0
]
},
"_meta": {
"title": "Math Expression"
}
},
"339:230": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "(a + b) / 2000",
"values.a": [
"339:226",
0
],
"values.b": [
"339:228",
0
]
},
"_meta": {
"title": "Math Expression"
}
},
"339:231": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "(b - a) / 1000",
"values.a": [
"339:226",
0
],
"values.b": [
"339:228",
0
]
},
"_meta": {
"title": "Math Expression"
}
},
"339:232": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "(b - a) / 1000",
"values.a": [
"339:225",
0
],
"values.b": [
"339:227",
0
]
},
"_meta": {
"title": "Math Expression"
}
},
"339:233": {
"class_type": "StringFormat",
"inputs": {
"f_string": "cx: {a:.3f}, cy: {b:.3f}, w: {c:.3f}, h: {d:.3f}",
"values.a": [
"339:230",
0
],
"values.b": [
"339:229",
0
],
"values.c": [
"339:231",
0
],
"values.d": [
"339:232",
0
]
},
"_meta": {
"title": "Format Text (Ming coordinates)"
}
},
"339:234": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": False,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": False,
"regex_pattern": "\"desc\":\\s*\"([^\"]*)\"",
"string": [
"339:220",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"339:235": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "\"",
"replace": "\\\"",
"string": [
"339:234",
0
]
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"339:236": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": False,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": False,
"regex_pattern": "\"text\":\\s*\"([^\"]*)\"",
"string": [
"339:220",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"339:237": {
"class_type": "StringFormat",
"inputs": {
"f_string": "Text layer reading \"{a}\". ",
"values.a": [
"339:236",
0
]
},
"_meta": {
"title": "Format Text"
}
},
"339:238": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "Text layer reading \"\"\\.\\s*",
"replace": "",
"string": [
"339:237",
0
]
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"339:239": {
"class_type": "RegexExtract",
"inputs": {
"case_insensitive": False,
"dotall": False,
"group_index": 1,
"mode": "First Group",
"multiline": False,
"regex_pattern": "\"color_palette\":\\s*(\\[[^\\]]*\\])",
"string": [
"339:220",
0
]
},
"_meta": {
"title": "Extract Text"
}
},
"339:240": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "^$",
"replace": "[]",
"string": [
"339:239",
0
]
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"339:241": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "\"",
"replace": "\\\"",
"string": [
"339:238",
0
]
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"339:242": {
"class_type": "StringFormat",
"inputs": {
"f_string": " {{\"description\": \"{a}{b}\", \"coordinates\": \"{c}\", \"hierarchy_and_relation\": \"Sits above the layers listed before it.\", \"color_specs\": {d}}}",
"values.a": [
"339:241",
0
],
"values.b": [
"339:235",
0
],
"values.c": [
"339:233",
0
],
"values.d": [
"339:240",
0
]
},
"_meta": {
"title": "Format Text (this box as a Ming layer)"
}
},
"339:243": {
"class_type": "StringFormat",
"inputs": {
"f_string": "{a},\n{b}",
"values.a": [
"339:218",
0
],
"values.b": [
"339:242",
0
]
},
"_meta": {
"title": "Format Text (layers + this layer)"
}
},
"339:244": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "^\\s*\\[?\\s*\\{[^{}]*\\}\\s*,?",
"replace": "",
"string": [
"339:219",
0
]
},
"_meta": {
"title": "Replace Text (Regex) (queue minus this box)"
}
},
"339:245": {
"class_type": "CreateList",
"inputs": {
"inputs.input0": [
"339:243",
0
],
"inputs.input1": [
"339:244",
0
]
},
"_meta": {
"title": "Create List"
}
},
"339:246": {
"class_type": "CreateList",
"inputs": {
"inputs.input0": [
"339:243",
0
]
},
"_meta": {
"title": "Create List"
}
},
"339:247": {
"class_type": "EndLoop",
"inputs": {
"accumulate": False,
"next_iteration_value": [
"339:245",
0
],
"output_value": [
"339:246",
0
]
},
"_meta": {
"title": "End Loop"
}
},
"339:249": {
"class_type": "StringFormat",
"inputs": {
"f_string": "{{\"canvas_settings\": {{\"aspect_ratio\": \"{a}\", \"ambient_lighting\": \"{b}\", \"image_style\": \"{c}\"}}, \"layers\": [\n{d}\n]}}",
"values.a": [
"339:338:335",
0
],
"values.b": [
"339:204",
0
],
"values.c": [
"339:211",
0
],
"values.d": [
"339:247",
0
]
},
"_meta": {
"title": "Format Text (Ming caption, Figma style)"
}
},
"339:338:324": {
"class_type": "CreateList",
"inputs": {
"inputs.input0": [
"81",
0
],
"inputs.input1": [
"81",
1
]
},
"_meta": {
"title": "Create List (aspect ratio: width + height)"
}
},
"339:338:325": {
"class_type": "StartLoop",
"inputs": {
"cache_iterations": False,
"initial_iteration_value": [
"339:338:324",
0
],
"mode": "simple",
"mode.num_iterations": [
"339:338:337",
1
]
},
"_meta": {
"title": "Start Loop (Euclid gcd; iterations come from width/height)"
}
},
"339:338:326": {
"class_type": "GetItemFromList",
"inputs": {
"index": 0,
"list": [
"339:338:325",
4
]
},
"_meta": {
"title": "Get Item From List (a)"
}
},
"339:338:327": {
"class_type": "GetItemFromList",
"inputs": {
"index": 1,
"list": [
"339:338:325",
4
]
},
"_meta": {
"title": "Get Item From List (b)"
}
},
"339:338:328": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a % b if b > 0 else 0",
"values.a": [
"339:338:326",
0
],
"values.b": [
"339:338:327",
0
]
},
"_meta": {
"title": "Math Expression (r = a mod b)"
}
},
"339:338:329": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "b if b > 0 else a",
"values.a": [
"339:338:326",
0
],
"values.b": [
"339:338:327",
0
]
},
"_meta": {
"title": "Math Expression (next a = b if b > 0 else a)"
}
},
"339:338:330": {
"class_type": "CreateList",
"inputs": {
"inputs.input0": [
"339:338:329",
1
],
"inputs.input1": [
"339:338:328",
1
]
},
"_meta": {
"title": "Create List (next pair)"
}
},
"339:338:331": {
"class_type": "EndLoop",
"inputs": {
"accumulate": False,
"next_iteration_value": [
"339:338:330",
0
],
"output_value": [
"339:338:330",
0
]
},
"_meta": {
"title": "End Loop"
}
},
"339:338:332": {
"class_type": "GetItemFromList",
"inputs": {
"index": 0,
"list": [
"339:338:331",
0
]
},
"_meta": {
"title": "Get Item From List (gcd)"
}
},
"339:338:333": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a / b",
"values.a": [
"81",
0
],
"values.b": [
"339:338:332",
0
]
},
"_meta": {
"title": "Math Expression (width / gcd)"
}
},
"339:338:334": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a / b",
"values.a": [
"81",
1
],
"values.b": [
"339:338:332",
0
]
},
"_meta": {
"title": "Math Expression (height / gcd)"
}
},
"339:338:335": {
"class_type": "StringFormat",
"inputs": {
"f_string": "{a}:{b}, {c} × {d} px",
"values.a": [
"339:338:333",
1
],
"values.b": [
"339:338:334",
1
],
"values.c": [
"81",
0
],
"values.d": [
"81",
1
]
},
"_meta": {
"title": "Format Text (canvas aspect ratio + pixels)"
}
},
"339:338:337": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "ceil(1.5 * log2(max(a, b))) + 2",
"values.a": [
"81",
0
],
"values.b": [
"81",
1
]
},
"_meta": {
"title": "Math Expression (loop iterations: ceil(1.5 × log2(max(w, h))) + 2)"
}
},
"80:1": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "ming_image_0.2_design_int8_convrot.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"80:14": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "ming_image_vae_bf16.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"80:15": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"80:3",
0
],
"vae": [
"80:14",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"80:21": {
"class_type": "BasicScheduler",
"inputs": {
"denoise": 1,
"model": [
"80:42",
0
],
"scheduler": "simple",
"steps": 12
},
"_meta": {
"title": "BasicScheduler"
}
},
"80:23": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "ming_image_0.2_ling_mini_2.0_int8_convrot.safetensors",
"device": "default",
"type": "qwen_image"
},
"_meta": {
"title": "Load CLIP"
}
},
"80:26": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 247081603831298
},
"_meta": {
"title": "RandomNoise"
}
},
"80:3": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"80:76",
0
],
"latent_image": [
"80:41",
0
],
"noise": [
"80:26",
0
],
"sampler": [
"80:75",
0
],
"sigmas": [
"80:21",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"80:41": {
"class_type": "EmptyLatentImage",
"inputs": {
"batch_size": 1,
"height": [
"80:79",
0
],
"width": [
"80:78",
0
]
},
"_meta": {
"title": "Empty Latent Image"
}
},
"80:42": {
"class_type": "ModelSamplingFlux",
"inputs": {
"base_shift": 0.5,
"height": [
"80:79",
0
],
"max_shift": 1.15,
"model": [
"80:68",
0
],
"width": [
"80:78",
0
]
},
"_meta": {
"title": "ModelSamplingFlux"
}
},
"80:57": {
"class_type": "TextEncodeMingImageEdit",
"inputs": {
"clip": [
"80:23",
0
],
"images.image_1": [
"49",
0
],
"prompt": [
"339:249",
0
],
"vae": [
"80:14",
0
]
},
"_meta": {
"title": "Text Encode Ming Image Edit"
}
},
"80:68": {
"class_type": "ModelAttentionBackend",
"inputs": {
"attention": "comfy kitchen attention",
"model": [
"80:1",
0
]
},
"_meta": {
"title": "Model Attention Backend"
}
},
"80:75": {
"class_type": "SamplerLCM",
"inputs": {
"noise_clip_std": 0,
"s_noise": 1.02,
"s_noise_end": 1
},
"_meta": {
"title": "SamplerLCM"
}
},
"80:76": {
"class_type": "BasicGuider",
"inputs": {
"conditioning": [
"80:57",
0
],
"model": [
"80:42",
0
]
},
"_meta": {
"title": "Basic Guider"
}
},
"80:78": {
"class_type": "PrimitiveInt",
"inputs": {
"value": [
"81",
0
]
},
"_meta": {
"title": "Int (Width)"
}
},
"80:79": {
"class_type": "PrimitiveInt",
"inputs": {
"value": [
"81",
1
]
},
"_meta": {
"title": "Int"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)مهام سير عمل ذات صلة
- MMing Image
Ming Image 0.2 تصميم: نص إلى صورة
- Nano Banana Pro, Gemini3 Pro Image Preview, Google
Create a character turnaround
- Qwen-Image-Edit
Change a material
- Qwen-Image-Edit
شاهد موضوعك من زاوية جديدة
- Flux.2 Dev, Flux
Create a product mockup
- Nano Banana Pro
Try an outfit on a character
- Seedream
Put your product in a new scene
- SSeedVR2
Upscale and restore detail
- Nano Banana Pro
Sharpen a product photo
- Topaz
Upscale an illustration
- HHitPaw
Restore portrait detail
- FLUX.1 Fill
Edit a selected region