Files
MOSS-Image/comfyui
2026-10-16 03:00:54 +00:00
..
2026-10-16 03:00:54 +00:00
2026-10-16 03:00:54 +00:00
2026-10-16 03:00:54 +00:00
2026-10-16 03:00:54 +00:00
2026-10-16 03:00:54 +00:00
2026-10-16 03:00:54 +00:00

MOSS-Image for ComfyUI

English | 简体中文

MOSS-Image supports loading directly from a local Hugging Face / Diffusers model directory. Its standard ComfyUI nodes output MODEL, CLIP and VAE, using native sampling, SLG and memory management.

Installation

Copy comfyui/moss-image/ to ComfyUI/custom_nodes/moss-image/ and restart ComfyUI. The native plugin uses ComfyUI's dependencies and can be installed independently of this repository.

Alternatively, create links from the repository root:

python comfyui/install.py --comfy-root /path/to/ComfyUI

For a separate local ComfyUI installation, use the local launch scripts below.

Existing user workflows are not overwritten. Environments, weights, generated images and user settings stay local and are excluded from version control.

Workflow

  1. Download moss-image.json and drag it into ComfyUI.
  2. Download MOSS-Image-Base. In MOSS-Image HF Loader, set model_path to the downloaded local directory containing transformer/, text_encoder/, tokenizer/, and vae/.
  3. Edit the positive and negative prompts, then click Run to generate an image.

The workflow is ready to run with 50 steps, CFG 3, Shift 5, and negative-branch skipping at layer 22, using Euler / sgm_uniform at 1024×1024. See the user guide for prompt and sampling recommendations.

Local launch

bash comfyui/local/setup.sh
bash comfyui/local/run.sh

The setup script clones ComfyUI into the Git-ignored local/ComfyUI/ directory if it is missing, creates a separate environment, and installs its dependencies. It installs the nodes and the MOSS-Image workflow without overwriting an existing file of the same name. Set MOSS_PYTHON to choose the interpreter and UV_INDEX_URL to choose the package index.

COMFYUI_ROOT selects an existing ComfyUI checkout. COMFY_HOST and COMFY_PORT set the listening address; CUDA_VISIBLE_DEVICES selects the GPU. Launch defaults enable FP32 VAE and Latent2RGB previews and disable image metadata. The runtime's local/env.sh can configure launch options.

Advanced settings

The API JSON provides the same workflow for programmatic submission.

The loader reads local single-file or sharded safetensors weights; it does not download models from a Hub repository ID. weight_dtype controls DiT precision, text_device selects the text encoder's device, and the VAE uses FP32. Text encoding is capped at 4096 tokens.

Clear Simple SLG's single_layers to disable negative-branch skipping. To use standard SLG instead, replace Simple SLG with SkipLayerGuidanceDiT, choose single_layers, and set scale 3, start 0.01, end 1, and rescaling 0. Keep double_layers empty. The user guide does not specify standard SLG layer indices.

Keep ModelSamplingSD3 before SLG so scheduling and SLG thresholds share the same shift. ComfyUI SLG intervals use sigma-based percentages. Its native scheduler does not use the standalone pipeline's training-grid snapping, so matching seeds and parameters do not guarantee identical images.

Separate component loaders remain available for custom workflows. LoRAs with matching model keys can use the built-in LoRA loader. For SLG or changing block patches, use eager execution: TorchCompileModel filters transformer-option guards.