Extensions/HaDeS MOSS Suite
ComfyUI Extension

HaDeS MOSS Suite

ComfyUI nodes for the MOSS-Image model family: a one-node loader, block and multi-model mergers (TIES, DARE, Model Stock, SLERP), a model saver (bf16 with stochastic rounding, float32, int8 ConvRot) that stores the recipe, a metadata reader, a multi-LoRA loader with per-layer-group strength and LoRA tools (extractor, merger, resize), color / depth control, a prompt enhancer that writes captions, detailed or random prompts, layouts or edit references with the model's own text encoder, a layout editor that drafts the boxes from a sentence before generating, a KSampler with metadata and a turbo input for our 4- and 8-step LoRAs, an image saver with A1111 metadata for Civitai, a compare sampler and compare sheet for up to four models or LoRAs (blind mode too), a text check that reads the text in an image, and a telemetry node.

By Devildonia·Created 23 days ago·Updated a day ago· 11
Devildonia/HaDeS-MOSS-Suite
Nodes—
On cloudLocal install
Stars11
Updateda day ago
Readme

HaDeS MOSS Suite

ComfyUI nodes for the MOSS-Image model family (OpenMOSS / Comfy Org: 42-layer single-stream DiT, Qwen3.5-9B text encoder, FLUX.2 VAE), in the style of the HaDeS Anima Suite.

Claims about what layer groups do are measured with tools/moss_eval.py, not assumed.

Models and LoRAs made with the suite (Hugging Face, Apache 2.0):

  • HaDeS MOSS v1.0 Turbo: one file, MOSS-Image Base with Turbo 8-steps v1.0 and our QwenLook LoRA (not published separately) baked in, run at 8 steps and CFG 1 with no separate LoRA; BF16 and int8 ConvRot.
  • HaDeS MOSS Turbo: few-step LoRAs trained from zero by DMD on one GPU, with no image dataset (rank 2, layers 24-41, about 3.5 MB each). Turbo 8-steps v2.0 (the newest) and v1.0 are for MOSS-Image Base, and Turbo 8-steps SFT v1.0 is for MOSS-Image SFT. The earlier Turbo, Turbo Diverse (4 steps) and Turbo 8-steps v0.7 are also for SFT. Load them through the turbo input on MOSS KSampler. See the model card, measurements and training script.

