MOSS-Image Γ— PiD β€” Super-Fast High-Res (ComfyUI)

20 of the 100 examples: MOSS-Image at 704Γ—384, decoded by PiD to 2816Γ—1536

ComfyUI workflows that render high-resolution MOSS-Image pictures fast, in two short stages:

  1. MOSS-Image SFT with akhaliq's 4-step LoRA renders a small image in 4 steps.
  2. NVIDIA's PiD (Pixel Diffusion Decoder) turns that small latent straight into an image 4Γ— its width and height, in 4 more steps. There is no VAE decode and no separate upscaler: PiD draws the full-size image itself, guided by the small latent and the prompt.

The default is 704Γ—384 β†’ 2816Γ—1536; any size works (see Sizes).

Why it is fast: the big MOSS model renders at a quarter of the output's width and height, so it handles 1/16 of the pixels (at the default, 1,056 image tokens instead of 16,896); PiD, a much smaller decoder, does the full-size work.

The plus-refiner workflows add an optional third stage: Qwen-Image-2.1 with its Lightning LoRA (or Krea 2 Turbo with the 3-step LoRA) redraws the fine detail of PiD's output in 2 steps, which brings back skin texture PiD tends to smooth. See Refiner.

Files

File Use
MOSS-PiD-SuperFast-HighRes-ComfyUI-local.json your own ComfyUI
MOSS-PiD-SuperFast-HighRes-ComfyUI-cloud.json Comfy Cloud
MOSS-PiD-SuperFast-HighRes-ComfyUI-plus-refiner-local.json your own ComfyUI, with a refiner after PiD, see Refiner
MOSS-PiD-SuperFast-HighRes-ComfyUI-plus-refiner-cloud.json Comfy Cloud, with a refiner after PiD
moss-pid-generate.py the same two stages in Python (diffusers + NVIDIA's PiD code), see Python
examples/ 100 example images and their prompts, see Examples

Drag a workflow into ComfyUI, set the size in 0 Β· Size (default 704Γ—384), write a prompt in 1 Β· Prompt, press Run. The draft preview shows the MOSS render; the saved image is PiD's 4Γ— output (and, in the plus-refiner workflows, the refined image in Output after refiner). All four workflows use core ComfyUI nodes only.

Local: requirements and models

A ComfyUI recent enough to include MOSS-Image and PiD support (update ComfyUI first). Download these files into your ComfyUI models/ folders:

File Folder Size Source
moss_image_sft_bf16.safetensors diffusion_models/ 10.2 GB Comfy-Org/MOSS-Image
qwen3.5_9b_bf16.safetensors text_encoders/ 19.3 GB Comfy-Org/MOSS-Image
flux2-vae.safetensors vae/ 0.3 GB Comfy-Org/MOSS-Image
moss_image_sft_4step_v2.0.safetensors loras/ 1.2 GB akhaliq/MOSS-Image-SFT-4-steps
pid_1.5_flux2_1024_to_4096_4step_bf16.safetensors diffusion_models/ 2.8 GB Comfy-Org/PixelDiT
gemma_2_2b_it_elm_bf16.safetensors text_encoders/ 5.2 GB Comfy-Org/PixelDiT

Smaller alternatives from the same repositories also load: moss_image_sft_int8_convrot (5.4 GB), qwen3.5_9b_int8_convrot (9.8 GB), gemma_2_2b_it_elm_fp8_scaled (2.6 GB). PiD needs no VAE file: it uses ComfyUI's built-in pixel_space VAE. The FLUX.2 VAE above only decodes the small draft preview.

Comfy Cloud

Comfy Cloud hosts MOSS-Image, its text encoder, the FLUX.2 VAE and PiD's Gemma text encoder. Two files have to be imported into your Comfy Cloud model library, once, from their URLs:

  1. The 4-step LoRA: https://huggingface.co/akhaliq/MOSS-Image-SFT-4-steps/resolve/main/moss_image_sft_4step_v2.0.safetensors
  2. The PiD decoder: https://huggingface.co/Comfy-Org/PixelDiT/resolve/main/diffusion_models/pid_1.5_flux2_1024_to_4096_4step_bf16.safetensors

Then open MOSS-PiD-SuperFast-HighRes-ComfyUI-cloud.json. Comfy Cloud names an import <user>__<repo>__<file>, and the workflow uses those names (akhaliq__MOSS-Image-SFT-4-steps__moss_image_sft_4step_v2.0.safetensors in Load LoRA, Comfy-Org__PixelDiT__pid_1.5_flux2_1024_to_4096_4step_bf16.safetensors in Load PiD); if yours differ, pick them there.

The workflow on Comfy Cloud after a run: the 704Γ—384 MOSS draft, PiD's 4Γ— decode and the 2816Γ—1536 output

Refiner

PiD draws the 4Γ— image fast but tends to smooth skin. The plus-refiner workflows add a third stage: a second model re-encodes PiD's output and redraws only the fine detail, at low denoise, in 2 steps, at the full output size. 5 Β· Output shows and saves PiD's image before the refiner; the refined image is in Output after refiner, the right-hand column of the refiner's own group (saved as MOSS-PiD-refined-Qwen21 or -Krea2). The plus-refiner workflows open on a close-up portrait prompt, where the refiner's effect on skin shows best.

The plus-refiner workflow: MOSS-Image and PiD in the top row, the two refiner groups below, each ending in its Output after refiner panel

Memory. Each model loads when its stage runs. Current ComfyUI's default cache (RAM pressure) drops the models a run has finished with when free RAM runs low, so the refiner stage does not pile onto the earlier ones. Kept all at once, the models add up to about 72 GB with the Qwen-Image-2.1 refiner and about 107 GB with both refiners on. On an older ComfyUI (whose classic cache keeps every model loaded), or if a run still runs out of memory, start ComfyUI with --cache-none: each model is then released when its stage is done, at the cost of reloading everything on the next run.

Group Refiner Denoise Switch
6 (on) Qwen-Image-2.1 + Lightning LoRA 0.3 bypass the Lightning LoRA for the base model, then about 8 steps
7 Krea 2 Turbo + 3-step LoRA 0.12 bypass the LoRA for Krea 2 Turbo's own 8-step schedule, then about 0.2

Group 7 is set to Never: right-click a group β†’ Set Group Nodes to Always to turn it on, and set the other one to Never (or run both to compare). On three portraits, Qwen-Image-2.1 + Lightning added natural pores and fine lines and kept the face; Krea 2 + the 3-step LoRA gave the strongest texture and can age a face. Above about 0.4 denoise a refiner starts changing faces.

Local models (in addition to the table above; the Krea files only for group 7):

File Folder Size Source
qwen_image_2.1_bf16.safetensors diffusion_models/ 14.2 GB Comfy-Org/Qwen-Image-2.1
qwen3vl_8b_bf16.safetensors text_encoders/ 17.5 GB Comfy-Org/Qwen-Image-2.1
qwen_image_2.1_vae_bf16.safetensors vae/ 0.7 GB Comfy-Org/Qwen-Image-2.1
pytorch_lora_weights.safetensors (Lightning) loras/ 0.1 GB lightx2v/Qwen-Image-2.1-Lightning
krea2_turbo_bf16.safetensors diffusion_models/ 26.3 GB Comfy-Org/Krea-2
qwen3vl_4b_bf16.safetensors text_encoders/ 8.9 GB Comfy-Org/Krea-2
qwen_image_vae.safetensors vae/ 0.3 GB Comfy-Org/Krea-2
krea2_turbo_3step_rank_64_lora_comfyui.safetensors loras/ 0.4 GB lvladikov/Krea2-Turbo-Distill-3step-LoRA

lightx2v's Lightning LoRA is named pytorch_lora_weights.safetensors; rename it if you like and pick it in Lightning LoRA.

Comfy Cloud: Qwen-Image-2.1, Krea 2 Turbo, their text encoders and VAEs are in Comfy Cloud's library. Import the two LoRAs once (in addition to the two files above):

  1. https://huggingface.co/lightx2v/Qwen-Image-2.1-Lightning/resolve/main/pytorch_lora_weights.safetensors
  2. https://huggingface.co/lvladikov/Krea2-Turbo-Distill-3step-LoRA/resolve/main/krea2_turbo_3step_rank_64_lora_comfyui.safetensors

The workflow uses their import names (lightx2v__Qwen-Image-21-Lightning__pytorch_lora_weights.safetensors and lvladikov__Krea2-Turbo-Distill-3step-LoRA__krea2_turbo_3step_rank_64_lora_comfyui.safetensors); if yours differ, pick them in the loaders. On an RTX PRO 6000 an image with the Qwen-Image-2.1 refiner took about 1.7 credits (warm), against about 0.83 without it.

Settings

Stage Steps CFG Sampler / scheduler Other
MOSS-Image + 4-step LoRA 4 1 euler / simple shift 5 (MOSS's own default in ComfyUI), no negative prompt
PiD 4 1 lcm / simple latent_format = flux (MOSS uses the FLUX.2 VAE; its 128-channel latent is detected automatically), degrade_sigma = 0
Refiner: Qwen-Image-2.1 + Lightning 2 1 euler / simple denoise 0.3, on PiD's image re-encoded with Qwen-Image-2.1's VAE
Refiner: Krea 2 Turbo + 3-step LoRA 2 1 euler / simple denoise 0.12, on PiD's image re-encoded with Krea 2's VAE

Sizes

Set Width and Height in 0 Β· Size: they are the MOSS render, in multiples of 16. PiD's output is computed from them (4Γ— each side), so nothing else needs changing.

MOSS render PiD output
704Γ—384 (default) 2816Γ—1536
768Γ—432 3072Γ—1728
1024Γ—576 4096Γ—2304
512Γ—512 2048Γ—2048

The decoder, PiD's 2K→4K v1.5, is trained for outputs from 2048 to 4096 px, so keep the MOSS render at 512 px or more on its long side. Smaller renders still decode cleanly, but PiD then invents most of the detail and it comes out soft: a 256×256 render (1024×1024 out) looks smeared next to 704×384 (2816×1536 out). There is no v1.5 decoder for smaller outputs; the older v1 pid_flux2_512_to_2048_4step_bf16 does not decode MOSS's latents (it draws a coloured mesh), so keep the v1.5 decoder at every size.

Prompts

MOSS-Image reads full scene captions: long, specific prompts (subject, setting, light, materials, style) work better than short tags. The same prompt goes to both MOSS and PiD.

Python (diffusers)

moss-pid-generate.py runs the same two stages without ComfyUI, on an NVIDIA (CUDA) GPU (PiD's code targets CUDA; on a Mac, use the workflows). It has no refiner stage; for the refiner, use the plus-refiner workflows.

pip install "torch>=2.9" "diffusers>=0.38" "transformers>=5.3" accelerate safetensors huggingface_hub pillow
git clone https://github.com/nv-tlabs/PiD
pip install hydra-core omegaconf pyyaml attrs einops loguru termcolor fvcore iopath wandb imageio \
    opencv-python-headless pandas sentencepiece boto3 botocore
cd PiD && hf download nvidia/PiD --local-dir . \
    --include "checkpoints/PiD_v1pt5_res2kto4k_sr4x_official_flux2_distill_4step/*" && cd ..

python moss-pid-generate.py --prompt "A wide cinematic photograph of ..." --out image.png
python moss-pid-generate.py --prompt "..." --width 768 --height 432     # -> 3072x1728

MOSS-Image and the LoRA download from their repositories on the first run. --width / --height set the MOSS render (default 704Γ—384, multiples of 16); PiD outputs 4Γ— each side. --offload moves MOSS between the CPU and the GPU for GPUs with less memory.

Examples

examples/ holds 100 images made with the Comfy Cloud workflow at its defaults: 50 portraits and 50 prompts drawn at random from Lakonik/t2i-prompts-3m, each rendered by MOSS-Image at 704Γ—384 (4 steps, seed 4242) and decoded by PiD to 2816Γ—1536 (4 steps). Its README shows all 100 as thumbnails that open the full images; examples/prompts.json lists each image's prompt and seed, and a JSON file beside each image holds its settings.

Licenses

Component License
MOSS-Image (OpenMOSS) and the Comfy-Org repack Apache-2.0
akhaliq/MOSS-Image-SFT-4-steps Apache-2.0
PiD by NVIDIA β€” the Comfy-Org/PixelDiT files used here NVIDIA Source Code License v1 (nsclv1), not Apache-2.0: read its terms before any use beyond them
These workflows and this README Apache-2.0

The models are not included here: each workflow downloads them from their own repositories, under their own licenses.

Credits

OpenMOSS for MOSS-Image, akhaliq for the 4-step LoRA, NVIDIA for PiD, and Comfy-Org for ComfyUI's MOSS-Image and PiD support and the repacked files.

Downloads last month
16
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Space using lvladikov/MOSS-PiD-SuperFast-HighRes 1