Miniatures isométriques d'un selfie
Téléversez un personnage ou un selfie et saisissez le prompt de la tenue/scène. Générez une grille 2x2 de figurines isométriques de votre personnage.
À propos
Ce workflow ComfyUI, intitulé « Miniatures isométriques à partir d’un selfie », permet de transformer un simple selfie ou une image de personnage en une grille 2x2 de figurines isométriques. En s’appuyant sur des modèles comme Nano Banana Pro et Gemini3 Pro Image Preview, le workflow autorise la personnalisation créative des tenues et des scènes. Le processus commence par le téléchargement d’une image via le nœud LoadImage. Le GeminiImage2Node traite ensuite l’image, en l’intégrant avec les prompts définis par l’utilisateur pour les tenues et les scènes. Le workflow utilise des nœuds personnalisés comme comfyui-kjnodes et comfyui_essentials pour améliorer la transformation, garantissant des résultats de haute qualité. Ce workflow est particulièrement utile pour les artistes et designers souhaitant créer de l’art isométrique unique à partir de photos personnelles ou de designs de personnages.
Ce que vous fournissez
- Lecture du workflow
S’exécute dans ComfyUI. Ce workflow ne peut pas s’exécuter sur cette page. Ouvrez-le dans Comfy Cloud, avec tout déjà chargé, ou téléchargez-le pour votre propre ComfyUI.
Essayer dans CloudDans le workflow
Un aperçu en lecture seule du graphe de nœuds. Ouvrez-le dans Comfy Cloud ou téléchargez-le pour modifier les nœuds.
Loading the graph
Open full-size workflow preview- Auteur
- Rob
Nécessite des nœuds personnalisés
- Lecture du workflow
Utiliser ce workflow depuis du code
Généré à partir du graphe et des entrées du workflow lorsque cela est possible ; sinon, les exemples enregistrés sont affichés. Vérifiez les identifiants et les points de terminaison avant d’exécuter le code, ce qui peut entraîner des frais.
What you need
- Runs on
- Comfy Cloud
- Clé
- COMFY_API_KEY
Nécessite un forfait Cloud payant et des crédits.
# 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)Questions-réponses
Des selfies ou images de personnages haute résolution, bien éclairés et avec des traits nets, offrent les meilleurs résultats.
Oui, vous pouvez saisir des prompts spécifiques pour les tenues et scènes via le nœud PrimitiveStringMultiline afin de personnaliser chaque figurine.
Vérifiez que tous les modèles et nœuds sont correctement installés et configurés. Essayez différents prompts et résolutions d’image pour améliorer le rendu.
Oui, à condition de disposer des droits nécessaires sur les images d’entrée et de respecter les licences des modèles et nœuds utilisés.