MOSS-Image NF4 for LoRA Training

Not an official OpenMOSS release. This repository holds NF4 conversions of MOSS-Image Base and MOSS-Image SFT by the OpenMOSS Team, made so that the MOSS-Image trainer of AcademiaSD LoRAlab Trainer Studio can download them and train LoRAs on consumer GPUs. The transformers are stored in the trainer's own pre-quantized cache format, which diffusers and ComfyUI do not load directly: for inference, use OpenMOSS's original weights.

You do not need to download this repository by hand: the trainer downloads only the parts it uses on first use.

Contents

Folder Content Size
transformer/ MOSS-Image Base transformer (5B): the 252 attention and MLP layers of the 42 blocks in NF4 (bitsandbytes, pre-quantized); text refiner, embedders, modulations, norms and output layer in BF16 3.1 GB
transformer_sft/ MOSS-Image SFT transformer, same format 3.1 GB
text_encoder_BF16/ Qwen3.5-9B text encoder, unchanged (BF16). Base and SFT use the same one 16.8 GB
text_encoder_INT8/ The same text encoder in INT8 (bitsandbytes LLM.int8); the vision tower, unused for text, stays in BF16 9.9 GB
text_encoder_NF4/ The same text encoder in NF4 (bitsandbytes); the vision tower stays in BF16 6.5 GB
tokenizer/, vae/, scheduler/ Unchanged (the VAE is the FLUX.2 autoencoder MOSS-Image ships with) 0.3 GB
LICENSE, NOTICE.md Apache License 2.0 and the list of changes

The trainer downloads one transformer and one text encoder: 20.2 GB with the BF16 text encoder, 13.2 GB with INT8 or 9.9 GB with NF4 (the original model is 27.2 GB).

Format

  • transformer/ and transformer_sft/ are not standard diffusers checkpoints. Each is a pre-quantized cache: one .safetensors file per layer in weights/ (NF4 weight plus its packed bitsandbytes QuantState), others.safetensors with the tensors kept in BF16, and index.json. The trainer builds an empty transformer from config.json and fills it from this cache. The parameter names are OpenMOSS's originals.
  • text_encoder_INT8/ and text_encoder_NF4/ are regular transformers checkpoints saved with their quantization_config; text_encoder_BF16/, tokenizer/ and vae/ are the original files.
  • The converter is tools/mossimage/5_conversor_MossImage_NF4.py in the Trainer Studio repository.

Measured difference of the text embeddings against BF16 (last layer, relative error): INT8 ~7-14 %, NF4 ~20-30 %. The trainer uses BF16 by default, spread between GPU and RAM on small GPUs, so the LoRA is trained on exactly the embeddings ComfyUI computes.

LoRAs trained with it

The trainer exports LoRAs with the original layer names (diffusion_model.layers.N.proj.{q,k,v,o,ffn_up_gate,ffn_down}.lora_A / lora_B plus alpha), which ComfyUI (nightly, with native MOSS-Image support) loads with the standard LoRA loader.

Measured on an RTX 5080: 512², rank 8, ~1.0 s per step, under 6 GB of VRAM.

The fast previews of the trainer use darask0's 4-step adapter (Apache 2.0, built on lodestones' 8-step adapter), downloaded from its own repository; it is not part of this one.

License and attribution

MOSS-Image Base and SFT, including these modified versions, are released by the OpenMOSS Team under the Apache License 2.0. The Qwen3.5-9B text encoder is by the Qwen team, also under the Apache License 2.0. NOTICE.md lists what was changed.

This repository is provided "as is", without warranties of any kind.

Links

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for AcademiaSD/MOSS-Image-NF4-for-LoRA-Training

Quantized
(2)
this model