axiomofmind/Moss-image-beauty-lora

Source: 🤗text-to-imageapache-2.0186 MBother✓ 27 checksumsupdated today
or submit a torrent

Moss Image Beauty LoRA

A portrait and beauty-photography LoRA for MOSS-Image-SFT or MOSS-Image-Base, with MOSS-Image-SFT preferred for inference. It emphasizes polished close portraits, softly directed light, detailed skin and hair, restrained backgrounds, and editorial beauty photography.

A GGUF conversion is also available here: https://huggingface.co/axiomofmind/Moss-image-beauty-lora-GGUF which can be used with MOSS-Image-SFT-GGUF

Recommended settings

  • Trigger: moss_beauty_style
  • Preferred underlying model: OpenMOSS-Team/MOSS-Image-SFT
  • Also compatible with: OpenMOSS-Team/MOSS-Image-Base
  • Recommended LoRA scale: 1.0
  • Inference steps: 30
  • Guidance scale: 3.0
  • Resolution: 1024 x 1024
  • Negative prompt: empty

Place the trigger at the beginning of the prompt. Scale 1.0 produced the preferred balance of the learned portrait treatment and prompt fidelity during local evaluation. Scale 0.7, 0.8, and 0.9 were also tested and performed well.

The adapter was trained against MOSS-Image-Base, which remains the training parent recorded in adapter_config.json. Its transformer targets are compatible with MOSS-Image-SFT, and SFT + LoRA produced the preferred evaluation results. Every LoRA image below uses this exact 2,000-step checkpoint, image seed 42, 30 inference steps, guidance scale 3.0, and 1024 x 1024 resolution.

ComfyUI compatibility

The root pytorch_lora_weights.safetensors file uses Diffusers / PEFT key names and is intended for the Diffusers workflow. ComfyUI's native MOSS-Image model uses a different internal key namespace, so loading that file directly can produce lora key not loaded warnings.

For native ComfyUI, download MOSS-Image-Beauty-LoRA-ComfyUI.safetensors. It contains the same 504 LoRA tensors and weights as the root adapter, with only the key prefix changed from transformer.layers... to diffusion_model.layers....

File Size Tensors SHA-256
MOSS-Image-Beauty-LoRA-ComfyUI.safetensors 70.93 MiB 504 cc180d2bd0344551228d3e2def01f1e0f51896bf94f406c4e378cdfe8b1210b4
  1. Update ComfyUI to commit b1a247c or newer, which includes native MOSS-Image support.
  2. Put the ComfyUI file in ComfyUI/models/loras/.
  3. Load it with the standard LoRA loader using model strength 1.0 and CLIP strength 0.0.
  4. Begin the prompt with moss_beauty_style.
hf download axiomofmind/Moss-image-beauty-lora \
  MOSS-Image-Beauty-LoRA-ComfyUI.safetensors \
  --local-dir ./ComfyUI/models/loras

The rekeying is namespace-only: tensor shapes, dtypes, and values are unchanged. The included scripts/convert_moss_lora_for_comfyui.py script documents and reproduces the conversion. The separate GGUF adapter linked above is for stable-diffusion.cpp, not ComfyUI's native LoRA loader.

Featured stock and scale-1.0 comparison

Each row uses the same descriptive prompt, image seed 42, 1024 x 1024 resolution, 30 inference steps, and guidance scale 3.0. The stock column uses MOSS-Image-SFT without a LoRA and with the trigger removed. The LoRA column uses MOSS-Image-SFT plus this exact 2,000-step checkpoint at scale 1.0.

Prompt Stock MOSS-Image-SFT MOSS-Image-SFT + LoRA, scale 1.0
1 — dark hair and freckles
2 — black turtleneck portrait
3 — velvet coat portrait

Prompts

  1. moss_beauty_style, a close portrait of a young woman with dark brown skin and freckles, her dark hair framing her face as she gazes forward with light brown eyes and neutral expression, wearing a black garment with soft directional light highlighting her skin and lips.
  2. moss_beauty_style, a young woman with fair skin and freckles wears a black turtleneck, her dark hair pulled back with loose strands framing her face, as she gazes directly at the camera with a neutral expression under soft, even studio lighting against a plain gray background.
  3. moss_beauty_style, a young woman with fair skin and dark brown hair parted in the middle, her bangs framing a direct gaze with light blue eyes and subtle freckles, wears a black velvet coat with a high collar, her lips neutral and skin softly lit against a blurred neutral background.

Base + LoRA, stock SFT, and SFT + LoRA comparison

This controlled comparison uses three additional prompts with the same image seed 42, 1024 x 1024 resolution, 30 inference steps, and guidance scale 3.0 in all columns. The first column uses MOSS-Image-Base plus the exact 2,000-step checkpoint at scale 0.7. The stock column uses MOSS-Image-SFT without a LoRA and with the trigger removed. The last two columns use MOSS-Image-SFT plus the same checkpoint at scales 0.7 and 1.0. Every LoRA column includes moss_beauty_style.

Prompt MOSS-Image-Base + LoRA, scale 0.7 Stock MOSS-Image-SFT MOSS-Image-SFT + LoRA, scale 0.7 MOSS-Image-SFT + LoRA, scale 1.0
1 — loose updo portrait
2 — windswept freckles portrait
3 — dark curls and lace portrait

