Skip to content

Inference Guide

JT edited this page Mar 7, 2025 · 1 revision

Using Inference in Stability Matrix

The Inference tab in Stability Matrix lets you easily generate images or videos with a straightforward interface powered by ComfyUI for optimal performance.


Getting Started

To use the Inference tab, you'll first need to install ComfyUI or ComfyUI-Zluda:

  1. Navigate to the Packages tab.
  2. Click the Add Packages button at the bottom.
image

Accessing the Inference Tab

After installing ComfyUI, open the Inference tab from the sidebar (second from the top):

image

You'll see the Inference interface:

image

Let's explore each component in detail:


Launching ComfyUI

If ComfyUI isn't running yet, click the Launch button to start it:

image

Selecting a Model

Use the Model Selector to choose the model for your image generation:

image

Click the dropdown to see available models, including metadata and preview images:

image

Advanced options (VAE selection, CLIP skip, LoRAs) can be found by clicking the ⚙️ icon:

image

Loading UNet-only Models (e.g., Flux)

For special cases like UNet-only models (without text encoder or VAE):

  1. Enable Model Loader from the ⚙️ menu:
image
  1. Choose the correct model loader based on your file type:
    • GGUF: .gguf
    • nf4: cool_model_nf4.safetensors
    • UNet: All other .safetensors files

Selecting a loader may prompt additional options to appear. For example, Flux.1-Dev using Q4_0 GGUF:

image

Configuring Sampler Settings

Here, you'll set essential generation parameters such as sampler, scheduler, CFG scale, width, and height:

image
  • Click the ➕ button at the bottom to enable addons like ControlNet, FreeU, or CFG Rescale:
image

Additional Sampling Steps

Add extra sampling steps like HiRes Fix or FaceDetailer from the ➕ button next to "Steps":

image

By default, HiresFix and Upscaler are included but disabled. Toggle these on as needed:

image

Managing Seeds and Batch Generation

image

Control seed settings and batch generation:

  • Seed:
    • Random seed (new each time): The button will display a D20 🎲.
    • Custom seed: Lock by clicking 🎲 and enter your desired value.

image image

  • Batch Size: Number of images per generation.
  • Batch Count: Number of batches to execute.

Writing Prompts

image

Input your generation prompts here. Inference supports auto-completion and suggestions:

image

Prompt Syntax

Inference supports structured syntax for prompts with modifiers to refine results.

image

Viewing Results

Generated images appear in the Preview area and automatically save to the Gallery:

image

Managing the Gallery

View all generated images in the Gallery. You can drag an image from the Gallery into any other control on the Inference page to re-load all settings that created that image.

image

Customizing the Interface

Drag components by their title bars to rearrange or resize the layout to suit your workflow:

Screen.Recording.2025-03-06.190549.mp4

You're all set to generate images and videos with ease using Inference!