نماذج مشاهد الملصق
حمّل تصميم ملصق أو إعلان، وأدخل نبذة قصيرة عن علامتك التجارية، وسيتم إنشاء 4 نماذج أولية في مشاهد متنوعة.
حول
تم تصميم سير العمل 'Poster Scene Mockups' لتبسيط عملية إنشاء نماذج عرض واقعية لتصاميم الملصقات أو الإعلانات. بالاستفادة من نماذج ذكاء اصطناعي مثل Nano Banana Pro وGoogle، يتيح هذا سير العمل للمستخدمين إدخال تصميم ووصف موجز لعلامتهم التجارية لتوليد أربعة نماذج عرض مختلفة ضمن مشاهد متعددة. يستخدم سير العمل سلسلة من العُقَد، بما في ذلك GeminiImage2Node لمعالجة الصور، وLoadImage لرفع التصميم الأولي، وSaveImage لحفظ نماذج العرض النهائية. تُعد عُقَد comfyui_essentials المخصصة جزءًا أساسيًا من هذا سير العمل، إذ توفر وظائف إضافية تعزز عملية تعديل الصور وتوليد نماذج العرض.
تقنيًا، يبدأ سير العمل بعقدة LoadImage لاستيراد تصميم المستخدم. تلتقط PrimitiveStringMultiline وصف العلامة التجارية، ثم تتم معالجته مع التصميم عبر عُقَد مثل RegexReplace وResizeAndPadImage لضمان تنسيق نماذج العرض بشكل صحيح وجعلها جذابة بصريًا. تُستخدم ImageBatch وImageFromBatch للتعامل بكفاءة مع عدة صور، بينما تساعد SimpleMath+ وGetImageSize في تعديل الأبعاد وتغيير الحجم. يفيد هذا سير العمل خصوصًا المصممين والمسوقين الذين يريدون تصور شكل ملصقاتهم بسرعة في إعدادات واقعية، ما يوفر الوقت والموارد في إنشاء نماذج العرض.
ما تقدّمه
- جارٍ قراءة سير العمل
يعمل في 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
- ملفاتك
- تُرفع بواسطة التعليمة البرمجية من عناوين URL الخاصة بها
يتطلب خطة 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": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "2:3",
"images": [
"2",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": [
"41",
0
],
"resolution": "4K",
"response_modalities": "IMAGE",
"seed": 333,
"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)"
}
},
"2": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Poster Image"
}
},
"3": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_stitched",
"images": [
"1",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"18": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 0
},
"_meta": {
"title": "Crop Inset Grid Images"
}
},
"20": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_1",
"images": [
"19:8",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"21": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_2",
"images": [
"19:9",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"22": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_3",
"images": [
"19:10",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"23": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_4",
"images": [
"19:11",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"24": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "Create a 2x2 grid composition featuring four distinct, high-quality mockups. Populate each of the four panels by integrating the poster shown in image 1 (maintain the input posters aspect ratio) into various {type}.\n\nThe entire grid must strictly adhere to a {aesthetic} aesthetic.\n\nApply coordinated {lighting} across all four scenarios to ensure visual consistency. Ensure the scenes in each panel are varied use-cases and look authentic to the chosen medium."
},
"_meta": {
"title": "Prompt Template"
}
},
"25": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "{type}",
"replace": [
"26",
0
],
"string": [
"24",
0
]
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"26": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "billboards"
},
"_meta": {
"title": "Describe the Mockup Medium"
}
},
"27": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "minimalist in a clean neutral toned environment"
},
"_meta": {
"title": "Describe the Aesthetic"
}
},
"28": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "{aesthetic}",
"replace": [
"27",
0
],
"string": [
"25",
0
]
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"30": {
"class_type": "ResizeAndPadImage",
"inputs": {
"image": [
"2",
0
],
"interpolation": "area",
"padding_color": "white",
"target_height": [
"34",
1
],
"target_width": [
"34",
0
]
},
"_meta": {
"title": "Resize And Pad Image"
}
},
"31": {
"class_type": "ImageBatch",
"inputs": {
"image1": [
"32",
0
],
"image2": [
"30",
0
]
},
"_meta": {
"title": "Batch Images (DEPRECATED)"
}
},
"32": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": [
"33",
0
],
"image": [
"19:19",
0
],
"length": 1
},
"_meta": {
"title": "Get Image from Batch"
}
},
"33": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"36",
0
],
"b": 0,
"value": "a - 1"
},
"_meta": {
"title": "Image # as index"
}
},
"34": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"32",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"35": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "auto",
"images": [
"31",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": "Upscale image 1. Use the poster from image 2 as a reference to fix the text.",
"resolution": "4K",
"response_modalities": "IMAGE+TEXT",
"seed": 54321,
"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)"
}
},
"36": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 1
},
"_meta": {
"title": "Select Image #"
}
},
"37": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_upscaled",
"images": [
"35",
0
]
},
"_meta": {
"title": "Save Upscaled Image"
}
},
"40": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "high-contrast studio lighting"
},
"_meta": {
"title": "Describe the Lighting"
}
},
"41": {
"class_type": "RegexReplace",
"inputs": {
"case_insensitive": True,
"count": 0,
"dotall": False,
"multiline": False,
"regex_pattern": "{lighting}",
"replace": [
"40",
0
],
"string": [
"28",
0
]
},
"_meta": {
"title": "Replace Text (Regex)"
}
},
"19:10": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"19:16",
0
],
"image": [
"1",
0
],
"width": [
"19:15",
0
],
"x": 0,
"y": [
"19:12",
0
]
},
"_meta": {
"title": "3"
}
},
"19:11": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"19:16",
0
],
"image": [
"1",
0
],
"width": [
"19:15",
0
],
"x": [
"19:13",
0
],
"y": [
"19:12",
0
]
},
"_meta": {
"title": "4"
}
},
"19:12": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"19:16",
0
],
"b": [
"19:14",
0
],
"value": "a + b"
},
"_meta": {
"title": "Row 2 - Y val"
}
},
"19:13": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"19:15",
0
],
"b": [
"19:14",
0
],
"value": "a + b"
},
"_meta": {
"title": "Col 2 - X val"
}
},
"19:14": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"18",
0
],
"b": 0,
"value": "a*2"
},
"_meta": {
"title": "🔧 Simple Math"
}
},
"19:15": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"19:17",
0
],
"b": [
"19:14",
0
],
"value": "(a-2*b) / 2"
},
"_meta": {
"title": "WIDTH"
}
},
"19:16": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"19:17",
1
],
"b": [
"19:14",
0
],
"value": "(a-2*b) / 2"
},
"_meta": {
"title": "HEIGHT"
}
},
"19:17": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"1",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"19:19": {
"class_type": "ImageBatchMulti",
"inputs": {
"image_1": [
"19:8",
0
],
"image_2": [
"19:9",
0
],
"image_3": [
"19:10",
0
],
"image_4": [
"19:11",
0
],
"inputcount": 4
},
"_meta": {
"title": "Image Batch Multi"
}
},
"19:4": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"19:8",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"19:5": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"19:9",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"19:6": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"19:10",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"19:7": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"19:11",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"19:8": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"19:16",
0
],
"image": [
"1",
0
],
"width": [
"19:15",
0
],
"x": 0,
"y": 0
},
"_meta": {
"title": "1"
}
},
"19:9": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"19:16",
0
],
"image": [
"1",
0
],
"width": [
"19:15",
0
],
"x": [
"19:13",
0
],
"y": 0
},
"_meta": {
"title": "2"
}
}
})
# Replace each example.com URL with a public URL of your file.
workflow.set_input("2", "image", client.assets.from_url("https://example.com/replace-with-a-url/image"))
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)الأسئلة والأجوبة
تدعم عقدة LoadImage تنسيقات الصور الشائعة مثل JPEG وPNG وTIFF لرفع تصميم الملصق.
يمكنك تثبيت العُقَد المخصصة المطلوبة عبر اتباع الدليل المتاح في توثيق ComfyUI أو زيارة مستودعات GitHub المرتبطة في ملاحظات المؤلف.
حاليًا، يتم توليد المشاهد بناءً على إعدادات محددة مسبقًا داخل سير العمل. قد تتم إضافة خيارات تخصيص في تحديثات مستقبلية.
تأكد من أن تصميم الإدخال منسّق بشكل صحيح وأن وصف العلامة التجارية واضح. قد تحتاج أيضًا إلى تعديل إعدادات حجم الصورة داخل سير العمل.