ComfyLAB Logo
ComfyLAB IFGW • UNICAMP
Free & Open-Source Laboratory Platform
IFGW • UNICAMP

Visual Laboratory Automation for Experimental Science

Connect physical laboratory instruments, orchestrate automated characterization loops, and stream live measurements with visual node dataflows. Zero recurring license fees, zero boilerplate code.

GPL-3.0 License
Universal VISA / SCPI Hardware
Multi-Language UI (EN / PT / ES)
Automated Hardware Safety Shutdown
Backend: Online (Port 8000)
ComfyLAB Visual Workspace showing instrument nodes, real-time plots, and dataflow connections
Rooted in Lab Experience

Built for the Realities of Experimental Laboratories

Informed by a comprehensive survey with over 190 experimental researchers and students across departments at UNICAMP, ComfyLAB was designed from the ground up to solve the most frequent operational hurdles of benchtop automation.

Zero Programming Hurdle

Researchers overwhelmingly expressed the need for a straightforward visual environment. Connect instruments, signal sweeps, and processors without having to debug line-by-line syntax.

Drag, connect, and automate.

Hours Saved Every Setup

Instead of spending days configuring and troubleshooting individual ad-hoc measurement scripts, standard routine flows can be assembled and verified in 15 minutes.

Fast iterative prototyping.

Long-Term Continuity

One of the greatest lab frustrations is inherited undocumented code. ComfyLAB blueprints are visual diagrams that any student or technician can understand instantly.

Self-documenting workflows.

Zero License Friction

Proprietary seat licenses create bottlenecks and prevent deploying automation to every workstation. ComfyLAB is free software you can install on any number of PCs.

100% Free & Open-Source.
Platform Features

Engineered for Reliability, Safety, and Speed

Everything you need to automate physical research benches, acquire sensor data, and run multi-instrument characterization loops.

Visual Node Dataflow

Assemble complex acquisition loops by wiring functional blocks together. No obscure syntax, no missing semicolons, and no hidden state.

Universal VISA & SCPI Control

Direct hardware communication via PyVISA. Supports USB, GPIB, Ethernet, and RS-232 instruments from Keysight, Keithley, Rigol, Thorlabs, and more.

Fail-Safe Hardware Protection

If an automation stops, crashes, or encounters an unexpected error, ComfyLAB immediately executes safety routines to shut down pump lasers, bias voltages, and high power supplies.

Multi-Language & Native Bridges

Execute in 13+ languages directly in-canvas or interface with vendor C/C++ DLLs, Linux shared objects (.so), and Windows ActiveX/COM objects seamlessly.

Real-Time Multi-Trace Graphs

High-frequency canvas charting with persistent axis settings, live spectrum traces, multi-channel overlays, and instant CSV / HDF5 export.

Secure Remote Lab Access

Monitor multi-hour measurements remotely from your office or home. Protected by two-word zero-setup security tokens without compromising lab LAN safety.

How It Works in 3 Steps

From raw hardware to synchronized acquisition in minutes.

1

Detect Your Instruments

Plug your instrument into USB, GPIB, or Ethernet. ComfyLAB automatically lists VISA resources and ready-to-use device drivers.

2

Connect Your Dataflow

Drag generator and reader blocks onto the canvas. Wire frequency sweeps, power increments, and analysis blocks with intuitive color-coded pins.

3

Stream & Protect

Hit Start. Watch real-time multi-trace plots update live. Data automatically logs to disk, while hardware safety guards monitor limits in the background.

Example 1: Signal Generator & Oscilloscope Sweeps
ComfyLAB Example 1 Flow
Example 2: Multi-Trace Real-Time Spectrum Analysis
ComfyLAB Example 2 Flow
Infinite Customization

Extensible by Design: Adapt to Any Experiment

ComfyLAB is not a closed black box. Inject scripts across 13+ languages, bridge native C/C++ DLLs and ActiveX/COM instruments, group sub-circuits into reusable clusters, or author native hardware drivers from scratch.

13+ Language Script Blocks

Embed code directly on the canvas without leaving ComfyLAB. Automatic input and output pins using intuitive decorators.

Python C# / .NET Rust Julia R JS / TS Lua Octave Maxima Sage Wolfram PowerShell
Built-in Monaco editor with live execution.

DLL, .SO & ActiveX/COM

Directly call vendor-provided C/C++ compiled dynamic libraries (.dll on Windows, .so on Linux) with thread safety, or drive 32/64-bit Windows ActiveX & COM controllers.

  • C/C++ .dll & .so function calling
  • ActiveX / COM ProgID Automation
  • Supports Thorlabs, Horiba & Newport
Bridge legacy instruments without rewriting code.

Modular Clusters (Macro-Nodes)

Select a sub-network of connected blocks and collapse them into a single reusable Cluster with a single keypress. Expose only the pins you need.

  • Single-click cluster creation (Ctrl+G)
  • Custom input & output pin mapping
  • Shareable across blueprints and labs
Encapsulate complexity and foster team reuse.

Native Nodes from Scratch

Build first-class permanent blocks or drivers for custom rigs and sensors using Python's BaseBlock architecture and register into the palette.

  • Automated VISA resource detection
  • Thread-safe hardware locking
  • One-click zip package import
Permanent palette integration and distribution.
In-Canvas Script Syntax
# 1. Define your block pins with declarative decorators right inside your script:
# @input name="trace" type="ndarray"
# @input name="cutoff_db" type="number" default=-40.0
# @output name="filtered_data" type="ndarray"
# @output name="peak_val" type="number"

import numpy as np

# 2. Variables match input pin names automatically. Simply compute and assign outputs:
filtered_data = trace[trace > cutoff_db]
peak_val = float(np.max(filtered_data)) if len(filtered_data) > 0 else 0.0
Flexible Deployment

Install ComfyLAB in Seconds

Choose the installation method that fits your lab PC setup.

Recommended

PyPI (Python pip)

Windows, Linux, macOS

The quickest and cleanest way. Installs directly via official Python package repository.

# 1. Install
pip install comfylab
# 2. Run anywhere
comfylab
Requires Python 3.10 or higher. Automatically opens browser at localhost:8000.

Pre-compiled Executable

Zero Dependencies Needed

For lab computers without Python or where user account restrictions prevent installing new software packages.

Portable single executable. Double-click and start measuring.

From Git Source

For Developers & Drivers

Clone the GitHub repository to write new instrument nodes, contribute features, or modify UI components.

git clone https://github.com/gateeit-ifgw/ComfyLAB.git
cd ComfyLAB
bash start.sh # or start.bat
Auto-installs venv, builds frontend, and runs hot-reload dev servers.
Documentation & Guides

Comprehensive User Guide

Download the complete quickstart manual with step-by-step starter tutorials and interface diagrams.

Quick Start Guide

English • Comprehensive Overview (PDF)

Updated with figures & diagrams A4 PDF
Download Guide (PDF)
Open Science & Collaboration

Have an instrument you want supported?

ComfyLAB is built by experimentalists for experimentalists. If your laboratory at UNICAMP or beyond has custom hardware or protocols you want integrated, let's collaborate!