Idol:图像转高斯泼溅
使用 Idol(Comfy-Org 对 TripoSplat 的微调)将单张图像转换为 3D 高斯泼溅:BiRefNet 移除背景,DINOv3 和 Flux2 VAE 编码视图,一次处理即可解码出 262k 点的泼溅。导出 .spz 泼溅、轨道预览和实验性 .glb 网格。最适合风格化角色和道具。
简介
Turn a single image into a 3D Gaussian splat with Idol, Comfy-Org's fine-tune of TripoSplat: BiRefNet removes the backdrop, DINOv3 and the Flux2 VAE encode the view, and one pass decodes a 262k-point splat. Exports a .spz splat, an orbit preview and an experimental .glb mesh. Best on stylized characters and props.
Graph: LoadImage -> RemoveBackground (BiRefNet) -> TripoSplatPreprocessImage -> TripoSplatConditioning (dino_v3_vit_h_bf16, flux2-vae) -> KSampler (20 steps, cfg 3, dpmpp_2m) -> VAEDecodeTripoSplat (262144 gaussians, idol_decoder_fp16) -> three terminals: SplatToFile3D spz -> SaveGLB, SplatToMesh -> SaveGLB (experimental mesh, resolution 384), RenderSplat (1024x1024, 75 frames, orbit camera) -> CreateVideo 25 fps -> SaveVideo. One input: the image.
This record has no runnable form: one image in, but three separate terminal outputs (spz splat, glb mesh, orbit preview video), and `comfy workflow validate --where cloud` answers unknown_enum_value for idol_fp16.safetensors, idol_decoder_fp16.safetensors and dino_v3_vit_h_bf16.safetensors — the fine-tune's weights sit outside the CLI's enumerated catalog and no run has proved them (this batch may not spend).
No render of this graph ships in the template repo, so the card uses the template's own card art.
你需要提供
- 正在读取工作流
在 ComfyUI 中运行。 此工作流无法在本页面运行。请下载后在 ComfyUI 中打开。
下载工作流查看工作流内部
节点图的只读预览。在 Comfy Cloud 中打开或下载后即可编辑节点。
Loading the graph
Open full-size workflow preview此工作流中的文件
- 输出
- 3D
- 作者
- 作者信息暂不可用
需要自定义节点
- 正在读取工作流
通过代码使用此工作流
尽可能根据工作流图和输入自动生成代码,否则显示已保存的示例。运行代码可能产生费用,请先核对凭据和端点。
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({
"41": {
"class_type": "CreateVideo",
"inputs": {
"bit_depth": "auto",
"chroma_subsampling": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 25,
"images": [
"75",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"42": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "video/3d_idol_image_to_gaussian_splat",
"format": "auto",
"format.codec": "auto",
"video": [
"41",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"51": {
"class_type": "SaveGLB",
"inputs": {
"filename_prefix": "3d/3d_idol_image_to_gaussian_splat",
"mesh": [
"92",
0
]
},
"_meta": {
"title": "Save 3D Model"
}
},
"67": {
"class_type": "SaveGLB",
"inputs": {
"filename_prefix": "3d/3d_idol_image_to_gaussian_splat",
"mesh": [
"76",
0
]
},
"_meta": {
"title": "Save 3D Model"
}
},
"75": {
"class_type": "RenderSplat",
"inputs": {
"background": "#848484",
"camera_info": [
"79",
0
],
"frames": 75,
"headlight_shading": 0,
"height": 1024,
"opacity_threshold": 0,
"render_style": "color",
"sharpen": 2,
"splat": [
"88:55",
0
],
"splat_scale": 1,
"width": 1024
},
"_meta": {
"title": "Render Splat"
}
},
"76": {
"class_type": "SplatToMesh",
"inputs": {
"color_sharpen": 2,
"fill": 20,
"kernel": 5,
"level": 0.6,
"min_component": 500,
"min_opacity": 0.02,
"resolution": 384,
"smooth": 0,
"solid": True,
"splat": [
"88:55",
0
]
},
"_meta": {
"title": "Extract Mesh from Splat"
}
},
"79": {
"class_type": "CreateCameraInfo",
"inputs": {
"camera_type": "perspective",
"fov": 35,
"mode": "orbit",
"mode.distance": 4.005073040832698,
"mode.pitch": 0,
"mode.yaw": 0,
"roll": 0,
"target_x": 0,
"target_y": 0,
"target_z": 0,
"zoom": 1
},
"_meta": {
"title": "Create Camera Info"
}
},
"92": {
"class_type": "SplatToFile3D",
"inputs": {
"format": "spz",
"splat": [
"88:55",
0
]
},
"_meta": {
"title": "Create 3D File (from Splat)"
}
},
"99": {
"class_type": "LoadImage",
"inputs": {
"image": "polar_bear_bass_player.png"
},
"_meta": {
"title": "Load Image"
}
},
"88:11": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "idol_decoder_fp16.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"88:16": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "idol_fp16.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"88:2": {
"class_type": "TripoSplatPreprocessImage",
"inputs": {
"erode_radius": 1,
"image": [
"99",
0
],
"mask": [
"88:35",
0
],
"size": 1024
},
"_meta": {
"title": "TripoSplat Preprocess Image"
}
},
"88:24": {
"class_type": "TripoSplatConditioning",
"inputs": {
"clip_vision": [
"88:7",
0
],
"image": [
"88:2",
0
],
"vae": [
"88:8",
0
]
},
"_meta": {
"title": "TripoSplat Conditioning"
}
},
"88:35": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"88:95",
0
],
"on_true": [
"88:85:81",
0
],
"switch": True
},
"_meta": {
"title": "Switch: Mask Source"
}
},
"88:55": {
"class_type": "VAEDecodeTripoSplat",
"inputs": {
"num_gaussians": 262144,
"samples": [
"88:6",
0
],
"seed": 790219963981395,
"vae": [
"88:11",
0
]
},
"_meta": {
"title": "TripoSplat Decode"
}
},
"88:6": {
"class_type": "KSampler",
"inputs": {
"cfg": 3,
"denoise": 1,
"latent_image": [
"88:24",
2
],
"model": [
"88:96",
0
],
"negative": [
"88:24",
1
],
"positive": [
"88:24",
0
],
"sampler_name": "dpmpp_2m",
"scheduler": "simple",
"seed": 46,
"steps": 20
},
"_meta": {
"title": "KSampler"
}
},
"88:7": {
"class_type": "CLIPVisionLoader",
"inputs": {
"clip_name": "dino_v3_vit_h_bf16.safetensors"
},
"_meta": {
"title": "Load CLIP Vision"
}
},
"88:8": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "flux2-vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"88:85:81": {
"class_type": "RemoveBackground",
"inputs": {
"bg_removal_model": [
"88:85:82",
0
],
"image": [
"99",
0
]
},
"_meta": {
"title": "Remove Background"
}
},
"88:85:82": {
"class_type": "LoadBackgroundRemovalModel",
"inputs": {
"bg_removal_name": "birefnet.safetensors"
},
"_meta": {
"title": "Load Background Removal Model"
}
},
"88:85:83": {
"class_type": "InvertMask",
"inputs": {
"mask": [
"88:85:81",
0
]
},
"_meta": {
"title": "Invert Mask"
}
},
"88:85:84": {
"class_type": "JoinImageWithAlpha",
"inputs": {
"alpha": [
"88:85:83",
0
],
"image": [
"99",
0
]
},
"_meta": {
"title": "Join Image with Alpha"
}
},
"88:95": {
"class_type": "InvertMask",
"inputs": {
"mask": [
"99",
1
]
},
"_meta": {
"title": "Invert Mask"
}
},
"88:96": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"88:16",
0
],
"on_true": [
"88:97",
0
],
"switch": True
},
"_meta": {
"title": "If/Else Switch"
}
},
"88:97": {
"class_type": "TripoSplatSamplingPreview",
"inputs": {
"model": [
"88:16",
0
],
"num_gaussians": 16384,
"octree_level": 5,
"pitch": 15,
"point_size": 2,
"vae": [
"88:11",
0
],
"yaw": 90
},
"_meta": {
"title": "TripoSplat Sampling Preview"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)