moss-qwen3.5-2b-upsampler-v2-bf16
Image Generation Prompt Upsampler
2 min read
The moss-qwen3.5-2b-upsampler-v2-bf16 model is a standalone BF16 (low-precision data type) fine-tuned model based on huihui-ai/Huihui-Qwen3.5-2B-abliterated. It is trained to expand simple text prompts into detailed, vivid descriptions for image generation. Version 2 features a doubled dataset cleaned of contradictions and censorship, along with balanced visual domains and improved text rendering. The model is ideal for local image generation pipelines, helping quickly turn short ideas into detailed descriptions.
Key features
- Expanded dataset: Trained on 12,000 examples processed through DeepSeek-V4.1-Flash evaluation.
- Uncensored: Censorship restrictions and hidden filtering traces completely removed (0% refusal rate in tests).
- Domain balance: Added categories for accurate text preservation in images and dark art styles.
- Lightweight: Based on a 2.21 billion parameter model and easily quantized for limited VRAM environments.
What you can do
- Prompt enhancement: Integrate the model into generative pipelines (such as ComfyUI) to automatically expand short user prompts before sending them to the diffusion model.
- Text generation: Leverage improved typography and design capabilities to create images with clear text.
- Local execution: Run the model on modest hardware or deploy a quantized version alongside heavy image generators, unloading it from VRAM after processing the prompt.
Example
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "NidAll/moss-qwen3.5-2b-upsampler-v2-bf16"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto")
messages = [
{"role": "system", "content": "Expand the user prompt into a rich, vivid image generation prompt. Output only the final prompt."},
{"role": "user", "content": "vintage diner neon sign reading \"OPEN LATE\" in heavy fog"},
]
prompt = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=False)
inputs = processor(text=[prompt], return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512, do_sample=True, temperature=0.6, top_p=0.9, repetition_penalty=1.05)
print(processor.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True).strip())Read more
DetailsFinal validation loss dropped to 1.4435 (compared to 1.5398 in the first version).
Censorship tests showed a 0% refusal rate (0/30 tested prompts blocked).
Training used LoRA (r=32, alpha=64) exclusively on language attention layers and MLPs, leaving the visual encoder completely frozen.
Easily quantized to INT8 or Q8_0 (~2.2 GB) for smooth execution on a single Tesla T4 or equivalent consumer graphics card.










Comments