Image Generation with ComfyUI
This guide walks through generating your first image with ComfyUI on Open Laboratory, from a fresh container to a finished image.
Prerequisites
- A running Open Laboratory container with an NVIDIA GPU
- Your desktop open at
https://{your-slug}.tunnels.laboratory.computer
If you haven’t started a container yet, see the Quick Start.
Step 1: Install ComfyUI
From the Open Laboratory desktop, open the Apps panel and find ComfyUI. Click Install.
ComfyUI will download its dependencies and set up its environment inside the container. This takes 2–4 minutes on first install.
Once installed, click Launch. ComfyUI opens in a new browser tab at:
https://{your-slug}--comfyui.tunnels.laboratory.computer
Step 2: Download a Model
ComfyUI needs a Stable Diffusion checkpoint to generate images. Switch back to your desktop and open the Models panel.
A good starting point is SDXL Base 1.0 — it produces high-quality results and has broad community support. Click Download.
The model downloads directly into the container at /data/models/checkpoints/. This typically takes 2–5 minutes depending on your host’s internet connection.
Step 3: Load the Default Workflow
Switch back to the ComfyUI tab. If it’s showing an empty canvas, load the default workflow:
- Click the Load button in the right panel (or drag a workflow JSON onto the canvas)
- Choose the built-in default_workflow.json
The default workflow is a simple text-to-image pipeline: CLIP Text Encode → KSampler → VAE Decode → Save Image.
Step 4: Select Your Model
In the workflow, find the Load Checkpoint node. Click the model dropdown and select the checkpoint you downloaded (e.g., sd_xl_base_1.0.safetensors).
Step 5: Write a Prompt
Find the CLIP Text Encode (Prompt) node connected to the positive conditioning input. Click inside it and write your prompt:
a photograph of a mountain lake at sunrise, golden hour, cinematic, 8k
In the negative prompt node, add things you want to avoid:
blurry, low quality, oversaturated, watermark
Step 6: Generate
Click Queue Prompt in the top-right corner. ComfyUI queues the job and starts generating. You’ll see a progress bar on the KSampler node.
On a modern GPU (RTX 4090, A100), SDXL at 1024×1024 takes about 15–30 seconds with 20 steps.
Your finished image appears in the canvas and is saved to /data/apps/comfyui/output/ inside the container.
Tips
Faster generation: Reduce steps to 12–15. Use a Lightning or Turbo SDXL LoRA for near-instant results at slightly lower quality.
Higher quality: Increase steps to 30–40. Use a DPM++ 2M Karras sampler.
Changing resolution: Edit the Empty Latent Image node. SDXL is trained for 1024×1024 but works well at other resolutions too — try 1152×896 for landscape.
Using LoRAs: Add a Load LoRA node between the checkpoint loader and the KSampler. Download LoRAs from the Models panel and stack multiple at once with adjustable weights.
Saving workflows: Click Save in the right panel to export your workflow as JSON. You can reload it later or share it with others.