How to Connect Local Image Models to MindStudio AI Agents

What You'll Need
- Node.js 18 or newer — Download from nodejs.org
- Python 3.10
- Git
- SD WebUI Forge — for running Stable Diffusion locally
Step 1: Install Node.js
- Visit nodejs.org.
- Download the installer for your operating system.
- Run the installer and follow the prompts.
Step 2: Set Up Stable Diffusion (Forge)
First-Time Setup
Install command-line developer tools on macOS if prompted. This does not apply to other operating systems.
Subsequent Runs
Note: Python 3.10 is required.
Step 3: Download an Image Generation Model
- Go to https://civitai.com/models.
- Filter by base model "SDXL 1.0" and model type "Checkpoint".
- Download the model into this folder:
stable-diffusion-webui-forge/models/Stable-diffusion.
You need a Civitai account to download models. Image generation models are 6GB+. Try this model for testing.
Step 4: Install the MindStudio Tunnel
Open a new Terminal window (keep Stable Diffusion running in the first one) and install the tunnel tool:
Step 5: Connect to Your MindStudio Account
Run this command to authenticate:
This will open your browser and create an API key in your MindStudio account (found under Developer > API Keys).
Step 6: Register Your Models
- Ensure that Stable Diffusion Forge is running.
- Tell MindStudio about your local models:
This scans your local setup and makes your image models available in MindStudio.
Step 7: Start the Tunnel
Launch the connection between your computer and MindStudio:
Keep this Terminal window open while you're using your local models. The tunnel will stay active until you close it or lose internet connection.
Step 8: Verify Everything Works
- Log into MindStudio.
- Navigate to Service Router > Self-Hosted Models.
- Your local image models should appear in the list.
Step 9: Use Your Local Image Model in an AI Agent
- Create a new AI agent in MindStudio.
- Add a "Generate Image" block.
- Click "Model Settings" in that block.
- Look under the Local Models category.
- Select your local image model.
- Build and test your agent as usual.
As long as the tunnel is running, your agent will use your local image model instead of cloud-based models.
Useful Commands
mindstudio-local auth— Log in to MindStudiomindstudio-local register— Refresh your model listmindstudio-local start— Start the tunnelmindstudio-local models— See available modelsmindstudio-local status— Check connection statusmindstudio-local logout— Sign out
Advanced: Custom Server URL
If Stable Diffusion Forge runs on a different port:
mindstudio-local set-config --sd-url http://127.0.0.1:7860
That's it! You're now running local image generation models while building agents in MindStudio's visual interface. This setup avoids cloud model costs and keeps your data on your own machine.

