CoolFace
Modelpublic

MCG-NJU/DMM

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
16likes63downloads
Model Card

DMM: Building a Versatile Image Generation Model via Distillation-Based Model Merging

<div style="text-align: center;"> <a href="https://arxiv.org/abs/2504.12364"><img src="https://img.shields.io/badge/arXiv-2504.12364-b31b1b.svg" alt="arXiv"></a> <a href="https://huggingface.co/papers/2504.12364"><img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/paper-page-sm.svg" alt="Paper page"></a> </div>

Introduction

We propose a score distillation based model merging paradigm DMM, compressing multiple models into a single versatile T2I model. [image]

This checkpoint merges pre-trained models from many different domains, including realistic style, Asian portrait, anime style, illustration, etc. Specifically, the source models are listed below:

Visualization

[image]

Results

[image]

Results combined with charactor LoRA

[image]

Results of interpolation between two styles

[image]

Online Demo

https://huggingface.co/spaces/MCG-NJU/DMM .

Usage

Please refer to https://github.com/MCG-NJU/DMM .

python
import torch
from modeling.dmm_pipeline import StableDiffusionDMMPipeline

pipe = StableDiffusionDMMPipeline.from_pretrained("path/to/pipeline/checkpoint", torch_dtype=torch.float16, use_safetensors=True)
pipe = pipe.to("cuda")

# select model index
model_id = 5
output = pipe(
    prompt="portrait photo of a girl, long golden hair, flowers, best quality",
    negative_prompt="worst quality,low quality,normal quality,lowres,watermark,nsfw",
    width=512,
    height=512,
    num_inference_steps=25,
    guidance_scale=7,
    model_id=model_id,
).images[0]