#
## 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: [HiDream-ai/HiDream-O1-Image](https://modelscope.ai/models/HiDream-ai/HiDream-O1-Image)
* Training Code: [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio)
* Data amount:82
* Total training steps:6000
* License: Apache-2.0
## Inference Code
Install [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio):
```bash
pip install diffsynth
```
Inference:
```python
from diffsynth.pipelines.hidream_o1_image import HiDreamO1ImagePipeline, ModelConfig
import torch
pipe = HiDreamO1ImagePipeline.from_pretrained(
torch_dtype=torch.bfloat16,
device="cuda",
model_configs=[
ModelConfig(model_id="HiDream-ai/HiDream-O1-Image", origin_file_pattern="*.safetensors"),
],
processor_config=ModelConfig(model_id="HiDream-ai/HiDream-O1-Image"),
)
pipe.load_lora(pipe.dit, ModelConfig(model_id="RamenBowl/LoriVCHiV1DreamD32A16", origin_file_pattern="LoriVCHiV1DreamD32A16_c1-st6000.safetensors"))
prompt = "a cat"
image = pipe(prompt=prompt, num_inference_steps=30, cfg_scale=4)
image.save("image.jpg")
```
