--- tags: - text-to-image library_name: diffusers license: apache-2.0 --- # DMM: Building a Versatile Image Generation Model via Distillation-Based Model Merging
## Introduction We propose a score distillation based model merging paradigm DMM, compressing multiple models into a single versatile T2I model.  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: - [JuggernautReborn](https://civitai.com/models/46422) - [MajicmixRealisticV7](https://civitai.com/models/43331) - [EpicRealismV5](https://civitai.com/models/25694) - [RealisticVisionV5](https://civitai.com/models/4201) - [MajicmixFantasyV3](https://civitai.com/models/41865) - [MinimalismV2](https://www.liblib.art/modelinfo/8b4b7eb6aa2c480bbe65ca3d4625632d?from=personal_page&versionUuid=4b8e98cc17fc49ed826af941060ffd0b) - [RealCartoon3dV17](https://civitai.com/models/94809) - [AWPaintingV1.4](https://civitai.com/models/84476) ## Visualization  ### Results  ### Results combined with charactor LoRA  ### Results of interpolation between two styles  ## 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] ```