Instructions to use aoleg/MOSS-Sharpness-Slider with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use aoleg/MOSS-Sharpness-Slider with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("OpenMOSS-Team/MOSS-Image-Base", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("aoleg/MOSS-Sharpness-Slider") prompt = "A young woman in 1950s posing on a Cadillac, pinup style." image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
File size: 7,006 Bytes
1e9089f 5a98472 1e9089f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | ---
tags:
- text-to-image
- lora
- diffusers
- template:diffusion-lora
widget:
- output:
url: images/151716095-1636270155-moss_image_base_int8_convrot.png
text: A young woman in 1950s posing on a Cadillac, pinup style.
- output:
url: images/151716096-1636270156-moss_image_base_int8_convrot.png
text: A young woman in 1950s posing on a Cadillac, pinup style.
- output:
url: images/151716097-613179008-moss_image_base_int8_convrot.png
text: >-
Kodachrome film, man with short brown hair wearing a dark shirt and beige
overalls, standing in a dimly lit workshop. He is meticulously working on
the wooden nose of an antique, twin-engine aircraft with metal propellers.
The aircraft's polished wooden surface contrasts with the dark background,
highlighting the man's focused expression and skilled hands. , 1940s, B25
bomber, photo by Alfred Palmer
- output:
url: images/151716098-3872554109-moss_image_base_int8_convrot.png
text: >-
Kodachrome film, 1940s-style scene in a dimly lit workshop. A woman with
curly brown hair wearing a red blouse, black skirt and red bandana, kneels
beside a vintage olive-green truck. She holds a wrench and looks intently at
the truck's window, where a man with short dark hair, 1940s
- output:
url: images/151716099-3300073256-moss_image_base_int8_convrot.png
text: >-
Kodachrome film, 1940s-style woman with dark hair in a pink headband wearing
a white blouse, light blue capri pants and brown shoes with white socks. She
sits against large silver, riveted aircraft fuel tanks, holding a red
canister. An open black toolbox is on the ground to her right, 1940s, photo
by Alfred Palmer
- output:
url: images/151716100-4081148363-moss_image_base_int8_convrot.png
text: >-
Kodachrome film, Polynesian-themed restaurant with a yellow awning
displaying "POLYNESIAN RESTAURANT" in colorful letters. A tall, vertical
sign with "POKE" stands to the left. Leafless tree in the center, people in
winter clothes walking on the sidewalk and a streetlamp. Background includes
palm trees, 1960s
- output:
url: images/151716101-1649273751-moss_image_base_int8_convrot.png
text: >-
Kodachrome film, smiling middle-aged white man with short dark hair wearing
a light gray suit, white shirt and teal tie, holding a pointer stick. He
stands to the left, pointing at a large detailed, colorful aerial map behind
him, which depicts a park-like area with roads, buildings, green spaces, a
lake, trees, 1950s
- output:
url: images/151716102-2245860517-moss_image_base_int8_convrot.png
text: >-
Kodachrome film, elderly white couple standing beside a vibrant red vintage
convertible car with white-walled tires, parked on a gravel driveway in
front of a grand, white-columned mansion. The woman with short gray hair,
wears a navy blue sleeveless top and beige skirt, while the man, in a light
blue short-sleeve shirt, 1950s, photo by Toni Frissell, 35mm Kodachrome
- output:
url: images/151716103-3684661186-moss_image_base_int8_convrot.png
text: >-
Kodachrome film, two young women in a sunlit, modern outdoor setting. The
woman on the left has short blonde hair, wears sunglasses, a light beige
cardigan over a blue romper and brown flats. She stands with hands in
pockets, leaning slightly towards the other woman. On the right, the woman
with red hair wears a white, 1950s, photo by Toni Frissell, 35mm Kodachrome
- output:
url: images/151716105-1869421269-moss_image_base_int8_convrot.png
text: >-
DSLR, two young women in a sunlit, modern outdoor setting. The woman on the
left has short blonde hair, wears sunglasses, a light beige cardigan over a
blue romper and brown flats. She stands with hands in pockets, leaning
slightly towards the other woman. On the right, the woman with red hair
wears a white, 2020s
- output:
url: images/151716106-891512518-moss_image_base_int8_convrot.png
text: >-
Kodachrome film, vintage 1950s-style street scene featuring a red and white
striped "Lulu Belle" general store with ornate white trim. Two classic cars,
a white and a silver, are parked in front. A black car with red taillights
is partially visible in the foreground. The sky is overcast and the store,
1950s
- output:
url: images/151716107-4081738831-moss_image_base_int8_convrot.png
text: >-
Kodachrome film, 1940s-style nightclub scene. A blonde woman in a floral
dress sings passionately into a vintage microphone, standing on a table.
Seated around her are elegantly dressed men and women in formal attire,
sipping drinks. The background features red velvet curtains and the lighting
is warm, creating a nostalgic, glamorous atmosphere. , 1940s, photo by
William Gottlieb, MF Kodachrome
base_model: OpenMOSS-Team/MOSS-Image-Base
instance_prompt: null
license: apache-2.0
---
# MOSS Image Sharpness Slider
<Gallery />
## Model description
# MOSS-Image Sharpness Slider
A Concept Slider LoRA for MOSS-Image that moves an image between sharp and blurry by LoRA strength alone. Positive strength sharpens, negative strength blurs. No trigger word, no prompt changes.
IMPORTANT: Intended usage is deblurring the MOSS Base checkpoint. It will have a weaker effect on MOSS SFT, and almost none on SFT+Turbo. The reason is that SFT is already tuned to filter out the blur, and Turbo distills it further.
## Usage
Load as a regular LoRA on MOSS-Image Base or SFT. Start at 1.0 for sharper output and -1.0 for blur, then adjust. Strength 0 is the untouched model. No trigger word.
## Training
Trained with the `concept_slider` process in Ostris AI Toolkit on MOSS-Image Base (int8 convrot). The slider direction comes from the prompt pair; the dataset only supplies latents at both ends of the range.
- Dataset: 72 photos and the same 72 photos with Gaussian blur, 1024 px, uncaptioned. Default captions "sharp, in focus" and "blurry, out of focus".
- Positive prompt: "a sharp photo, perfectly in focus, crisp fine detail, clear edges"
- Negative prompt: "a blurry photo, blurred, out of focus, soft and smeared"
- Target class and anchor: empty. Guidance strength 3.
- LoRA rank 4, alpha 4. Layer 22 excluded from the LoRA; it is the skip-layer guidance block for MOSS, and `uncond_skip_layers: [22]` during training.
- lr 0.001, adamw8bit, weight decay 0.001, EMA 0.99, batch 1, flowmatch with shift timesteps, bf16.
- This is the step 400 checkpoint. Steps 350 and below had not converged; 400 gives the full effect without visible overfitting.
## Notes
Each slider step runs several passes of the base model, so training is about 3x slower per image than a regular MOSS LoRA. 400 steps took well under two hours on a single consumer GPU.
## Download model
[Download](/aoleg/MOSS-Sharpness-Slider/tree/main) them in the Files & versions tab.
|