Product Mockup(Flux.2 Dev FP8)
Create product mockups by applying design patterns to packaging, mugs, and other products using multi-reference consistency.
概要
This ComfyUI workflow is designed to create realistic product mockups by applying design patterns to various items such as packaging and mugs. It leverages the Flux.2 Dev model, which is known for its ability to maintain multi-reference consistency, ensuring that the design patterns are applied uniformly across different surfaces and angles.
The workflow utilizes several key nodes, including SaveImage and LoadImage, to manage input and output efficiently. Additionally, the workflow incorporates a MarkdownNote node for documentation purposes, and specific nodes identified by unique IDs to handle the image processing tasks. By using quantized weights from the Flux.2 Dev model, this workflow optimizes performance without compromising on quality, making it an excellent choice for designers and marketers who need to visualize product designs quickly and effectively.
入力するもの
- ワークフローを読み込み中
ComfyUI で実行できます。 このワークフローはこのページでは実行できません。すべてが読み込まれた状態でComfy Cloudで開くか、ご自身のComfyUI用にダウンロードしてください。
Cloudで試すワークフローの内部
ノードグラフの読み取り専用プレビューです。ノードを編集するには、Comfy Cloudで開くかダウンロードしてください。
Loading the graph
Open full-size workflow preview- 作成者
- ComfyUI
カスタムノードが必要です
- ワークフローを読み込み中
コードからこのワークフローを使用する
可能な場合はワークフローグラフと入力から生成されます。それ以外の場合は保存された例が表示されます。料金が発生する場合があるため、コードを実行する前に認証情報とエンドポイントを確認してください。
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({
"9": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "Flux2",
"images": [
"62:8",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"42": {
"class_type": "LoadImage",
"inputs": {
"image": "image_flux2_input_ref_image.png"
},
"_meta": {
"title": "Load Image"
}
},
"46": {
"class_type": "LoadImage",
"inputs": {
"image": "image_flux2_input_Illustration.png"
},
"_meta": {
"title": "Load Image"
}
},
"64": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "Flux2",
"images": [
"63:8",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"62:10": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "flux2-vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"62:12": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "flux2_dev_fp8mixed.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"62:13": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"62:22",
0
],
"latent_image": [
"62:47",
0
],
"noise": [
"62:25",
0
],
"sampler": [
"62:16",
0
],
"sigmas": [
"62:48",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"62:16": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"62:22": {
"class_type": "BasicGuider",
"inputs": {
"conditioning": [
"62:39",
0
],
"model": [
"62:12",
0
]
},
"_meta": {
"title": "Basic Guider"
}
},
"62:25": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 120839687766682
},
"_meta": {
"title": "RandomNoise"
}
},
"62:26": {
"class_type": "FluxGuidance",
"inputs": {
"conditioning": [
"62:6",
0
],
"guidance": 4
},
"_meta": {
"title": "FluxGuidance"
}
},
"62:38": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "mistral_3_small_flux2_fp8.safetensors",
"device": "default",
"type": "flux2"
},
"_meta": {
"title": "Load CLIP"
}
},
"62:39": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": [
"62:43",
0
],
"latent": [
"62:40",
0
]
},
"_meta": {
"title": "Set Reference Latent"
}
},
"62:40": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"62:41",
0
],
"vae": [
"62:10",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"62:41": {
"class_type": "ImageScaleToTotalPixels",
"inputs": {
"image": [
"46",
0
],
"megapixels": 1,
"resolution_steps": 1,
"upscale_method": "area"
},
"_meta": {
"title": "Scale Image to Total Pixels"
}
},
"62:43": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": [
"62:26",
0
],
"latent": [
"62:44",
0
]
},
"_meta": {
"title": "Set Reference Latent"
}
},
"62:44": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"62:45",
0
],
"vae": [
"62:10",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"62:45": {
"class_type": "ImageScaleToTotalPixels",
"inputs": {
"image": [
"42",
0
],
"megapixels": 1,
"resolution_steps": 1,
"upscale_method": "area"
},
"_meta": {
"title": "Scale Image to Total Pixels"
}
},
"62:47": {
"class_type": "EmptyFlux2LatentImage",
"inputs": {
"batch_size": 1,
"height": [
"62:63",
1
],
"width": [
"62:63",
0
]
},
"_meta": {
"title": "Empty Flux 2 Latent"
}
},
"62:48": {
"class_type": "Flux2Scheduler",
"inputs": {
"height": [
"62:63",
1
],
"steps": 20,
"width": [
"62:63",
0
]
},
"_meta": {
"title": "Flux2Scheduler"
}
},
"62:6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"62:38",
0
],
"text": "Apply the design from Reference Image 1 onto objects in Reference Image 2.\n"
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"62:63": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"62:45",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"62:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"62:13",
0
],
"vae": [
"62:10",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"63:10": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "flux2-vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"63:12": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "flux2_dev_fp8mixed.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"63:13": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"63:22",
0
],
"latent_image": [
"63:47",
0
],
"noise": [
"63:25",
0
],
"sampler": [
"63:16",
0
],
"sigmas": [
"63:48",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"63:16": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"63:22": {
"class_type": "BasicGuider",
"inputs": {
"conditioning": [
"63:39",
0
],
"model": [
"63:63",
0
]
},
"_meta": {
"title": "Basic Guider"
}
},
"63:25": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 120839687766682
},
"_meta": {
"title": "RandomNoise"
}
},
"63:26": {
"class_type": "FluxGuidance",
"inputs": {
"conditioning": [
"63:6",
0
],
"guidance": 4
},
"_meta": {
"title": "FluxGuidance"
}
},
"63:38": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "mistral_3_small_flux2_fp8.safetensors",
"device": "default",
"type": "flux2"
},
"_meta": {
"title": "Load CLIP"
}
},
"63:39": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": [
"63:43",
0
],
"latent": [
"63:40",
0
]
},
"_meta": {
"title": "Set Reference Latent"
}
},
"63:40": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"63:41",
0
],
"vae": [
"63:10",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"63:41": {
"class_type": "ImageScaleToTotalPixels",
"inputs": {
"image": [
"46",
0
],
"megapixels": 1,
"resolution_steps": 1,
"upscale_method": "area"
},
"_meta": {
"title": "Scale Image to Total Pixels"
}
},
"63:43": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": [
"63:26",
0
],
"latent": [
"63:44",
0
]
},
"_meta": {
"title": "Set Reference Latent"
}
},
"63:44": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"63:45",
0
],
"vae": [
"63:10",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"63:45": {
"class_type": "ImageScaleToTotalPixels",
"inputs": {
"image": [
"42",
0
],
"megapixels": 1,
"resolution_steps": 1,
"upscale_method": "area"
},
"_meta": {
"title": "Scale Image to Total Pixels"
}
},
"63:47": {
"class_type": "EmptyFlux2LatentImage",
"inputs": {
"batch_size": 1,
"height": [
"63:65",
1
],
"width": [
"63:65",
0
]
},
"_meta": {
"title": "Empty Flux 2 Latent"
}
},
"63:48": {
"class_type": "Flux2Scheduler",
"inputs": {
"height": [
"63:65",
1
],
"steps": 8,
"width": [
"63:65",
0
]
},
"_meta": {
"title": "Flux2Scheduler"
}
},
"63:6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"63:38",
0
],
"text": "Apply the design from Reference Image 1 onto objects in Reference Image 2.\n"
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"63:63": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "Flux2TurboComfyv2.safetensors",
"model": [
"63:12",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"63:65": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"63:45",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"63:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"63:13",
0
],
"vae": [
"63:10",
0
]
},
"_meta": {
"title": "VAE Decode"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)よくある質問
Multi-reference consistency ensures that design patterns are applied uniformly across different surfaces and angles, maintaining a cohesive look.
Quantized weights optimize the model's performance, allowing for faster processing times without sacrificing image quality.
Yes, as long as you have a clear image of the product and a compatible design pattern, this workflow can be adapted to various product types.
Ensure your input images are high quality and configure the nodes correctly to maintain design consistency across the product.