moss4gb / BACKUP.md
AEUPH's picture
moss4gb v0.2.0: NF4 4-bit MOSS-Image-SFT packaging (code, bank, tests, docs, skill)
1533f24 verified
|
Raw History Blame Contribute Delete
2.73 kB

MOSS-Image 4GB — v0.2.0 snapshot

Cut from Z:\MOSSIMAGE on 2026-10-30. moss4gb.__version__ == "0.2.0".

What is in here

Everything except the model weights:

moss4gb/            inference package (NF4 DiT loader, CPU VAE decode, bank)
tests/              pytest suite (26 + cache/CLI tests)
comfyui/            ComfyUI node pack + workflow JSON
assets/bank/        real prompt bank, built on a Colab T4 (not the null bank)
docs/               runbooks, including BUILD_BANK_GPU.md
colab/              notebook + build script used for the bank
out/                renders, incl. real_256.png (the first correctly
                    conditioned image) and real_256a.png (byte-identical rerun)
NOTES.md            state of knowledge, dead ends, next steps

What is NOT in here, and why

models/MOSS-Image-SFT (9.5 GB DiT + 239 MB VAE + 20 MB tokenizer) is not copied. Z: is exFAT, so it supports neither junctions nor symlinks, and the volume holds 14 GB free against 13 GB of weights — a second copy would fit only by filling the disk past the point where the 2.9 GB DiT cache could be written.

The weights are therefore shared with Z:\MOSSIMAGE\models\MOSS-Image-SFT. moss4gb/paths.py resolves this at import: it prefers models/ beside this snapshot when that really contains transformer/, and otherwise uses the sibling snapshot that does. Nothing is hard-coded, so this keeps working if the folder is renamed or moved.

To make this snapshot fully standalone, download the weights into it:

hf download OpenMOSS-Team/MOSS-Image-SFT --local-dir models/MOSS-Image-SFT

Running it

python -m moss4gb doctor
python -m moss4gb generate --bank-id p_157d4f7a84a3 --height 256 --width 256 --steps 20 --cfg 3 --seed 42 --out out/v020.png
python -m pytest tests -q

The CLI defaults now resolve through paths.py, so no --model-dir is needed.

State at this snapshot

  • 256x256 at 20 steps / cfg 3 works end to end: load ~10.4 min (streaming), 5.30 s/step, peak 2.90 GB VRAM, CPU decode 7.9 s.
  • The prompt blonde female with pink dreadlocks (p_157d4f7a84a3) renders a recognisable portrait. The earlier "garbage" output was the all-zeros null bank, not the 4-bit path.
  • quant.build_transformer has an on-disk cache (<model-dir>/.moss4gb-cache/, or --cache), meant to replace the 10-minute streaming load with a ~1 minute read. Written and unit-tested, NOT yet verified end to end — no cache file has been produced on this box yet, so the Load node still streams.
  • comfyui/workflows/moss_image_4gb.json still hard-codes Z:/MOSSIMAGE/... paths and selects the __null__ bank entry. Both need changing for a real render from ComfyUI.