Generador de anuncio 3x3
Sube tu producto y entra un prompt breve para cada posición de la cuadrícula en una cuadrícula de 3x3. Genera 9 Imágenes distintas. Selecciona las imágenes que te gusten y amplíalas a 4k usando tu producto como referencia.
Acerca de
El flujo de trabajo 'Cuadrícula 3x3 para Anuncios de Producto' está diseñado para agilizar la generación de imágenes de producto visualmente atractivas para fines publicitarios. Aprovechando un diseño de cuadrícula 3x3, este flujo permite a los usuarios subir una imagen de producto y proporcionar un prompt distinto para cada posición de la cuadrícula. Esto da como resultado la generación de nueve imágenes únicas, cada una destacando diferentes aspectos o características del producto. El flujo utiliza el modelo Nano Banana Pro, conocido por mantener la integridad del producto mientras añade variaciones creativas, y el modelo de Google para la mejora confiable de imágenes.
Técnicamente, el flujo emplea una variedad de nodos para lograr su funcionalidad. El nodo GeminiImage2Node es crucial para la generación de imágenes, mientras que los nodos LoadImage y SaveImage gestionan los procesos de entrada y salida. El flujo también incluye nodos personalizados de ComfyUI-KJNodes y ComfyUI_essentials, que amplían la flexibilidad y opciones de personalización disponibles. Una característica única de este flujo es su capacidad para escalar imágenes seleccionadas a resolución 4K, asegurando salidas de alta calidad aptas para publicidad profesional. Esto es especialmente útil para empresas que buscan crear contenido visual impactante con mínimo esfuerzo.
Lo que proporcionas
- Leyendo el flujo de trabajo
Se ejecuta en ComfyUI. Este flujo de trabajo no puede ejecutarse en esta página. Ábrelo en Comfy Cloud con todo cargado o descárgalo para tu propio ComfyUI.
Probar en CloudDentro del flujo de trabajo
Una vista previa de solo lectura del gráfico de nodos. Ábrelo en Comfy Cloud o descárgalo para editar los nodos.
Loading the graph
Open full-size workflow preview- Autor
- Rob
Requiere nodos personalizados
- Leyendo el flujo de trabajo
Usa este flujo de trabajo desde código
Se genera a partir del gráfico y las entradas del flujo de trabajo cuando es posible; de lo contrario, se muestran ejemplos almacenados. Revisa las credenciales y los endpoints antes de ejecutar el código, ya que puede generar cargos.
What you need
- Runs on
- Comfy Cloud
- Clave
- COMFY_API_KEY
- Tus archivos
- El código los sube desde sus URL
Requiere un plan de pago de Cloud y créditos.
# 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({
"10": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "auto",
"images": [
"11",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": "Create an editorial photoreal 3×3 grid for a high end e commerce ad featuring only the following product: purple glass bottle with galaxy texture.\n\nBackground: minimalist studio. \nLighting: soft and diffused.\n\nGenerate as one 3×3 grid with no margin, gutter or borders.\n\nFollow the prompts for each grid image. If left blank use your creativity:\n\nPosition 1,1: Product hero shot\n\nPosition 1,2: Product pouring out liquid\n\nPosition 1,3: Extreme close up\n\nPosition 2,1: Bottle being opened with corkscrew bottle opener\n\nPosition 2,2: Bottle floating angled\n\nPosition 2,3: Liquid exploding\n\nPosition 3,1: \n\nPosition 3,2:\n\nPosition 3,3:",
"resolution": "4K",
"response_modalities": "IMAGE",
"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)"
}
},
"11": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Product Image"
}
},
"58": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 0
},
"_meta": {
"title": "Crop Inset Grid Images"
}
},
"59": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_1",
"images": [
"56:29",
0
]
},
"_meta": {
"title": "Save Image 1"
}
},
"60": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_2",
"images": [
"56:33",
0
]
},
"_meta": {
"title": "Save Image 2"
}
},
"61": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_3",
"images": [
"56:39",
0
]
},
"_meta": {
"title": "Save Image 3"
}
},
"62": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_4",
"images": [
"56:40",
0
]
},
"_meta": {
"title": "Save Image 4"
}
},
"63": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_6",
"images": [
"56:45",
0
]
},
"_meta": {
"title": "Save Image 6"
}
},
"64": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_5",
"images": [
"56:43",
0
]
},
"_meta": {
"title": "Save Image 5"
}
},
"65": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_7",
"images": [
"56:46",
0
]
},
"_meta": {
"title": "Save Image 7"
}
},
"66": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_8",
"images": [
"56:49",
0
]
},
"_meta": {
"title": "Save Image 8"
}
},
"67": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_9",
"images": [
"56:51",
0
]
},
"_meta": {
"title": "Save Image 9"
}
},
"68": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_stitched",
"images": [
"10",
0
]
},
"_meta": {
"title": "Save Stitched Image"
}
},
"79": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "auto",
"images": [
"93:87",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": "Upscale image 1. Use the product from image 2 as a reference.",
"resolution": "4K",
"response_modalities": "IMAGE",
"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)"
}
},
"81": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-image_upscaled",
"images": [
"79",
0
]
},
"_meta": {
"title": "Save Upscaled Image"
}
},
"91": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 1
},
"_meta": {
"title": "Select Image Number"
}
},
"56:18": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"10",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"56:29": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:67",
0
],
"y": [
"56:71",
0
]
},
"_meta": {
"title": "1"
}
},
"56:32": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:29",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:33": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:59",
0
],
"y": [
"56:71",
0
]
},
"_meta": {
"title": "2"
}
},
"56:34": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:33",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:38": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:39",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:39": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:60",
0
],
"y": [
"56:71",
0
]
},
"_meta": {
"title": "3"
}
},
"56:40": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:67",
0
],
"y": [
"56:63",
0
]
},
"_meta": {
"title": "4"
}
},
"56:41": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:40",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:42": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:43",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:43": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:59",
0
],
"y": [
"56:63",
0
]
},
"_meta": {
"title": "5"
}
},
"56:44": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:45",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:45": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:60",
0
],
"y": [
"56:63",
0
]
},
"_meta": {
"title": "6"
}
},
"56:46": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:67",
0
],
"y": [
"56:62",
0
]
},
"_meta": {
"title": "7"
}
},
"56:47": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:46",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:48": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:49",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:49": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:59",
0
],
"y": [
"56:62",
0
]
},
"_meta": {
"title": "8"
}
},
"56:50": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:51",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:51": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"56:66",
0
],
"image": [
"10",
0
],
"width": [
"56:65",
0
],
"x": [
"56:60",
0
],
"y": [
"56:62",
0
]
},
"_meta": {
"title": "9"
}
},
"56:56": {
"class_type": "ImageBatchMulti",
"inputs": {
"image_1": [
"56:29",
0
],
"image_2": [
"56:33",
0
],
"image_3": [
"56:39",
0
],
"image_4": [
"56:40",
0
],
"image_5": [
"56:43",
0
],
"image_6": [
"56:45",
0
],
"image_7": [
"56:46",
0
],
"image_8": [
"56:49",
0
],
"image_9": [
"56:51",
0
],
"inputcount": 9
},
"_meta": {
"title": "Image Batch Multi"
}
},
"56:57": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"56:56",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"56:59": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"56:65",
0
],
"b": [
"56:64",
0
],
"value": "(a+b) + (b/2)"
},
"_meta": {
"title": "Col 2 - X val"
}
},
"56:60": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"56:65",
0
],
"b": [
"56:64",
0
],
"value": "(2*a) + (b*3)"
},
"_meta": {
"title": "Col 3 - X val"
}
},
"56:62": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"56:66",
0
],
"b": [
"56:64",
0
],
"value": "(2*a) + (3*b)"
},
"_meta": {
"title": "Row 3 - Y val"
}
},
"56:63": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"56:66",
0
],
"b": [
"56:64",
0
],
"value": "(a+b) + (b/2)"
},
"_meta": {
"title": "Row 2 - Y val"
}
},
"56:64": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"58",
0
],
"b": 0,
"value": "a"
},
"_meta": {
"title": "🔧 Simple Math"
}
},
"56:65": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"56:18",
0
],
"b": [
"56:64",
0
],
"value": "(a-3*b) / 3"
},
"_meta": {
"title": "WIDTH"
}
},
"56:66": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"56:18",
1
],
"b": [
"56:64",
0
],
"value": "(a-3*b) / 3"
},
"_meta": {
"title": "HEIGHT"
}
},
"56:67": {
"class_type": "SimpleMath+",
"inputs": {
"a": 0,
"b": [
"56:64",
0
],
"value": "b/2"
},
"_meta": {
"title": "Col 1 - X val"
}
},
"56:71": {
"class_type": "SimpleMath+",
"inputs": {
"a": 0,
"b": [
"56:64",
0
],
"value": "(b/2)"
},
"_meta": {
"title": "Row 1 - Y val"
}
},
"93:78": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": [
"93:89",
0
],
"image": [
"56:56",
0
],
"length": 1
},
"_meta": {
"title": "Get Image from Batch"
}
},
"93:83": {
"class_type": "ResizeAndPadImage",
"inputs": {
"image": [
"11",
0
],
"interpolation": "area",
"padding_color": "white",
"target_height": [
"93:86",
1
],
"target_width": [
"93:86",
0
]
},
"_meta": {
"title": "Resize And Pad Image"
}
},
"93:86": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"93:78",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"93:87": {
"class_type": "ImageBatch",
"inputs": {
"image1": [
"93:78",
0
],
"image2": [
"93:83",
0
]
},
"_meta": {
"title": "Batch Images (DEPRECATED)"
}
},
"93:89": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"91",
0
],
"b": 0,
"value": "a - 1"
},
"_meta": {
"title": "Image # as index"
}
}
})
# Replace each example.com URL with a public URL of your file.
workflow.set_input("11", "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)Preguntas y respuestas
Si aparecen bordes entre las imágenes de la cuadrícula, puedes ajustar la configuración de recorte en el modelo Nano Banana Pro para eliminarlos.
Aunque está diseñado para productos, el flujo puede adaptarse a otros temas ajustando los prompts y las imágenes de entrada.
Puedes instalar los nodos personalizados siguiendo las instrucciones en la documentación de ComfyUI.
Sí, puedes ingresar un prompt único para cada posición de la cuadrícula y así adaptar las imágenes generadas a tus necesidades.