منمنمات متساوية القياس من صورة سيلفي
قم برفع شخصية أو صورة سيلفي وأدخل موجه الزي/المشهد. توليد شبكة 2x2 من التماثيل متساوية القياس لشخصيتك.
حول
يتيح هذا سير العمل ComfyUI بعنوان 'Isometric Miniatures from a Selfie' للمستخدمين تحويل صورة سيلفي بسيطة أو صورة شخصية إلى شبكة 2×2 من مجسمات إيزومترية. بالاعتماد على نماذج مثل Nano Banana Pro وGemini3 Pro Image Preview، يتيح سير العمل تخصيص الملابس والمشاهد بشكل إبداعي. تبدأ العملية برفع صورة باستخدام عقدة LoadImage. بعد ذلك تعالج GeminiImage2Node الصورة وتدمجها مع مطالبات يحددها المستخدم للملابس والمشاهد. يستخدم سير العمل عُقدًا مخصصة مثل comfyui-kjnodes وcomfyui_essentials لتحسين عملية التحويل وضمان مخرجات عالية الجودة. يُعد هذا سير العمل مفيدًا خصوصًا للفنانين والمصممين الذين يريدون إنشاء فن إيزومتري مميز من الصور الشخصية أو تصاميم الشخصيات.
ما تقدّمه
- جارٍ قراءة سير العمل
يعمل في ComfyUI. لا يمكن تشغيل سير العمل هذا على هذه الصفحة. افتحه في Comfy Cloud مع تحميل كل شيء، أو نزّله لاستخدامه في ComfyUI الخاص بك.
جرّبه في Cloudداخل سير العمل
معاينة للقراءة فقط لرسم العقد البياني. افتحه في Comfy Cloud أو نزّله لتعديل العقد.
Loading the graph
Open full-size workflow preview- المؤلف
- Rob
يتطلب عُقدًا مخصصة
- جارٍ قراءة سير العمل
استخدم سير العمل هذا من خلال التعليمات البرمجية
يتم إنشاؤه من مخطط سير العمل والمدخلات عندما يكون ذلك ممكنًا؛ وإلا فتُعرض الأمثلة المخزنة. راجع بيانات الاعتماد ونقاط النهاية قبل تشغيل التعليمات البرمجية، إذ قد تترتب عليها رسوم.
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({
"1": {
"class_type": "LoadImage",
"inputs": {
"image": "character_in_red_jacket.png"
},
"_meta": {
"title": "Load Character/Selfie Image"
}
},
"3": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "1:1",
"images": [
"1",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": [
"86:81",
0
],
"resolution": "4K",
"response_modalities": "IMAGE+TEXT",
"seed": 111111,
"system_prompt": "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests."
},
"_meta": {
"title": "Nano Banana Pro (Google Gemini Image)"
}
},
"4": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-2x2_grid",
"images": [
"3",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"52": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 0
},
"_meta": {
"title": "Crop Inset Grid Images"
}
},
"54": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_1",
"images": [
"53:8",
0
]
},
"_meta": {
"title": "Save Image 1"
}
},
"55": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_2",
"images": [
"53:9",
0
]
},
"_meta": {
"title": "Save Image 2"
}
},
"56": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_3",
"images": [
"53:10",
0
]
},
"_meta": {
"title": "Save Image 3"
}
},
"57": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_4",
"images": [
"53:11",
0
]
},
"_meta": {
"title": "Save Image 4"
}
},
"79": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "frame 1: a hardware engineer building modern rocket engines\nframe 2: riding on an all red ducatti\nframe 3: standing behind a DJ deck\nframe 4: wearing a virtual reality headset controlling a drone"
},
"_meta": {
"title": "Describe Scenes/Actions/Vibes"
}
},
"83": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "the same outfit as the input image"
},
"_meta": {
"title": "Describe Outfit"
}
},
"85": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"86:81",
0
]
},
"_meta": {
"title": "Preview Prompt"
}
},
"53:10": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"53:16",
0
],
"image": [
"3",
0
],
"width": [
"53:15",
0
],
"x": [
"53:24",
0
],
"y": [
"53:12",
0
]
},
"_meta": {
"title": "3"
}
},
"53:11": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"53:16",
0
],
"image": [
"3",
0
],
"width": [
"53:15",
0
],
"x": [
"53:13",
0
],
"y": [
"53:12",
0
]
},
"_meta": {
"title": "4"
}
},
"53:12": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"53:16",
0
],
"b": [
"53:14",
0
],
"value": "a + (b/2)"
},
"_meta": {
"title": "Row 2 - Y val"
}
},
"53:13": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"53:15",
0
],
"b": [
"53:14",
0
],
"value": "a + (b/2)"
},
"_meta": {
"title": "Col 2 - X val"
}
},
"53:14": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"52",
0
],
"b": 0,
"value": "a"
},
"_meta": {
"title": "Crop Inset Grid Images Value"
}
},
"53:15": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"53:17",
0
],
"b": [
"53:14",
0
],
"value": "(a-2*b) / 2"
},
"_meta": {
"title": "WIDTH"
}
},
"53:16": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"53:17",
1
],
"b": [
"53:14",
0
],
"value": "(a-2*b) / 2"
},
"_meta": {
"title": "HEIGHT"
}
},
"53:17": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"3",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"53:19": {
"class_type": "ImageBatchMulti",
"inputs": {
"image_1": [
"53:8",
0
],
"image_2": [
"53:9",
0
],
"image_3": [
"53:10",
0
],
"image_4": [
"53:11",
0
],
"inputcount": 4
},
"_meta": {
"title": "Image Batch Multi"
}
},
"53:20": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 2,
"height": [
"53:22",
0
],
"image": [
"53:19",
0
],
"keep_proportion": "stretch",
"pad_color": "0, 0, 0",
"upscale_method": "nearest-exact",
"width": [
"53:23",
0
]
},
"_meta": {
"title": "Resize Images"
}
},
"53:21": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"53:20",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"53:22": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"53:17",
1
],
"b": 0,
"value": "(a) / 2"
},
"_meta": {
"title": "HEIGHT / 2"
}
},
"53:23": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"53:17",
0
],
"b": 0,
"value": "(a) / 2"
},
"_meta": {
"title": "WIDTH / 2"
}
},
"53:24": {
"class_type": "SimpleMath+",
"inputs": {
"a": 0,
"b": [
"53:14",
0
],
"value": "b/2"
},
"_meta": {
"title": "Col 1 - X val"
}
},
"53:4": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"53:8",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"53:5": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"53:9",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"53:6": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"53:10",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"53:7": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"53:11",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"53:8": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"53:16",
0
],
"image": [
"3",
0
],
"width": [
"53:15",
0
],
"x": [
"53:24",
0
],
"y": [
"53:24",
0
]
},
"_meta": {
"title": "1"
}
},
"53:9": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"53:16",
0
],
"image": [
"3",
0
],
"width": [
"53:15",
0
],
"x": [
"53:13",
0
],
"y": 0
},
"_meta": {
"title": "2"
}
},
"86:80": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "Make a miniature, full-body, isometric, realistic figurine of this person, wearing {outfit}, the character is: {description}, on a white background, minimal, 4K resolution.\nAll frames should be oriented in the same direction.\nNO VISIBLE GUTTERS OR BLACK BORDERS."
},
"_meta": {
"title": "Prompt Template"
}
},
"86:81": {
"class_type": "StringConcatenate",
"inputs": {
"delimiter": " ",
"string_a": "Generate a 2x2 (2 rows, 2 cols) grid.\n\nDivide the frame in 4 different frames. Each frame must be unique.",
"string_b": [
"86:84",
0
]
},
"_meta": {
"title": "Concatenate Text"
}
},
"86:82": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "{outfit}",
"replace": [
"83",
0
],
"string": [
"86:80",
0
]
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"86:84": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "{description}",
"replace": [
"79",
0
],
"string": [
"86:82",
0
]
},
"_meta": {
"title": "Replace Text (Regex)"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)الأسئلة والأجوبة
صور السيلفي عالية الدقة أو صور الشخصيات ذات الملامح الواضحة تعطي أفضل النتائج. تأكد من أن الصورة مضاءة جيدًا وخالية من العوائق.
نعم، يمكنك إدخال مطالبات محددة للملابس والمشاهد باستخدام عقدة PrimitiveStringMultiline لتخصيص مظهر كل مجسّم.
تأكد من تثبيت جميع النماذج والعُقد بشكل صحيح وضبطها. جرّب مطالبات مختلفة ودقات صور أخرى لتحسين النتائج.
نعم، طالما لديك الحقوق المناسبة لصور الإدخال وتلتزم بشروط ترخيص النماذج والعُقد المستخدمة.