Comparison prompts

  1. moss_beauty_style, a young woman with warm brown skin and dark brown hair styled in a loose updo with soft tendrils framing her face, wearing subtle makeup with defined brows, brown eyes, and a nude lip, posed in a close-up against a plain white background with soft directional lighting highlighting her natural skin texture.
  2. moss_beauty_style, a young woman with fair skin and freckles gazes forward with long brown hair blowing across her face, wearing a rust-colored top against a bright sky with warm directional sunlight.
  3. moss_beauty_style, a young woman with fair skin and dark wavy hair styled in loose curls frames her face, wearing a black high-necked garment with lace trim and puffed sleeves, her gaze direct and expression neutral against a plain light gray background under soft directional lighting.

Additional stock SFT and Base + LoRA comparisons

These additional examples use the same image seed 42, 1024 x 1024 resolution, 30 inference steps, and guidance scale 3.0. The stock column uses MOSS-Image-SFT without a LoRA and with the trigger removed. The LoRA column uses MOSS-Image-Base plus the exact 2,000-step checkpoint at scale 0.7 and includes moss_beauty_style.

Prompt Stock MOSS-Image-SFT MOSS-Image-Base + LoRA, scale 0.7
1 — straight black hair and freckles
2 — blonde portrait with freckles

Additional prompts

  1. moss_beauty_style, a young woman with long straight black hair parted in the middle, light freckles across her nose and cheeks, and warm brown eyes gazes directly at the camera with a neutral expression, her lips coated in soft pink gloss, strands of hair drifting across her forehead against a plain light background under soft directional light.
  2. moss_beauty_style, a young woman with fair skin and scattered freckles gazes directly forward with light blue eyes and a neutral expression, her blonde hair pulled back with loose strands framing her face, wearing a soft pink lip and a white top against a plain light background under soft, even studio lighting.

Use with Diffusers and PEFT

MOSS-Image uses a custom Diffusers pipeline. Attach the adapter to its transformer with PEFT:

import json

import torch
from diffusers import DiffusionPipeline
from huggingface_hub import hf_hub_download
from peft import LoraConfig, inject_adapter_in_model, set_peft_model_state_dict
from peft.tuners.lora.layer import LoraLayer
from safetensors.torch import load_file

repo_id = "axiomofmind/Moss-image-beauty-lora"
base_model = "OpenMOSS-Team/MOSS-Image-SFT"  # Preferred; Base is also supported.
lora_scale = 1.0

config_path = hf_hub_download(repo_id, "adapter_config.json")
weights_path = hf_hub_download(repo_id, "pytorch_lora_weights.safetensors")

with open(config_path, encoding="utf-8") as file:
    config = json.load(file)

pipe = DiffusionPipeline.from_pretrained(
    base_model,
    custom_pipeline="pipeline_moss_image",
    trust_remote_code=True,
    torch_dtype={"default": torch.bfloat16, "vae": torch.float32},
)
pipe.scheduler = type(pipe.scheduler).from_config(pipe.scheduler.config)

inject_adapter_in_model(
    LoraConfig(
        r=config["r"],
        lora_alpha=config["lora_alpha"],
        target_modules=config["target_modules"],
    ),
    pipe.transformer,
)

state = {
    key.removeprefix("transformer."): value
    for key, value in load_file(weights_path, device="cpu").items()
}
_, unexpected = set_peft_model_state_dict(pipe.transformer, state)
if unexpected:
    raise RuntimeError(f"Unexpected LoRA tensors: {unexpected[:5]}")

for layer in pipe.transformer.modules():
    if isinstance(layer, LoraLayer):
        layer.set_scale("default", lora_scale)

pipe.transformer.to(torch.bfloat16)
pipe.to("cuda")

prompt = (
    "moss_beauty_style, a close portrait of an adult woman with dark brown "
    "skin and freckles, soft directional studio light, neutral background."
)

image = pipe(
    prompt,
    negative_prompt="",
    width=1024,
    height=1024,
    num_inference_steps=30,
    guidance_scale=3.0,
    uncond_skip_layers=[22],
    generator=torch.Generator("cpu").manual_seed(42),
).images[0]

image.save("moss_beauty.png")

Training details

  • Training base model: OpenMOSS-Team/MOSS-Image-Base
  • Preferred inference model: OpenMOSS-Team/MOSS-Image-SFT
  • Alternate inference model: OpenMOSS-Team/MOSS-Image-Base
  • Selected checkpoint: 2,000 steps
  • Training images: 176
  • Resolution: 1024
  • LoRA rank / alpha: 16 / 16
  • Target modules: transformer attention projections and feed-forward projections
  • Optimizer: AdamW
  • Learning rate: 1e-4
  • Scheduler: constant with warmup
  • Batch size / gradient accumulation: 1 / 1
  • Weight decay: 0.01
  • Training seed: 42
  • Caption dropout: 0
  • Random horizontal flip: disabled
  • Training environment: local hardware

Checkpoint selection compared steps 1,000, 1,250, 1,500, 1,750, and 2,000 using fixed prompts and seeds with both Base + LoRA and SFT + LoRA. The 2,000-step checkpoint with SFT was selected for publication. The comparison examples above include LoRA scales 0.7 and 1.0.

Intended use and limitations

This adapter is intended for creative adult portrait, editorial, fashion, and beauty-photography generation. The training set is portrait-dominant and adult-only, so the adapter may generalize less reliably to children, groups, full-body scenes, landscapes, objects, text, or non-photographic styles. Like other generative models, it may reproduce demographic and aesthetic biases present in its training data and underlying model. Generated people are synthetic and should not be represented as real individuals.

The training set was curated locally from 176 captioned portrait images. The dataset only include the female form and has not been tested on male form.

License

The adapter files are provided under the Apache License 2.0, matching the MOSS base model. This is an independent community LoRA and is not an official OpenMOSS release. The license does not grant rights to third-party source material, trademarks, or depicted persons.