ComfyUI Blender Wrapper lets you call Blender in headless mode from ComfyUI (or any Python environment), run reusable pipeline stages stored inside .blend files, and pass configs in/out via JSON. It’s meant for tech-art / asset-pipeline tasks like cleanup, decimation, unwrap, baking, rigging, etc.
wrapper.py that:
.blend stage file,.blend,.blend files (e.g., mesh cleanup, simple rig, etc.) you can copy and modify.Blender already has a ridiculous amount of built-in functionality (mesh ops, baking, UVs, geo nodes, rigging, rendering…). Instead of re-implementing pipelines in your engine or custom tools, you can:
Caller → Blender headless → wrapper.py → stage.blend scripts
Write the actual stage logic once (inside a .blend), reuse it anywhere.
Clone this repo in your Comfy Custome Nodes folder.
Make sure Blender is installed and set the path to the exe file in the blender_tools_config.json. Alternatively you can modify my code to get the path from system env variables and set it there.
Restart ComfyUI
You can call the generic wrapper like this:

Blend file is the path to whatever blend file should be used to run the stage, Input model is path to the model the wrapper imports for blender to act on, config file is a path to a json file that holds a dic of balancing paramters. This is only if your pipeline stage blend file needs it, if not you can leave it empty. Whether the stage needs it is up to whoever implements the code in the blend file. FBX path is where the model is exported once blender is done and the output config is a way to allow the person implementing the pipeline stage to talk up to the next node in comfy.
For more in depth explaination of how everything works, read this post: https://medium.com/@shahriyarshahrabi/blender-as-a-pipeline-engine-make-rigged-characters-with-comfyui-3a1e81a3e623
If you are interested in writing your stage, you can look at the mesh clean up blend file and simple rig file I provided as examples in the repo. Here is all you need to know:
blend_file = globals().get("blend_file", None)
The config itself is already loaded into a Blender friendly dic. To accesss what is inside you can easily do:
if config and isinstance(config, dict):
if "decimate_ratio" in config:
try:
DECIMATE_RATIO = float(config["decimate_ratio"])
log(f"Decimate ratio overridden by config: {DECIMATE_RATIO}")
except Exception as e:
log(f"Warning: invalid decimate_ratio in config ({config['decimate_ratio']}): {e}")
You can also get a reference to output json and populate it like this:
OUTPUT_JSON = os.getenv("OUTPUT_JSON")
For how your json should look like have a look at the example.
The example provided is for generating 3D rigged characters. You can read the blog post for more info. I did modify Kijais wrapper to play nicely with very annoying windows issues. The changes are in the files ComfyUI-Hunyuan3DWrapper\nodes.py and ComfyUI-Hunyuan3DWrapper\hy3dgen\shapegen\postprocessors.py. You will find both files included here, you can copy them over if you are hitting issues with permission for read and write. License wise all rights go to Kijai.
15 commits
Python
100.0%
ComfyUI Blender Wrapper lets you call Blender in headless mode from ComfyUI (or any Python environment), run reusable pipeline stages stored inside .blend files, and pass configs in/out via JSON. It’s meant for tech-art / asset-pipeline tasks like cleanup, decimation, unwrap, baking, rigging, etc.
wrapper.py that:
.blend stage file,.blend,.blend files (e.g., mesh cleanup, simple rig, etc.) you can copy and modify.Blender already has a ridiculous amount of built-in functionality (mesh ops, baking, UVs, geo nodes, rigging, rendering…). Instead of re-implementing pipelines in your engine or custom tools, you can:
Caller → Blender headless → wrapper.py → stage.blend scripts
Write the actual stage logic once (inside a .blend), reuse it anywhere.
Clone this repo in your Comfy Custome Nodes folder.
Make sure Blender is installed and set the path to the exe file in the blender_tools_config.json. Alternatively you can modify my code to get the path from system env variables and set it there.
Restart ComfyUI
You can call the generic wrapper like this:

Blend file is the path to whatever blend file should be used to run the stage, Input model is path to the model the wrapper imports for blender to act on, config file is a path to a json file that holds a dic of balancing paramters. This is only if your pipeline stage blend file needs it, if not you can leave it empty. Whether the stage needs it is up to whoever implements the code in the blend file. FBX path is where the model is exported once blender is done and the output config is a way to allow the person implementing the pipeline stage to talk up to the next node in comfy.
For more in depth explaination of how everything works, read this post: https://medium.com/@shahriyarshahrabi/blender-as-a-pipeline-engine-make-rigged-characters-with-comfyui-3a1e81a3e623
If you are interested in writing your stage, you can look at the mesh clean up blend file and simple rig file I provided as examples in the repo. Here is all you need to know:
blend_file = globals().get("blend_file", None)
The config itself is already loaded into a Blender friendly dic. To accesss what is inside you can easily do:
if config and isinstance(config, dict):
if "decimate_ratio" in config:
try:
DECIMATE_RATIO = float(config["decimate_ratio"])
log(f"Decimate ratio overridden by config: {DECIMATE_RATIO}")
except Exception as e:
log(f"Warning: invalid decimate_ratio in config ({config['decimate_ratio']}): {e}")
You can also get a reference to output json and populate it like this:
OUTPUT_JSON = os.getenv("OUTPUT_JSON")
For how your json should look like have a look at the example.
The example provided is for generating 3D rigged characters. You can read the blog post for more info. I did modify Kijais wrapper to play nicely with very annoying windows issues. The changes are in the files ComfyUI-Hunyuan3DWrapper\nodes.py and ComfyUI-Hunyuan3DWrapper\hy3dgen\shapegen\postprocessors.py. You will find both files included here, you can copy them over if you are hitting issues with permission for read and write. License wise all rights go to Kijai.
15 commits
Python
100.0%