---
title: MidnightHour-Qwen-2
canonical_url: "https://www.modelscope.ai/models/tensorvizion/MidnightHour-Qwen-2"
md_url: "https://www.modelscope.ai/models/tensorvizion/MidnightHour-Qwen-2.md"
repository: tensorvizion/MidnightHour-Qwen-2
last_updated: 2026-07-31
license: "Apache License 2.0"
pipeline_tag: text-to-image-synthesis
tasks:
  - text-to-image-synthesis
base_model:
  - Qwen/Qwen-Image-2512
base_model_relation: adapter
parameters: 943.7M
tensor_type:
  - BF16
library_name:
  - pytorch
  - lora
  - safetensors
supports_inference: txt2img
downloads: 106
stars: 0
tags:
  - LoRA
  - text-to-image
---

# MidnightHour-Qwen-2

> MidnightHour-Qwen-2 - An open-source model by tensorvizion on ModelScope. This model is trained using the Civision/model training environment and computing resources provided by ModelScope.

tensorvizion/MidnightHour-Qwen-2 is a 943.7M-parameter text-to-image-synthesis model on ModelScope. licensed under Apache License 2.0. derived from Qwen/Qwen-Image-2512. and supports online inference (txt2img).

- **Repository**: tensorvizion/MidnightHour-Qwen-2
- **License**: Apache License 2.0
- **Tasks**: text-to-image-synthesis
- **Parameters**: 943.7M
- **Base model**: Qwen/Qwen-Image-2512
- **Online inference**: txt2img
- **Tags**: LoRA, text-to-image
- **Downloads**: 106
- **Stars**: 0
- **Last updated**: 2026-07-31

Source: https://www.modelscope.ai/models/tensorvizion/MidnightHour-Qwen-2

---

# 

## Model Introduction

This model is trained using the [Civision/model training](https://modelscope.ai/civision/modelTraining) environment and computing resources provided by ModelScope.

* Model Type: LoRA
* Base Model: [Qwen/Qwen-Image-2512](https://modelscope.ai/models/Qwen/Qwen-Image-2512)
* Training Code: [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio)
* Data amount：26
* Total training steps：4000
* License: Apache-2.0

## Inference Code

Install [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio):

```bash
pip install diffsynth
```

Inference:

```python
from diffsynth.pipelines.qwen_image import QwenImagePipeline, ModelConfig
import torch

pipe = QwenImagePipeline.from_pretrained(
    torch_dtype=torch.bfloat16,
    device="cuda",
    model_configs=[
        ModelConfig(model_id="Qwen/Qwen-Image-2512", origin_file_pattern="transformer/diffusion_pytorch_model*.safetensors"),
        ModelConfig(model_id="Qwen/Qwen-Image", origin_file_pattern="text_encoder/model*.safetensors"),
        ModelConfig(model_id="Qwen/Qwen-Image", origin_file_pattern="vae/diffusion_pytorch_model.safetensors"),
    ],
    tokenizer_config=ModelConfig(model_id="Qwen/Qwen-Image", origin_file_pattern="tokenizer/"),
)
pipe.load_lora(pipe.dit, ModelConfig(model_id="tensorvizion/MidnightHour-Qwen-2", origin_file_pattern="MidnightHour-Qwen-2_c1-st4000.safetensors"))
prompt = "a cat"
image = pipe(prompt)
image.save("image.jpg")
```
