TensorBoard监控器
Watch your training loss without leaving ComfyUI
- url
- status
Training runs for hours. You are not going to stare at a ComfyUI console the whole time. TensorBoardMonitor is the node that gives you something better: it starts a TensorBoard server pointed at your training output directory, and gives you back the URL to open in your browser. Loss curves, learning-rate schedules, sample images - the standard diffusion-pipe dashboard, without you ever opening a terminal.
It's part of the monitoring layer of this pack, and in the example workflow it sits downstream of OutputDirPassthrough, which feeds it the output_dir that GeneralConfig generates.
How it works
The node runs tensorboard as a background subprocess with --logdir pointed at your training output folder, on the host and port you specify. Diffusion-pipe writes its TensorBoard events and checkpoint logs into that directory as the run progresses, so the moment your Train node starts writing, the dashboard updates live.
There's a small process manager under the hood: it's a singleton per port, so starting twice on the same port won't spawn two servers, and kill_port actually finds and kills whatever monitoring process owns that port. Note the README's phrasing on that button: "kill port will stop all monitoring processes on the current port" - it's a blunt instrument.
The inputs that matter
output_dir- the training output directory. In the example workflow this comes fromGeneralConfigviaOutputDirPassthrough; it's a plain string either way.port- default6006, the classic TensorBoard port. Bump it if 6006 is already taken.host- defaultlocalhost. Set it to0.0.0.0if you're on WSL2 and want to view the dashboard from your Windows browser.action-start(default),status, orkill_port.statusjust reports whether a server is running;kill_portis the reset button.
Two outputs: url (the http://host:port address to open) and status (a string describing what happened). Both are plain strings, handy to eyeball or pipe into a Preview node.
Install
The usual pack install - ComfyUI Manager (search "Diffusion_pipe_in_ComfyUI") or:
cd ComfyUI/custom_nodes
git clone --recurse-submodules https://github.com/TianDongL/Diffusion_pipe_in_ComfyUI.git
cd Diffusion_pipe_in_ComfyUI
git submodule init && git submodule update
pip install -r requirements.txt
tensorboard is in the requirements, so it comes along automatically. Linux/WSL2 only, same as the rest of the pack.
Where people get burned
The WSL2 + Windows browser combo trips most people: the dashboard runs on localhost inside WSL, which your Windows browser can usually reach directly these days - but if you can't connect, set host to 0.0.0.0 and browse to your WSL IP. Second gotcha: output_dir has to be the folder where the current run writes events. If you point it at a stale run's directory, TensorBoard will happily show you old logs and you'll think your LR is working when it isn't. And remember the node only starts a server - it doesn't train anything. Disable the Train node while you're just testing the dashboard.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| output_dir | STRING | 训练输出目录(来自通用训练设置) | |
| port | INT | 60061024–65535 | TensorBoard服务端口 |
| host | STRING | localhost | TensorBoard服务主机地址 |
| actionopt | COMBO | start | 操作类型:启动/查看状态/强制清理端口 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| url | STRING | — |
| status | STRING | — |