MiniMax-H3-Image: キャラクター置換
写真の人物を参照画像のキャラクターに入れ替えます。アダプターは写真を <Picture 1>、キャラクターを <Picture 2> として読み取り、元のポーズ・構図・ライティングを保ちながら、参照キャラクターの顔・衣装・質感を引き継ぎます。MiniMax-H3-Image と...
概要
Swap the person in a photo for a character from a reference image. The adapter reads the picture as <Picture 1> and the character as <Picture 2>, keeps the pose, framing and lighting of the shot, and carries over the reference character's face, costume and materials. Built on MiniMax-H3-Image with the h3_image_character_swap_v1 LoRA at strength 1.0.
Graph: CLIPLoader, ConditioningZeroOut, GetImageSize, ImageCompare, KSampler, LoadImage, LoadLoraModel, MarkdownNote, MiniMaxH3ImageConditioning, PrimitiveStringMultiline, ResizeImageMaskNode, SaveImage, UNETLoader, VAEDecode, VAELoader. Output: image (image_minimax_h3_image_character_swap.png).
入力するもの
- ワークフローを読み込み中
ComfyUI で実行できます。 このワークフローはこのページでは実行できません。ダウンロードしてComfyUIで開いてください。
ワークフローをダウンロードワークフローの内部
ノードグラフの読み取り専用プレビューです。ノードを編集するには、Comfy Cloudで開くかダウンロードしてください。
Loading the graph
Open full-size workflow previewこのワークフロー内のファイル
- 出力
- 画像
- 作成者
- 著者は利用できません
カスタムノードが必要です
- ワークフローを読み込み中
コードからこのワークフローを使用する
可能な場合はワークフローグラフと入力から生成されます。それ以外の場合は保存された例が表示されます。料金が発生する場合があるため、コードを実行する前に認証情報とエンドポイントを確認してください。
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": "image_minimax_h3_image_character_swap",
"images": [
"42",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"29": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "minimax_h3_image_pruned_int8_convrot.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"30": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen3vl_32b_minimax_h3_int8_convrot.safetensors",
"device": "default",
"type": "minimax"
},
"_meta": {
"title": "Load CLIP"
}
},
"31": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "minimax_h3_image_vae_fp16.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"33": {
"class_type": "ConditioningZeroOut",
"inputs": {
"conditioning": [
"65",
0
]
},
"_meta": {
"title": "Conditioning Zero Out"
}
},
"38": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"65",
1
],
"model": [
"63",
0
],
"negative": [
"33",
0
],
"positive": [
"65",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 142232601287349,
"steps": 6
},
"_meta": {
"title": "KSampler"
}
},
"42": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"38",
0
],
"vae": [
"31",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"43": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "Swap the human in <Picture 1> with human <Picture 2>, also update the human in the mirror"
},
"_meta": {
"title": "Text (user_prompt)"
}
},
"45": {
"class_type": "LoadImage",
"inputs": {
"image": "h3_char_swap_source.png"
},
"_meta": {
"title": "Load Image (Source Image)"
}
},
"48": {
"class_type": "ResizeImageMaskNode",
"inputs": {
"input": [
"56",
0
],
"resize_type": "scale to multiple",
"resize_type.multiple": 32,
"scale_method": "area"
},
"_meta": {
"title": "Resize Image/Mask"
}
},
"50": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"48",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"56": {
"class_type": "ResizeImageMaskNode",
"inputs": {
"input": [
"45",
0
],
"resize_type": "scale total pixels",
"resize_type.megapixels": 1,
"scale_method": "area"
},
"_meta": {
"title": "Resize Image/Mask"
}
},
"62": {
"class_type": "ImageCompare",
"inputs": {
"compare_view": None,
"image_a": [
"48",
0
],
"image_b": [
"9",
0
]
},
"_meta": {
"title": "Compare Images"
}
},
"63": {
"class_type": "LoadLoraModel",
"inputs": {
"loras.0.enabled": True,
"loras.0.lora_name": "h3_image_character_swap_v1.safetensors",
"loras.0.strength": 1,
"model": [
"29",
0
]
},
"_meta": {
"title": "Load LoRA (Model)"
}
},
"64": {
"class_type": "LoadImage",
"inputs": {
"image": "h3_char_swap_reference.png"
},
"_meta": {
"title": "Load Image (Reference Character)"
}
},
"65": {
"class_type": "MiniMaxH3ImageConditioning",
"inputs": {
"clip": [
"30",
0
],
"height": [
"50",
1
],
"images.image_0": [
"48",
0
],
"images.image_1": [
"64",
0
],
"prompt": [
"43",
0
],
"vae": [
"31",
0
],
"width": [
"50",
0
]
},
"_meta": {
"title": "MiniMax H3 Image Conditioning"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)関連するワークフロー
- MiniMax H3 Image
MiniMax-H3-Image:テキストから画像生成
- MiniMax H3 Image
MiniMax-H3-Image:テキストから画像(API)
- MiniMax H3 Image
MiniMax-H3-Image:画像を編集
- MiniMax H3 Image
MiniMax-H3-Image:画像編集(API)
- Nano Banana Pro, Gemini3 Pro Image Preview, Google
キャラクターターンアラウンドを作成
- Qwen-Image-Edit
素材を変更
- Qwen-Image-Edit
被写体を新しいアングルから見る
- Flux.2 Dev, Flux
製品モックアップを作成
- Nano Banana Pro
キャラクターに衣装を試着
- Seedream
商品を新しいシーンに配置
- SSeedVR2
アップスケールとディテール復元
- Nano Banana Pro
商品写真をシャープに