By version (details in CHANGELOG.md): 0.2.0 / 0.3.0: the turbo LoRAs and the KSampler's turbo input. 0.4.0: MOSS Loader (model, text encoder and VAE in one node), MOSS Multi-LoRA (any number of LoRAs, searchable picker, strength per layer group), MOSS Prompt Enhancer (writes a caption or a layout with MOSS-Image's own text encoder), MOSS Layout Editor (boxes edited on a canvas), a shared seed on MOSS Latent and stochastic rounding in MOSS Model Saver. 0.4.1: MOSS Image Saver (PNG with A1111 metadata and hashes for Civitai). 0.5.0: MOSS Metadata Reader and model / LoRA recipes. 0.6.0: MOSS Control (color / depth). 0.6.1: edit mode in MOSS Prompt Enhancer for MOSS-Image edit LoRAs. 0.7.0: Dev Tools (MOSS Layout Regions, MOSS Image Audit) and tools/moss_edit_eval.py. 0.7.1: MOSS Image Saver multi-stage metadata (primary_stage_metadata) and native preview widget fix. 0.7.2: Dev Tools additions (MOSS Pair Guard, MOSS Recipe Preview, both removed in 0.7.3) and model-free examples/dev/ organization. 0.7.3: denoise_mode exact in MOSS KSampler, an info output on every node, Dev Tools repository-only. 0.7.4: denoise_mode tooltip with the measured result; Registry description without the removed nodes. 0.7.5: detailed mode and random prompts in MOSS Prompt Enhancer. 0.8.0: MOSS Compare Sheet (up to four images labelled with their LoRA, saved as one sheet); the Layout Editor places layout items the Prompt Enhancer dropped. 0.8.1: MOSS Text Check (reads the text in an image and compares it with the layout or the expected text), a blind mode in MOSS Compare Sheet, MOSS Compare Sampler (up to four models sampled and compared in one node), an on / off switch on MOSS Turbo LoRA, and the fixes of an external audit. 0.9.0: layout from a sentence (the Layout Editor's DRAFT LAYOUT and GENERATE buttons: the Prompt Enhancer drafts the boxes, you adjust them, then generate), in every frontend view; the Layout from a Sentence and Compare Models examples; Model Saver nearest with the weights of a whole-in-VRAM load; the fixes of a second external audit. 0.9.1: Layout Editor fixes (a click picks the smallest box under the pointer; a box without its caption no longer blocks DRAFT LAYOUT), Text Check reads the quoted texts of a caption prompt, half the Compare Sheet RAM with batches, and a CI check of the published package. 0.9.2: hotfix: picking the right file in a Suite widget now clears a missing model's red frame (it stayed until a reload); the Basic Generation example of the first video tutorial. 0.9.3: the MOSS Image Saver names the model the KSampler sampled with (a merge made in the workflow as merge: a + b, without a model hash) and lists a LoRA used in two stages once; the examples of the second, third and fourth video tutorials (Turbo 8 steps + Upscale x2, Prompt Enhancer, LoRA Toolkit) and the new Metadata example of the fifth (each stage's image saved with its own settings through primary_stage_metadata). 0.9.4: the Model Block Merger and Multi-Model Merger name a model loaded with Load Diffusion Model in their recipe, so a saved merge's recipe and the Metadata Reader show both models, and the Compare Sampler and Compare Sheet label such a model by its file instead of "unknown model"; the examples of the sixth, seventh and eighth video tutorials (Merge, Save and Telemetry around a test recipe; Compare Models with four models, a LoRA at four strengths and blind mode; Layout from a Sentence as the fisherman poster on HaDeS MOSS v1.0 Turbo). 0.9.5: HMS v1 precision in MOSS Model Saver (the Suite's own quantization, about 3.96 GB, for MOSS-Image models and merges in the official fused layout, on a CUDA GPU). 0.9.6: in Nodes 2.0 a link dropped on a styled field connects (e.g. MOSS Latent's width / height into the Prompt Enhancer), and a caption draft keeps the Prompt Enhancer's width / height, so the Layout Compiler's latent follows a linked size. 0.9.7: the 16 findings of the 0.9.6 audit fixed (quantization named from the file, a LoRA at 0 not counted as used, a write_metadata switch and blind sheets with the key apart, safe PNG saves, HMS checks before calibrating, irregular layout answers, Telemetry diagnostics); the Img2Img and HMS v1 Converter examples of the tenth and eleventh video tutorials, and the Control example rebuilt for the ninth.

Installation

cd ComfyUI/custom_nodes
git clone https://github.com/Devildonia/HaDeS-MOSS-Suite

No extra dependencies. Needs a ComfyUI with MOSS-Image support (tested on 0.43.0) and the MOSS-Image weights from Comfy-Org/MOSS-Image.

Nodes

MOSS Loader (HaDeS/MOSS Pipeline)

  • Class: HaDeSMossLoader
  • Purpose: the three MOSS-Image files in one node, loaded as the core Load Diffusion Model, Load CLIP and Load VAE do, with the text encoder always as type moss_image. Stops with a clear error when the diffusion model is not MOSS-Image, the text encoder does not load as MOSS-Image's Qwen3.5-9B or the VAE is not the 128-channel FLUX.2 one.
  • Inputs: unet_name, clip_name, vae_name (a new node starts on the MOSS files it finds: an SFT model, Qwen3.5-9B, flux2-vae); advanced weight_dtype and clip_device (as in the core loaders).
  • Outputs: MODEL, CLIP, VAE, info (file names, number of layers, the precision the weights have in memory, e.g. bf16 or int8 with its layout, and the attention the file sets, e.g. comfy-kitchen int8 on Comfy-Org's int8 files, or the server's).
  • Telemetry: with info connected, Suite Telemetry names the model, text encoder and VAE, notes an int8 model with its measured cost on an RTX 5090 (57% slower than bf16 at 1024, 49% at 2048, for about half the VRAM) and a weight_dtype conversion, which was not measured.

MOSS Model Block Merger (HaDeS/MOSS Mergers)

  • Class: HaDeSMossModelBlockMerger
  • Purpose: merges two MOSS-Image models (e.g. SFT and Base) with one ratio per group of 6 layers and for the parts outside the layers. 0.0 = Model 1, 1.0 = Model 2; values outside 0..1 extrapolate.
  • Inputs:
    • model1, model2 (MODEL) with the same q/k/v layout. Quantized models (int8 ConvRot, fp8) are dequantized and merged with a warning in info: the quantization rounding stays in the result, and a quantized model1 makes the result quantized again, so connect the bf16 model as model1. The one int8 finetune measured differs from SFT by about as much as the int8 rounding itself (tools/RESULTS.md).
    • layers_00_05 … layers_36_41 (FLOAT, default 0.5).
    • text_embedder (projection of the Qwen3.5 hidden states and its 2 text blocks), time_modulation (time_embedding + shared_block_modulation), io (video_embedder + output head).
    • recipe_override (STRING, optional): one ratio per layer (42), then text_embedder, time_modulation, io, comma-separated.
  • fp16-fixed files: some fp16 releases store the residual stream scaled down (measured: x 1/16 on video_embedder, the text embedder outputs and the modulation gates), which is the same model in another scale. The merger detects the scale and brings model2 to model1's before merging, and says so in info.
  • Outputs: MODEL, info.
  • Memory: the merge is a lazy patch computed when the model loads; no merged copy is kept in RAM.
  • Recipe: info keeps every layer / part ratio and the source recipes known to the Suite. Multi-Model Merger also records its weights and seed. Sources loaded outside the Suite are unidentified; file names are not guessed.

MOSS Multi-Model Merger (HaDeS/MOSS Mergers)

  • Class: HaDeSMossMultiModelMerger
  • Purpose: merges 2–4 MOSS-Image models with the community's standard methods. Every method except SLERP works on task vectors (model − base_model):
    • TIES: keeps each task vector's largest entries (density), elects a sign per entry from their sum and averages the agreeing ones.
    • DARE / DARE-TIES: drops entries at random with keep probability density and rescales the rest, then averages (DARE) or elects signs like TIES (DARE-TIES). seed fixes the drop mask.
    • Task Arithmetic: weighted average of the task vectors.
    • Model Stock (Jang et al. 2024): the average of the models pulled toward base_model, per tensor, by the angle between their task vectors; it ignores weights, density and scale.
    • SLERP: spherical blend of model_1 and model_2 only, t = weight_2 / (weight_1 + weight_2); needs no base_model.
  • Inputs: model_1, model_2 (MODEL), model_3, model_4, base_model (optional; required by every method except SLERP), weight_1…weight_4 (0..2, normalized by their sum), density (0.05..1, default 0.5), scale (0..2, default 1.0; 1.0 has the strength of an average), seed.
  • base_model: the checkpoint the models were finetuned from. Community MOSS finetunes come from SFT or from Base; when they mix, use Base, which SFT was trained from.
  • Inputs it accepts: like the Block Merger, quantized models are dequantized (with a warning; with TIES / DARE a quantized model's task vector carries its rounding), and fp16-fixed files are brought to the anchor's residual scale (base_model, or model_1 for SLERP).
  • Not measured: which method gives better images.

MOSS LoRA Extractor (HaDeS/MOSS Mergers)

  • Class: HaDeSMossLoraExtractor
  • Purpose: saves model_tuned − model_base as a LoRA in models/loras/: truncated SVD per linear layer (lora_up / lora_down / alpha), full .diff / .diff_b for norms and biases, identical tensors skipped. Keys are diffusion_model.* with fused proj.qkv, which the stock LoRA loaders apply to the Comfy-Org files.
  • Inputs: model_tuned, model_base (MODEL; merge / LoRA patches on either are included), rank (4..256, default 32), export_filename, overwrite_existing, optional tuned_name and base_name (written into the LoRA as hades/model_tuned / hades/model_base, so the Metadata Reader can say what it was extracted from).
  • Inputs it accepts: quantized models are dequantized (with a warning: the difference includes their rounding), and an fp16-fixed model_tuned is brought to model_base's residual scale first.
  • Outputs: saved_lora_path, info (size, energy kept: the share of the difference the rank holds).
  • Measured: galenaCAT − SFT at rank 64 (252 MB) keeps 95.9% of the energy and renders 4–12 from the finetune on SFT; a rank-32 LoRA of an int8 finetune reproduced it within the int8 noise on three of four images. See tools/RESULTS.md.

MOSS LoRA Block Weight (HaDeS/MOSS Mergers)

  • Class: HaDeSMossLoraBlockWeight
  • Purpose: applies one LoRA with a separate strength per group of 6 layers (layers_00_05 … layers_36_41) and other_layers for LoRA weights outside the layers. Loads every community MOSS format through ComfyUI's own key map (kohya, PEFT split or fused q/k/v); at 1.0 everywhere it renders the same image as the stock LoraLoaderModelOnly.
  • Inputs: model, lora_name, strength_model, the seven group multipliers and other_layers (-2..3, default 1.0).
  • Outputs: MODEL, info (how many LoRA weights fall in each group, e.g. 20 instead of 24 in layers_18_23 for LoRAs trained without layer 22).
  • Measured: layers 30–35 carry a large share of all four community LoRAs tested, but beyond that each acts in different layers (24–35, 30–41 or 00–05 and 30–35), so the node has no style / identity presets; tools/moss_eval.py --mode lora measures a given LoRA. See tools/RESULTS.md.

MOSS Multi-LoRA (HaDeS/MOSS Mergers)

  • Class: HaDeSMossMultiLora
  • Purpose: stacks any number of LoRAs in one node. Each row has its own on / off, strength and, folded under the row, a weight per group of 6 layers and other_layers that multiplies its strength, as in LoRA Block Weight (same code). A row at 1.0 with every group at 1.0 is the stock LoRA loader.
  • Inputs: model, enabled (off passes the model through and keeps the list), loras (the list as JSON, edited by the rows: [{name, on, strength, groups}]).
  • Outputs: MODEL, info (the LoRAs applied with their strengths and changed groups).
  • Few-step LoRAs: a LoRA whose own file metadata gives its settings at CFG 1 (the HaDeS MOSS Turbo files: 4 steps, CFG 1, euler / simple, strength 1.0, shift 5, 8 steps for Turbo 8-steps) gets a STEPS tag on its row and is named in info; nothing is guessed from file names, so other few-step LoRAs carry no tag. Two of them stacked give a warning: each was trained alone. Suite Telemetry compares those settings with the KSampler's.
  • Interface: + ADD LORA and a click on a row's name open a LoRA picker with a search box (words in any order, arrow keys and Enter); strength and group weights drag, take a typed value on click and go back to 1.0 on right-click; right-click on the group button resets the row's groups.
  • No presets: which layers a LoRA acts in differs from LoRA to LoRA (see LoRA Block Weight), so the node ships no group presets.

MOSS LoRA Merger (HaDeS/MOSS Mergers)

  • Class: HaDeSMossLoraMerger
  • Purpose: merges two LoRAs into one file, weight_a × A + weight_b × B, compressed per layer with an exact SVD of the stacked factors (QR first, never the full matrix). Any community MOSS format in (kohya, PEFT split or fused q/k/v), the model's layout out.
  • Inputs: model (the model the LoRAs are for; it sets the q/k/v layout), lora_a, weight_a, lora_b, weight_b, rank (max per layer; rank A + rank B is exact), export_filename, optional dynamic_energy and overwrite_existing. Never overwrites a source LoRA.
  • Outputs: saved_lora_path, info (layers in A only / B only / both, size, rank, energy kept).
  • Measured: retro (rank 32) + lenovo (rank 16) merged at rank 48 or 32 renders within the noise of loading the two LoRAs in the opposite order (tools/RESULTS.md).

MOSS LoRA Resize (HaDeS/MOSS Mergers)

  • Class: HaDeSMossLoraResize
  • Purpose: lowers a LoRA's rank with the same exact SVD, fixed (target_rank) or per layer by an energy target (dynamic_energy), and saves a new file in models/loras/; the source is never overwritten. Split q/k/v LoRAs come out fused on fused models.
  • Inputs: model, lora_name, target_rank, export_filename, optional dynamic_energy, overwrite_existing.
  • Outputs: saved_lora_path, info (sizes, rank, mean and worst-layer energy kept).
  • Measured: AnubisCitronOC (142 MB) at rank 32 (126 MB, 97.9% energy) stays within the noise floor; rank 16 (63 MB, 91.1%) and dynamic 0.90 (56 MB) drift visibly from the source.

MOSS Metadata Reader (HaDeS/MOSS Mergers)

  • Class: HaDeSMossMetadataReader
  • Purpose: shows what a LoRA or diffusion model file says about itself and what its tensors show, reading only the safetensors header (instant on a 10 GB model; the weights are not loaded).
    • Metadata: every key of the file (the Suite's hades/*, kohya / ai-toolkit ss_*, modelspec.*, a saved ComfyUI workflow...); long values are cut in info and whole in metadata_json.
    • Measured from the tensors: size, tensor count and dtypes; for a LoRA its kind (lora_up / lora_down, PEFT, full diffs, LoHa, LoKr), rank (per layer when it varies), alpha, the MOSS-Image layers and modules it touches, or a note when no key name is MOSS-Image's; for a model whether it is MOSS-Image, its layers, parameters, fused or split q/k/v, int8 ConvRot.
    • Recipe: for LoRAs made with the Suite's Merger, Resize or Extractor, the chain of sources from their hades/* keys, followed into the source files still in models/loras (a source moved to another subfolder is found by its file name when only one LoRA has it), with the weight of each original file in the result. For models saved by the MOSS Model Saver with a recipe, that text, with the model of a MOSS Loader info and the LoRAs of a Multi-LoRA or LoRA Block Weight info in it followed into their own recipes. A source replaced since under the same name is read as it is now.
  • Inputs: lora_name and model_name (each can be (none)), optional sha256 (hashes the files, cached while unchanged and shared with the MOSS Image Saver; seconds on a 10 GB model).
  • Outputs: info (text plus HADES_META with the recipe; into a Save Text node it keeps the recipe on disk), metadata_json.
  • Nested merger recipes are followed too. The reader refreshes when referenced source files change or become available.

MOSS Model Saver (HaDeS/MOSS Mergers)

  • Class: HaDeSMossModelSaver
  • Purpose: saves a MODEL with its merge / LoRA patches baked in, loadable by the stock Load Diffusion Model node, and passes the model through.
  • Inputs:
    • filename_prefix: path under ComfyUI/output (default diffusion_models/MOSS_HaDeS_Merged). Move the file to models/diffusion_models to load it.
    • precision: bfloat16 (10.2 GB), int8 ConvRot (Comfy-Org layout) (5.4 GB: the four linears of every layer in int8 with Hadamard rotation and int8 attention, everything else in bfloat16, the same keys and dtypes as Comfy-Org's *_int8_convrot files) or float32, or HMS v1 (W4A8 / W6A8, calibrated) (about 3.96 GB, the Suite's own quantization: attention and the FFN of layers 30-41 in W6A8, the other FFN in W4A8, calibrated on the model itself; loads with the stock Load Diffusion Model and ComfyUI's native kernels). Needs a MOSS-Image model with the four fused projections of the official files in every layer, the MOSS-Image text encoder and a CUDA GPU with comfy-kitchen's W4A8 / W6A8 functions (checked with 0.2.40); the Saver checks all of it before calibrating.
    • clip, hms_steps, hms_cfg, hms_sampler, hms_scheduler (HMS only): HMS samples seven fixed calibration prompts with the model being saved, so it needs the text encoder; use the settings the model is meant to run with (defaults 25 steps, CFG 2.5, er_sde, simple; for a turbo model its steps and CFG).
    • include_metadata, custom_author, custom_model_title: ModelSpec metadata.
    • recipe (optional): how the model was made, written into the file as hades/recipe. Link the info of the MOSS Loader, Multi-LoRA or a merger (several joined with the core Concatenate node) or type notes; the MOSS Metadata Reader shows it and follows the models and LoRAs it names. Empty: no recipe, as before.
    • rounding (bfloat16 output, weights with merge / LoRA patches): stochastic (default) rounds each one up or down with probability by distance, seeded per weight so the file is reproducible; nearest writes the weights ComfyUI computes when it loads the model with those LoRAs whole in VRAM, so the file renders like the live LoRAs. Unpatched weights are copied unchanged either way.
  • Outputs: model (pass-through), saved_path, info.
  • Measured (tools/RESULTS.md, "Baking subtle LoRAs into bfloat16"): two LoRAs whose changes are smaller than a bfloat16 step, baked into a merge. Rounded to nearest the file kept about 80–85% of their effect (as the LoRAs loaded live, which round the same way); stochastic rounding kept all of it, and its renders sat as close to the float32 result as two stochastic files with different seeds sit to each other.
  • Measured (tools/RESULTS.md, "Model Saver nearest and live LoRAs"): two LoRAs stacked on a merge and saved with nearest give, on an RTX 5090, the same weights as ComfyUI's whole-in-VRAM load element for element (12 of 168 patched tensors checked, 0 elements differ), whatever else is loaded. When ComfyUI loads a model only partly in VRAM it applies LoRAs another way, so live renders can still differ a little from the file.
  • Measured (tools/RESULTS.md, "Model Saver: HMS v1 precision"): the HMS file the Saver writes for MOSS-Image SFT is bit-identical to the lab's HMS v1 file (942 of 942 tensors). In a real ComfyUI on an RTX 5090 an HMS save takes 8-10 minutes (peak about 19.5 GB RAM, 24.6 GB VRAM); MOSS-Image Base in HMS: L1@64 4.12 % from BF16, text exact 109/110 (BF16 107/110). A merge in HMS lands slightly darker than its BF16 save (median luma -2.8 on 10 scenes): check a merge by eye. MOSS-Image Base and SFT already saved in HMS v1: DeVilDoNia/MOSS-Image-HMS.
  • Measured: a live merge renders slightly differently from the same merge saved and reloaded (same subject and composition, small details change), in ComfyUI's own merger too; see tools/RESULTS.md.

MOSS Control (color / depth) (HaDeS/MOSS Pipeline)

  • Class: HaDeSMossControl
  • Purpose: color / depth control with a MOSS-Image control adapter loaded as a LoRA (e.g. moss-color-depth-control, trained on Base, which widens video_embedder to 384 input channels). Takes the Prompt Enhancer's positive and negative, resizes the maps in pixels to the latent before the VAE (the core node encodes them at their own size and the model then resizes the latents), and adds them as concat_latent_image in a start / end range.
  • Inputs: positive, negative, vae, latent; color_mode: off (depth only) (the adapter was trained depth-only 35% of the time, its file metadata: clothes and colors stay with the prompt), flat regions (a photo blurred and reduced to colors flat colors, so it guides palette and large areas without its texture), as given (a real segmentation map); colors, blur, strength (1.0 trained), start_percent, end_percent; optional depth_map, color_map.
  • Outputs: positive, negative, maps (what was encoded, to check), info (for Telemetry and the Image Saver).
  • Note: the adapter's strength in a LoRA loader scales only its LoRA layers: ComfyUI replaces the widened video_embedder at full strength whatever that value (a set patch), and at 0 the adapter is not applied at all, so the control conditioning then meets a 128-channel embedder. Use this node's strength. Measured on Base and SFT (25 steps, ~14.1–14.2 s) and with Turbo 8-steps v1.0 (Base) / 8-steps SFT v1.0 (SFT) (~3.3 s, 4.3–4.4× faster) in tools/RESULTS.md.

MOSS Latent (HaDeS/MOSS Pipeline)

  • Class: HaDeSMossLatent
  • Purpose: empty MOSS-Image latent (128 channels, 16 px grid) from an aspect ratio (1:1, 4:3, 3:2, 16:9, 21:9 and their portrait forms) and a size in megapixels (1.0 = 1024×1024), or a custom width / height snapped to 16 px. Outputs width / height for layout prompts.
  • Inputs: aspect_ratio, megapixels (0.25..4.0, default 1.0), custom_width, custom_height, batch_size, seed (with control after generate, starting on fixed so the image changes only when you change it); optional vae (rejects a VAE that is not the 128-channel FLUX.2 one).
  • Outputs: latent, width, height, info, seed.
  • Shared seed: connect seed to the seed of the MOSS KSampler (and of a second sampler, e.g. a refine pass) and of the Prompt Enhancer, so one value set here reproduces the whole image, prompt included. The seed does not change the latent, which is empty; it is shown in the node's status line and written to info.
  • Measured: square images from 768 to 2048 render clean at the model's default shift 5.0, with no repeated subjects; larger canvases show more of the scene. Raising the shift is not needed at any of these sizes. Non-square ratios are not measured. See tools/RESULTS.md.
  • Upscaling a MOSS latent (hi-res fix): use the core Upscale Latent By (LatentUpscaleBy), not Upscale Latent (LatentUpscale). The latter takes a size in pixels and divides it by 8, as for SD VAEs, while the MOSS latent is 16 px per cell: asked for 1024 x 1024, it gives a 2048 x 2048 image.

MOSS Layout Compiler (HaDeS/MOSS Pipeline)

  • Class: HaDeSMossLayoutCompiler
  • Purpose: compiles an OpenMOSS layout draft (the schema of the official moss-image-prompt-enhancer: width / height, bbox_coord_space: "abs", bbox_format: "xyxy" in top-left pixels, summary and a flat items array) into the model-facing prompt (boxes centered on the canvas, yxyx), with the same validation as the official compile_prompt.py and byte-identical output. Also outputs the empty latent and width / height of the draft's own canvas, so prompt and image size cannot drift apart. A {"caption": ...} draft passes through as plain text.
  • Inputs: draft (STRING, JSON), batch_size.
  • Outputs: prompt (to CLIPTextEncode), latent, width, height, info (lists multi-line text items with their box size).
  • Line breaks: write them as \n in text. Measured, the box shape decides whether they are kept: a two-line title in an 832×192 box came out on one line in 3 of 6 seeds, in a 640×384 box on two lines in 6 of 6; a literal newline instead of \n changed nothing (tools/RESULTS.md).
  • Unlike the core MOSS-Image Layout Prompt (boxes from Create Bounding Boxes), this node takes hand-written or LLM-written drafts, including meta, canvas, palette and tags.

MOSS Layout Editor (HaDeS/MOSS Pipeline)

  • Class: HaDeSMossLayoutEditor
  • Purpose: edits a layout draft on a canvas of the draft's size: boxes colored by label (object, character, text), moved and resized with the mouse on the 16 px latent grid (a click takes the smallest box under the pointer, so a box covering the whole canvas does not hide the ones inside it), drawn by dragging on an empty part of the canvas with the label picked in the toolbar, deleted or brought to the front. Under the canvas, the selected box's label, caption, text (new lines are line breaks in the image) and exact pixels; with no box selected, the caption of the whole image. Clicking the canvas size changes it and scales the boxes. Boxes missing a caption, or text items missing their text, are outlined in red, and the Layout Compiler refuses to generate until they are filled in, naming the box; the editor itself keeps running, so DRAFT LAYOUT can still replace an unfinished draft. Items the Prompt Enhancer left out for lack of a usable box (the draft's dropped list) get one row each under the canvas: PLACE, then drag on the canvas, puts the item back with its label, caption and text; DISCARD removes it. Unplaced items are never sent to the model.
  • Inputs: draft (the JSON the canvas edits, shown as text with the standard widgets); optional draft_in (e.g. the Prompt Enhancer's draft: after a run the toolbar shows IMPORT, which replaces the canvas with it; it never overwrites your edits by itself) and image (a background for placing the boxes: pick it in a Load Image node wired here, shown at once even when that node is muted, otherwise after a run; MATCH IMAGE sets the canvas to its aspect ratio at about the same area; not sent to the model).
  • Outputs: draft (to the Layout Compiler's draft), width, height, info.
  • Image → layout: the Prompt Enhancer in layout mode with an image writes the draft; import it here to correct the boxes.
  • Standard widgets (Use standard ComfyUI widgets): the canvas gives way to the draft's JSON, with the same DRAFT LAYOUT and GENERATE buttons under it; edit the JSON, then GENERATE. The buttons are not saved with the workflow.
  • Boxes first, image after: with the Prompt Enhancer's draft connected to draft_in, DRAFT LAYOUT runs only the nodes up to this editor (the sampler does not run) and puts the boxes it writes on the canvas, replacing what was there. Adjust them, then GENERATE runs the whole workflow (the same as Run); the Prompt Enhancer runs again only if its inputs changed. Other runs never replace the canvas: they only offer draft_in with IMPORT.
  • Tried (tools/RESULTS.md, Layout mode): 8 ideas written in Spanish stating where 28 elements go; the Prompt Enhancer put all 28 boxes in the stated region and MOSS drew 26 inside their boxes (the 2 misses had odd boxes), one seed each. The enhancer can add elements you did not give, such as a signature with invented text: check the boxes before GENERATE.

MOSS Prompt Enhancer (HaDeS/MOSS Pipeline)

  • Class: HaDeSMossPromptEnhancer

  • Purpose: a positive / negative prompt box for the sampler that can also write the prompt: a detailed MOSS-Image prompt from a short idea and / or an image, with MOSS-Image's own text encoder: the Qwen3.5-9B file loaded as the moss_image CLIP holds the language head and the vision tower, so the same CLIP that encodes the prompt writes it and no other model is loaded. The instructions are adapted from OpenMOSS' official moss-image-prompt-enhancer skill (Apache-2.0).

  • Modes:

    • caption: the model writes a paragraph that keeps to the idea.
    • detailed: a longer prompt, about 120-200 words, written like a photographer's or illustrator's brief: where the light comes from, lens and shot type for photographs, technique and materials for other media, concrete details. Unlike caption it may add setting, props and story details; it keeps the idea's subject, medium, counts, exclusions and visible wording. An extra option, not measured against caption.
    • Random prompts: detailed with idea empty and no image invents a prompt; the seed draws a medium (26), a subject area (20) and a place / time (20) from fixed lists, so prompts vary by construction, and info names the draw. The same seed gives the same prompt.
    • layout: a pixel Layout draft with boxes for objects and text, compiled here.
    • as written: no generation; the idea is encoded as typed (the plain text encoder).
  • Inputs: clip (MOSS-Image's text encoder), idea, mode, width / height (layout canvas), temperature (0 always gives the same answer), seed, max_tokens; optional image (the whole brief with no idea, otherwise the starting point; resized to about 1 MP) and negative (the negative prompt; empty uses the official MOSS-Image template's nsfw, worst quality, bad anatomy, watermark, jpeg artifact; what you write is also told to the model as things to keep out).

  • Outputs: positive / negative (conditionings for the sampler, encoded with the same CLIP), prompt (the text), draft (the editable JSON: a caption draft, or the layout draft for the Layout Compiler, which also outputs the matching latent), width, height, info.

  • Layout answers are fitted before compiling: the canvas set to width / height, boxes rounded and clamped into it, fields the compiler does not know dropped, items without a usable box left out of items and kept in the draft's dropped list (the Layout Editor can place them again, the Layout Compiler ignores them); info lists what was changed.

  • Slow text generation on older PyTorch builds: on PyTorch 2.8.0+cu129 (RTX 5090, comfy-kitchen 0.2.40) comfy-kitchen's GQA decode kernel refuses every input ("Unsupported Flash Attention tensor strides", checked with plain contiguous tensors of several shapes), so text generation stops, in the core TextGenerate node too; ComfyUI also warns at start that its optimized CUDA operations need PyTorch cu130 or newer. While this node generates, a refused call runs comfy-kitchen's own torch version of the same attention: about 13 tokens per second, 30–40 s per answer; info says when that happened. On PyTorch 2.9.1+cu130 (same GPU, comfy-kitchen 0.2.40) the native kernel runs and an answer takes 2–3 s (three captions and a poster layout).

  • Tag prompts: an idea written as Danbooru tags is turned into prose. Count tags (1girl, 1boy, 2girls...) give no age, so they are written as adults ("a young woman", "a young man") unless the idea states an age: written as "girl", a recycled 1girl prompt rendered a childlike figure. Checked on four tag prompts x two seeds: 8 / 8 adult wording, and an elderly tag kept.

  • Tried, not measured (tools/RESULTS.md): one seed each, a caption and a poster layout rendered against the idea as written.

  • Edit mode (edit_format, vae, edit_megapixels): for an image-edit LoRA loaded in the Multi-LoRA, the image becomes the reference latent of both outputs, replacing two core Text Encode MOSS-Image Edit nodes with the same formats: Moss-Image-Edit (MOSS-edit / Moss-Image-Edit: use as written with a direct edit instruction, which also runs cleanly with HaDeS MOSS Turbo 8-steps on the KSampler's turbo input, or caption to have the model write the full target description from the image and the idea), ai-toolkit and ai-toolkit (kv_cache off) (LoRAs trained with ai-toolkit, e.g. the pose LoRA; the text encoder also sees the image). The reference is resized to edit_megapixels with its aspect kept (16 px grid), and width / height out are that size: link them to the MOSS Latent's custom_width / custom_height to generate at the reference's size.

MOSS KSampler (HaDeS/MOSS Samplers)

  • Class: HaDeSMossKSampler
  • Purpose: KSampler with the official ComfyUI MOSS-Image template settings as defaults (25 steps, CFG 2.5, er_sde / simple, the model's shift 5.0), an optional flow shift, optional skip-layer guidance and optional decode. With the same settings it renders the same image as the stock graph (KSampler, ModelSamplingAuraFlow, SkipLayerGuidanceDiTSimple, VAEDecode).
  • Inputs: model, positive, negative, latent_image, seed, steps, cfg, sampler_name, scheduler, denoise, flow_shift (0 keeps the model's 5.0), slg (off, block 22, first half (Base template), block 22, all steps); optional vae, optional turbo (from MOSS Turbo LoRA: applies the LoRA and samples with SLG off and the turbo node's steps, CFG, sampler and scheduler, whatever those widgets say, unless the turbo node is switched off or at strength 0).
  • denoise_mode (optional): steps / denoise (core) is the stock schedule: ComfyUI builds int(steps / denoise) steps and runs the last ones, so at few steps denoise moves in jumps (at 4 steps 0.7 and 0.8 give the same image, 0.9 starts from pure noise and ignores the input). exact makes denoise a point on the model's noise-time axis and runs every step from there with the scheduler's spacing: continuous at any step count, the same as core at denoise 1 (with shift 5, exact 0.89 starts at sigma 0.976). info records the start sigma either way. The exact mode's images are not measured yet; an independent study on the akhaliq 4-step LoRA (lilting.ch, core mode plus manual sigmas) found sign text appearing from sigma 0.95 and an illustration turning photographic between 0.97 and 0.98.
  • Outputs: latent, image (when a VAE is connected), info (the settings actually used, start sigma included, and the model files the model input comes from: the node follows that cable up the workflow, through LoRA nodes and mergers, to the loaders that read a file, MOSS Loader, Load Diffusion Model or Load Checkpoint; two or more for a merge made in the workflow).
  • Measured (tools/RESULTS.md): shift 5.0 is clean from 768 to 2048 px; SLG on block 22 did not change text accuracy on SFT or Base (blocks 24 / 26 made the only errors, on Base), so it is off by default; with euler, 25 steps render nearly the 60-step image with any scheduler and euler / beta does so at 15.

MOSS Turbo LoRA (HaDeS/MOSS Samplers)

  • Class: HaDeSMossTurbo
  • Purpose: picks a few-step LoRA for the turbo input of MOSS KSampler, which loads it the way the stock LoraLoaderModelOnly does and samples at its own steps, cfg, sampler_name and scheduler widgets: 4 steps, CFG 1, euler / simple by default, the settings the LoRAs were trained at (seed, denoise and flow shift still come from the KSampler). Above CFG 1 the negative prompt takes part and each step runs the model twice (about 1.9x the time); measured with one seed per prompt, Turbo 8-steps at CFG 1.5 rendered 10 hard prompts on SFT and Base without burning, and on a merge with a turbo baked in 1.25–1.5 brought back prompt details lost at CFG 1 while saturation rose with every step and 2.5 looked overdone; texture-heavy prompts looked better at 1.0–1.2 (tools/RESULTS.md, "Turbo LoRAs above CFG 1"). Measured counts: 4 for Turbo and Turbo Diverse, 8 for Turbo 8-steps; Turbo and Turbo Diverse give 6–10% less colour than SFT at 4 steps at 1024 (6–14% at 2048) and are back near it at 8 (only colour was measured for them at 8). Other counts run, their quality is untested. Checked in ComfyUI: it renders the stock LoraLoaderModelOnly + KSampler image pixel for pixel (both LoRAs, 8 images, with the KSampler's own widgets left at 25 steps, CFG 2.5, er_sde / beta and SLG on).
  • Inputs: lora_name (from models/loras), strength (default 1.0, the only strength measured), steps (default 4), cfg, sampler_name, scheduler; optional enabled (default on). Switched off, or at strength 0, the KSampler applies no turbo and samples with its own steps, CFG, sampler, scheduler and SLG, as if the cable were unplugged, and its widgets are no longer drawn faded; the turbo node keeps its settings for when it is switched back on.
  • Outputs: turbo (for the MOSS KSampler), info (the LoRA and settings, for Suite Telemetry).
  • The LoRAs: put the files in models/loras. Turbo 8-steps v2.0 (the newest; better than v1.0 in a blind review, about half its East Asian faces on two neutral prompts) and v1.0 are for MOSS-Image Base (8 steps, CFG 1 or 1.5). Turbo 8-steps SFT v1.0 is trained specifically for MOSS-Image SFT (8 steps, CFG 1, Euler / simple, strength 1.0, shift 5.0). The older Turbo and Turbo Diverse v0.6 (4 steps) and Turbo 8-steps v0.7 (8 steps) are also for SFT. See the model card for both v1.0 evaluations. HaDeS MOSS v1.0 Turbo has the Base v1.0 baked in, so leave its turbo input empty.
  • Measured (tools/RESULTS.md, 1024 x 1024 against akhaliq's 4-step v2.0 LoRA at the same settings): Turbo spelled every test string right on signs and posters at 1024 x 1024, 6 / 6 on layout JSON and 3 / 3 on a 16:9 poster, while at 2048 x 2048 the sign's small line was right in 1 / 3 (akhaliq's 2 / 3); Turbo Diverse keeps SFT's spread of faces on an open prompt (about 10 East Asian women in 16 seeds, against about 15 for Turbo and akhaliq's LoRA). Turbo 8-steps at 8 steps, in blind pairs on 20 varied prompts: beat akhaliq's 4-step LoRA (full file) 18 to 5, and against lodestones' 8-step DMD2 LoRA for MOSS-Image Base / Kromoss run on SFT (full file) 10 to 7 at 1024 and 0 to 5 at 2048, where it has less colour; it is for up to 1024. lodestones' SFT 8-step LoRA was not compared. Turbo 8-steps at denoise 0.25 / 0.40 on a RealESRGAN x2-upscaled image: by eye it adds real texture (hair, pores) the upscaler smooths, as well as SFT at 25 steps in a fifth of the time. Not measured: other base models, other strengths or step counts, other img2img uses below denoise 1.0; they run (an int8 finetune as the base, img2img at denoise 0.6 were checked), their quality is untested, and Telemetry knows which model the KSampler got only from a MOSS Loader's info.

MOSS Sampler Metadata (HaDeS/MOSS Samplers)

  • Class: HaDeSMossSamplerMetadata
  • Purpose: reads the settings a MOSS KSampler actually sampled with from its info (seed, steps, cfg, sampler, scheduler, denoise, flow shift, and turbo: the turbo LoRA file and strength, empty without one), for image-saver metadata, and info with those values for Suite Telemetry.

MOSS Suite Telemetry (HaDeS/MOSS Pipeline)

  • Class: HaDeSMossSuiteTelemetry
  • Purpose: reads the info outputs of up to 8 HaDeS MOSS nodes (their HADES_META trailer) and checks the pipeline against what was measured:
    • error: with a layout in the pipeline (Layout Editor, Layout Compiler or the Prompt Enhancer in layout mode), a latent or KSampler on another canvas (a layout prompt places its boxes on its own canvas); with a Layout Editor its canvas is the one checked, not that of a Prompt Enhancer whose draft it edits; without a layout, different latent and KSampler sizes (img2img, an upscale pass) are not compared;
    • warning: quantized models in a merge, TIES / DARE with a quantized model, a LoRA extracted below 95.9% energy (the lowest measured that stayed close to its finetune), KSampler denoise below 1 that runs the full schedule from pure noise (at few steps, e.g. 0.9 at 4 steps: the input is ignored), a few-step LoRA in Multi-LoRA sampled at other steps than its file's metadata gives or below CFG 1, or stacked with the KSampler's turbo input;
    • note: an int8 model from the MOSS Loader (with its measured speed and VRAM) or one loaded with a weight_dtype conversion, KSampler size outside 768²–2048², shift other than 5.0, SLG on, turbo LoRA at a strength other than 1.0, at a step count other than 4 or 8, at denoise below 1.0, above CFG 1 (with what was measured there) or with a sampler other than euler / er_sde (simple), a few-step LoRA in Multi-LoRA above CFG 1, fp16-fixed residual scale normalized, multi-line layout text with its box proportions, a LoRA resized / merged below 97.9% energy (with both measurements: a style LoRA drifted at about 90%, few-step LoRAs held at rank 2), a core-mode denoise whose step rounding gives the same image across a range of values.
  • Outputs: report (Markdown), json (every node's settings, for the MOSS Image Saver), summary (one line), info (the counts of nodes read and findings).

MOSS Image Saver (HaDeS/MOSS Pipeline)

  • Class: HaDeSMossImageSaver
  • Purpose: saves PNG images with the generation settings written as A1111 parameters, the text Civitai and most image browsers read: prompt, Negative prompt: and one line with steps, sampler, schedule type, CFG, seed, size, model and model hash, LoRA hashes, denoise (below 1.0), shift, VAE and text encoder. Also ComfyUI's own prompt / workflow chunks, so the image loads back into ComfyUI, and the Suite's settings as JSON (hades_moss).
  • Inputs: images, metadata (Suite Telemetry's json output, which gathers the Loader, Latent, KSampler, Multi-LoRA and Prompt Enhancer infos; one info output connected directly also works), filename_prefix (%seed%, %model%, %steps%, %cfg%, %sampler%, %width%, %height% from the metadata, %date:...% as in the core Save Image), hashes, embed_workflow; optional positive / negative text when the prompt does not come from a Prompt Enhancer.
  • Multiple sampling stages: leave metadata connected to Telemetry for the whole pipeline. For the image's principal stage, connect a second Telemetry only to that stage's KSampler and its relevant Loader, Prompt Enhancer and LoRAs, then connect its json to the optional primary_stage_metadata input. The stage must have exactly one KSampler and no more than one Loader or Prompt Enhancer. Its own settings and resources supply the A1111 parameters and filename tokens; missing resources are not borrowed from another stage. The original hades_moss PNG chunk still holds the full pipeline, and hades_moss_primary_stage holds the selected stage. With the new input disconnected, existing workflows keep the first-KSampler behavior and unchanged PNG metadata.
  • Model: the model the (first, or the primary stage's) KSampler sampled with, from the model files in its info: one file gives Model and Model hash; a merge made in the workflow gives Model: merge: a + b with no model hash (there is no single file) and a note. A KSampler info without them (a workflow from before 0.9.3) falls back to the first MOSS Loader, as before.
  • Hashes: SHA256 of the model and of every LoRA (Multi-LoRA rows, LoRA Block Weight, the KSampler's turbo input; a LoRA used in two stages is listed once), first 10 characters (AutoV2), in Model hash, Lora hashes and Hashes. The first save with a 10 GB model reads the whole file once; later saves in the same session reuse the hash while the file is unchanged. Nothing is looked up online. How Civitai reads these fields was not checked from here.
  • ComfyUI's --disable-metadata suppresses all embedded metadata. The parameters output remains available as text.
  • Outputs: parameters (the text written into the images), info (the files saved and what was written into them). The node shows the saved images like the core Save Image, and a note when the prompt or the sampling settings are missing from the metadata.

MOSS Compare Sheet (HaDeS/MOSS Pipeline)

  • Class: HaDeSMossCompareSheet
  • Purpose: puts up to four images side by side, A to D, as one labelled PNG, for comparing LoRAs or checkpoints with the same prompt and seed.
  • Inputs: image_A (its height sets the sheet's; the others are scaled to it), optional image_B, image_C, image_D; info_A to info_D, each branch's Multi-LoRA, LoRA Block Weight, KSampler or Loader info, or a Suite Telemetry json of that branch; label_A to label_D (empty: read from the info); footer (empty: the settings every branch shares, read from the KSampler and Loader infos, and the prompt); filename_prefix (default MOSS/compare/sheet), save (off: preview only), embed_workflow; blind, blind_seed.
  • Labels from the info: the LoRA names of the branch, with the strength when it is not 1 (Multi-LoRA rows, LoRA Block Weight); without LoRAs, the Loader's model file; then the KSampler's turbo when it is on; with nothing, the slot letter. Settings that differ between branches (model, seed, steps...) are added to that panel's label; settings they share go in the footer once. A value goes in the footer only when every panel carries it: an image without an info (from disk, another pack) keeps seed, steps and prompt out of the footer, and the panels that have them show them on their labels.
  • Blind mode: blind shuffles the panels and numbers them 1 to 4 without names, for choosing without knowing which is which; the key (number → branch) is in info and in the PNG, never on the sheet. blind_seed sets the order.
  • Outputs: sheet (IMAGE, one per batch index) and info (labels, where each came from, files saved). The PNG holds ComfyUI's workflow and the labels and branch settings as hades_moss_compare; --disable-metadata leaves it plain.

MOSS Compare Sampler (HaDeS/MOSS Samplers)

  • Class: HaDeSMossCompareSampler
  • Purpose: samples up to four models with the same prompt, latent, seed and settings and saves them as one labelled sheet: four MOSS KSamplers and a MOSS Compare Sheet in one node, with one cable to Suite Telemetry. Each model is sampled exactly as the MOSS KSampler samples it, turbo included.
  • Labels from the model, not the wiring: each model carries the recipe of the nodes it came through (Loader, Multi-LoRA, LoRA Block Weight, mergers). The label is its LoRAs, or its model file when it has none (a merge is named merge: a + b), then the turbo when it is on. A Multi-LoRA switched off passes its model through, so the panel shows the bare model: comparing models instead of LoRAs needs no rewiring. A model from outside the Suite (core loaders) has no recipe: its panel shows the slot letter and info says to name it with label_X.
  • Inputs: model_A, optional model_B to model_D; positive, negative, latent_image, vae; seed, steps, cfg, sampler_name, scheduler (as the MOSS KSampler, denoise 1); optional turbo (from MOSS Turbo LoRA; on, its steps / CFG / sampler / scheduler apply to every model, and those widgets are drawn faded), prompt_info (the Prompt Enhancer's info, for the prompt under the sheet), flow_shift, slg; label_A to label_D, footer, blind, blind_seed, filename_prefix, save, embed_workflow (as in the Compare Sheet).
  • Outputs: sheet, images (every image of every model as one batch: model A's whole batch first, then B's, C's and D's), info (labels, files, and every branch's KSampler, LoRA and model settings; Suite Telemetry checks each branch from this one input and reports a note shared by all of them once).

MOSS Text Check (HaDeS/MOSS Pipeline)

  • Class: HaDeSMossTextCheck
  • Purpose: checks that the text asked for is in the generated image, complete and in its place. It reads the image with MOSS-Image's own text encoder (Qwen3.5-9B, whose file holds the vision tower); no other model is loaded.
  • Inputs: image, clip (the MOSS text encoder, CLIPLoader type moss_image), optional layout (a layout draft from the Prompt Enhancer, Layout Editor or Layout Compiler: each text item is read inside its box, scaled from the layout canvas to the image; a caption draft from the Prompt Enhancer in caption / detailed mode gives its texts in quotes, looked for anywhere), optional expected_text (one text per line, looked for anywhere), max_tokens.
  • Verdicts: exact, close (some letters differ), missing, outside its box (not in its box but found elsewhere). Case, punctuation and line breaks do not count; a text painted over several lines is matched joined. Each item also says whether the literal text matched (literal in info); the report adds case or punctuation differ to an exact that is not literal (HaDeS read as hades, 12.50 as 12 50). An empty read never matches visible text, and a text made only of punctuation (!!!) is compared as written. A very thin box is upscaled for the reader at most to 2048 px on its long side.
  • Outputs: report, failed_mask (the boxes whose text is not exact, for a retry of those areas only), passed, info. With no text asked for (no text item, no quoted text, no expected_text) nothing is read: the report says so, passed is true and the workflow goes on.
  • Measured (tools/RESULTS.md): 75 of 75 right verdicts on text drawn in common fonts (28-110 px; right text, one-letter typos, empty boxes); 19 of 20 on text MOSS-Image painted itself. The miss: a word cut by the image edge was read as whole. Not measured: text under 28 px, non-Latin scripts, other text encoder files.

Dev Tools (git repository only)

Two measurement nodes in HaDeS/MOSS Dev Tools, with their UI (web/moss_dev_tools.js) and the examples/dev/ workflows. They are in the GitHub repository, not in the Comfy Registry package; the Suite works the same without them.

MOSS Layout Regions (HaDeS/MOSS Dev Tools)

  • Class: HaDeSMossLayoutRegions
  • Purpose: a mask from selected boxes of a layout draft, to measure an edit inside and outside a region. Boxes, not object outlines.
  • Inputs: draft, selection (draft order from 1: 1, 1,3, 2-4), padding (pixels around each box, clipped to the canvas).
  • Outputs: mask, preview, regions_json (the boxes as rasterized), info. The mask has the draft's canvas size; partial pixels at a box edge count as inside, as the Layout Compiler places them.

MOSS Image Audit (HaDeS/MOSS Dev Tools)

  • Class: HaDeSMossImageAudit
  • Purpose: pixel differences between a reference and a candidate, globally and inside / outside an optional region_mask: mean and maximum absolute error (0–255), share of pixels changed above change_threshold, luma change and HSV saturation change. Differences, not a quality or edit-success score.
  • Inputs: reference, candidate (same size and batch; nothing is resized or aligned), region_mask (inside at 0.5 and above), change_threshold (default 2 / 255), difference_gain (display only), labels.
  • Outputs: difference_map, report (with info trailer), metrics_json (per pair, an empty region as null).

The Dev Tools example needs no model: a composition adds 128 / 255 to the red channel inside one box, so Image Audit reads 12,288 pixels changed (18.75%), inside MAE about 42.67, outside 0, global 8 (tools/RESULTS.md). To check that two saved images are a fair A / B pair before comparing them, use tools/moss_pair_check.py (below).

Interface

The nodes draw their own moss-green rows on the canvas (the HaDeS Anima Suite widget library with its own palette), in the classic canvas and in Nodes 2.0:

  • every widget becomes a styled row by type (combo, slider, number, toggle, text); the layout draft keeps ComfyUI's text editor;
  • tooltips are the node's own, with the measurements behind each value;
  • Block Merger: a bar chart of the 42 layers and 3 parts colored by depth group, each group labeled with the share of the SFT → Base change it carries, and buttons M1, 50/50, 24–35 M2 (the groups that carry most of that change) and M2;
  • LoRA Block Weight: a bar per layer group; Multi-LoRA: one row per LoRA with a searchable picker and a status line (rows on, few-step LoRAs); Layout Editor: the draft's boxes on a canvas, edited with the mouse; KSampler and Latent: a status line with the settings or the final size; Prompt Enhancer: a status line with the mode (CAPTION, DETAILED, "DETAILED · random prompt from the seed", LAYOUT with its canvas, AS WRITTEN), temperature and whether an image or an edit format is in use, with the rows the mode does not use drawn faded; Compare Sheet: a COMPARE SHEET banner. With the turbo input connected the KSampler's status reads TURBO with the turbo node's sampler, steps and CFG, and the rows it overrides (steps, cfg, sampler, scheduler, SLG) are drawn faded, still editable for when it is unplugged.

Settings → HaDeS MOSS Suite → Use standard ComfyUI widgets (or HaDeS MOSS Suite in a node's right-click menu) switches to the plain widgets. It does not affect HaDeS Anima Suite nodes when both suites are installed.

Example workflows

In examples/ (drag a file into ComfyUI); model-free development examples are in examples/dev/. Generation examples use the official Comfy-Org file names and carry their download links, so ComfyUI offers to download missing models.

Every generation example loads the three files with the MOSS Loader, writes and encodes the prompts with the Prompt Enhancer (as written, the plain text encoder, unless said otherwise), shares the MOSS Latent's seed with its samplers, ends in a Suite Telemetry report that reads the loader and the enhancer too, and saves through the MOSS Image Saver with A1111 metadata.

  • Merge, Save and Telemetry: the sixth video tutorial: a test recipe made for the video, not a recommendation (SFT with half of Base in layers 18-35 through the Block Merger) on the first video's fisherman (seed 1013), with telemetry and the MOSS Image Saver. The Model Saver (its recipe from the merger's info), the Metadata Reader to read the saved file back and a SLERP Multi-Model Merger come muted. The note gives the video's measurements: where the recipe lands, the bias counts on two prompts, bf16 and int8 files.
  • Prompt Enhancer: the third video tutorial: the first video's fisherman (Base + Turbo 8-steps v1.0, seed 1013) with the idea a photograph of an old fisherman on a dock in detailed mode (enhancer seed 1), a text preview of what it wrote and a muted Load Image to have the prompt written from a picture. The note explains every mode with the video's measurements: caption and detailed lengths, detailed picking an oil painting when the idea names no medium, random prompts, tags, the negative and the image input.
  • Layout Poster: an OpenMOSS layout draft through the Layout Compiler, whose prompt and latent feed the sampler, with telemetry.
  • Layout Editor: the Layout Editor's draft through the Layout Compiler into the sampler, with a note on how to edit the boxes; a Load Image is the background (pick your picture there); a second Prompt Enhancer in layout mode comes muted (switch it on and press DRAFT LAYOUT for its boxes).
  • Layout from a Sentence: the eighth video tutorial: the fisherman poster on HaDeS MOSS v1.0 Turbo. An idea in plain words saying where each thing goes (with the title "NORTH SEA" and the signature "HaDeS" in quotes), written into boxes by the Prompt Enhancer in layout mode; DRAFT LAYOUT puts them on the Layout Editor's canvas without sampling, GENERATE renders with the boxes as you left them, and MOSS Text Check reads the text boxes back from the image. The note gives the video's measurements.
  • Compare Models: the seventh video tutorial: MOSS Compare Sampler with SFT, Base, the sixth video's test recipe and Bulle d'Encre on one labelled sheet (the fisherman, seed 1013); a muted group with Bulle d'Encre's extracted LoRA at four strengths (off, 0.5, 0.8, 1.0) through four Multi-LoRAs, for blind mode too; a muted Compare Sheet with two seeds. The note gives the video's measurements.
  • Turbo: MOSS Turbo LoRA into the MOSS KSampler's turbo input, 4 steps at CFG 1 on SFT; ComfyUI offers to download the LoRA from Hugging Face. MOSS Sampler Metadata shows the settings the sampler actually used (the turbo's).
  • Turbo 8 steps + Upscale x2: the second video tutorial: the first video's fisherman (Base + Turbo 8-steps v1.0, 8 steps, seed 1013) taken to 2048 two ways: RealESRGAN x2 (pixels only, about a second) and, on top of it, a MOSS pass with the same turbo and seed at denoise 0.25 (redraws the skin pores, beard hairs and fine texture the upscaler smooths, about 11 s at 2048 on an RTX 5090). Suite Telemetry reads both samplers and feeds the three Image Savers' metadata; group 3 can be set to Never from its right-click menu. A note in the workflow explains it.
  • Basic Generation: the first video tutorial's six nodes: MOSS Loader (Base), Prompt Enhancer as written, MOSS Latent (seed 1013), MOSS KSampler (25 steps, CFG 2.5, euler / simple) and Image Saver, with MOSS Turbo LoRA (Turbo 8-steps v1.0, 8 steps, CFG 1) in the turbo input; switch the turbo node off for 25 steps.
  • Control (color, depth): loads a depth map (depth_map.png, or swap Load Image for Depth Anything V2 from comfyui_controlnet_aux) into MOSS Control with moss-color-depth-control in the Multi-LoRA (kept at 1.0) on MOSS-Image Base + Turbo 8-steps v1.0, with a preview of the encoded maps and full Suite Telemetry. A note explains color_mode (off, flat regions, as given), strength and end_percent.
  • LoRA Toolkit: the fourth video tutorial: Bulle d'Encre's two LoRAs taken out and reused. The Metadata Reader shows Bulle d'Encre's recipe; the Block Merger rebuilds its base (SFT with 30 % of Base in layers 24-29); the LoRA Extractor (muted, about 100 s, 252 MB) saves Bulle d'Encre minus that base at rank 64; the Multi-LoRA puts it back on the base (off as the workflow opens, so a first run gives the base alone) with a Turbo 8-steps v1.0 row at 0.5; the LoRA Merger and LoRA Resize (muted) make one file and a rank-32 copy, and LoRA Block Weight comes muted. A note gives the order of the steps and the measurements.
  • Metadata: the fifth video tutorial: the Turbo 8 steps + Upscale x2 workflow with every MOSS Image Saver told which stage made its image: a Generate stage Telemetry on the 1024 and x2 Savers' primary_stage_metadata, a Refine stage Telemetry on the refined Saver's (its PNG says 2048x2048, Denoising strength 0.25), and the whole-pipeline Telemetry on metadata, so every PNG also keeps both stages. A note explains what the PNG carries, the Model field, hashes, privacy switches and file-name tokens.
  • Img2Img: the tenth video tutorial: Load Image → VAE Encode into MOSS KSampler (MOSS-Image Base + Turbo 8-steps v1.0, 8 steps, CFG 1) with denoise_mode: exact at denoise 0.9 (start_sigma 0.978, ~3.2 s on RTX 5090), avoiding the steps / denoise (core) jump to pure noise (start_sigma 1.000). Suite Telemetry shows start_sigma and feeds the Image Saver.
  • HMS v1 Converter: the eleventh video tutorial: MOSS Loader (BF16 model) → MOSS Model Saver set to HMS v1 (W4A8 / W6A8, calibrated) with clip and recipe connected, compressing a 10.2 GB BF16 MOSS-Image model or merge (the official fused layout) to ~3.96 GB; measured on an RTX 5090 with MOSS-Image Base: 11.6 GB peak inference VRAM, about 2× faster, stock Load Diffusion Model. A note explains calibration settings, pros/cons, and that HMS v1 is a VRAM-saving alternative rather than a replacement for full BF16.
  • Dev Tools (examples/dev/): Layout Editor → Layout Regions → native masked composition → Image Audit, with mask / candidate / difference previews and known numerical results. No model files are needed.
  • Stage Metadata (Dev) (examples/dev/): two synthetic sampling stages feed a full-pipeline Telemetry and a refine-only Telemetry. Image Saver uses the refine stage for A1111 parameters and filename tokens while preserving both stages in PNG metadata. It saves a 64×64 solid-color test PNG; no diffusion model is loaded. The model names in its synthetic info are placeholders.

Every example was run end to end in ComfyUI 0.43.0 (muted nodes left out). tools/make_examples.py regenerates them from the node definitions of a running ComfyUI.

Tests

tests/test_moss_suite.py checks the nodes against the real ComfyUI core on a tiny synthetic MOSS-Image model (CPU, a few seconds, no model download). From the ComfyUI folder:

python custom_nodes/HaDeS-MOSS-Suite/tests/test_moss_suite.py

Frontend setting tests (Node.js, no extra packages):

node --test custom_nodes/HaDeS-MOSS-Suite/tests/test_moss_widgets.mjs

Dev Tools and tool checks (CPU, no model loading): python custom_nodes/HaDeS-MOSS-Suite/tests/test_moss_dev_nodes.py, tests/test_moss_pair_check.py, tests/test_moss_edit_eval.py.

Every new node also requires real frontend acceptance in classic HaDeS, classic standard widgets, and Nodes 2.0 / Vue. The Dev Tools were checked in all three on frontend 1.57.4; mode-switch fixes and execution evidence are in tools/RESULTS.md.

Set HADES_MOSS_TEST_CUDA=1 to include the CUDA quantized-export checks; the default run uses CPU. CI tests ComfyUI v0.43.0 on Linux and Windows, and upstream master on Linux. A second CI job checks the Comfy Registry package as a user gets it: comfy node pack builds the zip from the commit, tests/check_package.py contents checks what ships and what must not (tests, CI, docs, the other tools, the Dev Tools), and a clean ComfyUI with only the unpacked zip must register exactly the distributed nodes, serve their frontend files, log no import failure and know every node of every example with its widget count (tests/check_package.py server). These checks use small synthetic weights; they do not measure image quality or full-model VRAM. Audit-fix evidence: docs/AUDIT_0.6.1.md.

Tools

  • tools/moss_pair_check.py reference.png candidate.png [--no-prompt]: checks that two images saved by the MOSS Image Saver (or two Telemetry json files) are a fair A / B pair: same size and the same seed, steps, CFG, sampler, scheduler, shift, denoise, SLG and prompt. A different model or LoRA is listed, not rejected. Exit code 1 when a setting differs.
  • tools/moss_edit_eval.py --mode spectra | prepare | run | report: controlled-reference MOSS-edit layer ablations against a running ComfyUI. Persistent images and exact run records go to --out; protocol and measured results: tools/RESULTS.md.
  • tools/moss_native_mix_convert.py, moss_codec_capture.py, moss_hms_calibrate.py, moss_hms_gptq.py, moss_hms_assemble.py: the HMS v1 quantization recipe (mixed native W4A8 / W6A8, GPTQ-calibrated, loaded by the stock UNETLoader; about 3.96 GB for MOSS-Image Base or HaDeS MOSS v1.0 Turbo). Steps, measurements and the research that led to it (native baselines, rejected codecs): tools/RESULTS.md, from "Experimental quantization". Evaluation helpers: moss_quant_grid.py, moss_hms_score.py, moss_quant_compare.py, moss_text_eval_batch.py, moss_text_score_fails.py.
  • tools/moss_eval.py --mode bias | compare: ethnic bias on neutral and explicit prompts, SFT vs Base on photo, illustration, text and layout prompts, with stock nodes only.
  • tools/moss_eval.py --mode groups: which layer groups carry the SFT → Base change (needs this suite installed).
  • tools/moss_eval.py --mode lora --lora <name> --lora-model <file>: which layer groups carry a LoRA's effect.
  • tools/moss_lora_atlas.py --lora <name> --out <dir>: a LoRA's per-group profile and block recipes checked on other prompts. On three LoRAs no recipe beat the full LoRA or a strength change (tools/RESULTS.md); a research tool.
  • tools/moss_eval.py --mode bias_merge: ethnic bias of SFT / Base merges.
  • tools/moss_eval.py --mode shift: square sizes x flow shifts (composition scale, native detail).
  • tools/moss_eval.py --mode slg: skip-layer guidance blocks on text and portrait prompts, SFT and Base.
  • tools/moss_eval.py --mode schedulers: sampler x scheduler x steps against a 60-step reference.
  • tools/moss_eval.py --mode attention | progressive: attention backends and int8 speed; two-resolution sampling.
  • tools/moss_eval.py --mode turbo | turbo_groups | turbo_files: few-step LoRAs against each other, which layer groups carry them, LoRA files at any prompt set, size or aspect (--height).
  • tools/moss_dmd_train.py: trains a few-step LoRA by DMD on one GPU (shared base, hooked LoRAs, regression term, gradient checkpointing, atomic checkpoints and resume); the turbo LoRAs come from it.
  • tools/moss_activations.py, tools/moss_bias_turbo.py, tools/moss_bias_fit.py: per-step biases in place of (or on top of) a few-step LoRA.
  • tools/moss_edit_train.py: trains a MOSS-Image LoRA on one GPU (flow matching, shift 5, gradient checkpointing, held-out previews, resumable checkpoints): an edit LoRA from reference / target pairs, or with --t2i a plain text-to-image LoRA from images and captions (style or identity).
  • tools/moss_edit_pairs.py: removal pairs for an own edit LoRA by reversed inpainting, checked by Qwen3.5-9B, with review sheets.
  • tools/moss_slider_train.py: image-free slider LoRAs (a direction between two prompt suffixes, or between image pairs the model renders itself).
  • tools/moss_dataset_inventory.py, tools/moss_forge_dataset.py: a read-only CSV inventory of image folders, and a text-to-image dataset picked from it, captioned by the MOSS text encoder.
  • tools/moss_qwen_dataset.py: daily Qwen-Image dataset batches (random prompts, renders, automatic checks, review sheets).
  • tools/moss_turbo_v10_prompts.py: the training prompts of Turbo v1.0.
  • tools/moss_baked_turbo_eval.py, tools/moss_v094_range_eval.py, tools/moss_v094_sft_heldout.py, tools/moss_v094_vs_v07_eval.py, tools/moss_v094_vs_v09_eval.py: the measurements behind the HaDeS MOSS v0.9.4 Turbo card (tools/RESULTS.md).
  • tools/make_examples.py: regenerates examples/ from the node definitions of a running ComfyUI.