Skip to content

Commit 9001667

Browse files
committed
* add lcm-lora-sdv1-5 doc
1 parent 3f798f8 commit 9001667

File tree

5 files changed

+132
-1
lines changed

5 files changed

+132
-1
lines changed

docs/doc/en/mllm/lm_lora_sdv1_5.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: Running the LCM-LoRA-SDv1-5 Model on MaixPy MaixCAM
3+
update:
4+
- date: 2025-12-03
5+
author: lxowalle
6+
version: 1.0.0
7+
content: Added LCM-LoRA-SDv1-5 code and documentation
8+
---
9+
10+
## Supported Devices
11+
12+
| Device | Supported |
13+
| -------- | ------- |
14+
| MaixCAM2 ||
15+
| MaixCAM ||
16+
17+
18+
## Introduction to the LCM-LoRA-SDv1-5 Model
19+
20+
LCM-LoRA-SDv1-5 is a model that supports text-to-image and image-to-image generation, based on the StableDiffusion 1.5 LCM project. With this model, you can generate conceptual images for artistic creation—simply provide a text description, and the model will generate an image based on it.
21+
22+
## Running the LCM-LoRA-SDv1-5 Model on MaixPy MaixCAM
23+
24+
### Model and Download Link
25+
26+
If the `LCM-LoRA-SDv1-5` model is not present in the system directory `/root/models` by default, you need to download it manually.
27+
28+
* Memory requirement: CMM memory 1 GiB. For details, refer to the [Memory Usage Documentation](../pro/memory.md)
29+
30+
* Download link: https://huggingface.co/sipeed/lcm-lora-sdv1-5-maixcam2
31+
32+
For the download method, refer to the instructions in the [Qwen documentation](../pro/memory.md)
33+
34+
### Running the Model
35+
36+
Refer to `launcher.py` in the model directory to run the model.
37+
38+
#### Text-to-Image
39+
```shell
40+
cd lcm-lora-sdv1-5-maixcam2
41+
python3 launcher.py --isize 256 --model_dir ax620e_models/ -o "ax620e_txt2img_axe.png" --prompt "a white dog"
42+
```
43+
44+
Parameter description:
45+
- `--isize`: Input image size, recommended value is 256
46+
- `--model_dir`: Model directory
47+
- `-o`: Output image filename
48+
- `--prompt`: Description text; the model generates an image based on this description
49+
50+
#### Image-to-Image
51+
```shell
52+
cd lcm-lora-sdv1-5-maixcam2
53+
python3 launcher.py --init_image ax620e_models/img2img-init.png --isize 256 --model_dir ax620e_models/ --seed 1 --prompt "Change to black clothes" -o "ax620e_img2img_axe.png"
54+
```
55+
56+
Parameter description:
57+
- `--init_image`: Initial image; the model generates a new image based on this
58+
- `--isize`: Input image size, recommended value is 256
59+
- `--model_dir`: Model directory
60+
- `--seed`: Random seed, controls randomness during image generation
61+
- `-o`: Output image filename
62+
- `--prompt`: Description text; the model generates an image based on this description
63+
64+

docs/doc/en/sidebar.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ items:
124124
label: InternVL Vision-Language Model
125125
- file: mllm/vlm_qwen3.md
126126
label: Qwen3-VL Vision-Language Model
127+
- file: mllm/lm_lora_sdv1_5.md
128+
label: LCM-LoRA-SDv1-5 Model
127129

128130
- label: AI Model Convertion and Port
129131
items:

docs/doc/zh/mllm/llm_deepseek.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ update:
1919

2020
近年来大语言模型(LLM)非常火,给工作生活带来了很大的便利,使用LLM,我们可以跟其对话,从聊天到专业指导都能胜任。
2121

22-
DeepSeek-R1 是深势科技(DeepSeek-AI)研发的大语言模型(LLM),具备思考功能,功能和 Qwen 类似。
22+
DeepSeek-R1 是深度科技(DeepSeek-AI)研发的大语言模型(LLM),具备思考功能,功能和 Qwen 类似。
2323

2424
同样也根据参数量分为很多版本,比如 72B 32B 7B 1.5B 等,对于 MaixCAM2 由于内存和算力限制只能跑到 1.5B。
2525

docs/doc/zh/mllm/lm_lora_sdv1_5.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: MaixPy MaixCAM 运行 LCM-LoRA-SDv1-5 模型
3+
update:
4+
- date: 2025-12-03
5+
author: lxowalle
6+
version: 1.0.0
7+
content: 新增 LCM-LoRA-SDv1-5 代码和文档
8+
---
9+
10+
## 支持的设备
11+
12+
| 设备 | 是否支持 |
13+
| -------- | ------- |
14+
| MaixCAM2 ||
15+
| MaixCAM ||
16+
17+
18+
## LCM-LoRA-SDv1-5 模型简介
19+
20+
LCM-LoRA-SDv1-5 是一个支持文生图, 图生图的模型, 基于 StableDiffusion 1.5 LCM 项目. 我们可以通过这个模型来生成艺术创作的概念图, 只需要输入一段图片的描述文字, 模型便可以基于描述生成一张图片.
21+
22+
## 在 MaixPy MaixCAM 运行 LCM-LoRA-SDv1-5 模型
23+
24+
### 模型和下载地址
25+
26+
默认系统`/root/models`目录下如果没有`LCM-LoRA-SDv1-5`模型,需要自行下载。
27+
28+
* 内存需求:CMM 内存 1GiB,内存解释请看[内存使用文档](../pro/memory.md)
29+
* 下载地址:https://huggingface.co/sipeed/lcm-lora-sdv1-5-maixcam2
30+
31+
下载方法参考[Qwen 文档](./llm_qwen.md) 里面的下载方法。
32+
33+
### 运行模型
34+
35+
请参考模型文件中的`launcher.py`来运行模型.
36+
37+
#### 文生图
38+
```shell
39+
cd lcm-lora-sdv1-5-maixcam2
40+
python3 launcher.py --isize 256 --model_dir ax620e_models/ -o "ax620e_txt2img_axe.png" --prompt "a white dog"
41+
```
42+
43+
参数说明:
44+
- `--isize`: 输入图片的尺寸, 推荐填写256
45+
- `--model_dir`: 模型目录
46+
- `-o`: 输出图片名称
47+
- `--prompt`: 描述文字, 模型基于这里的描述生成图片
48+
49+
#### 图生图
50+
```shell
51+
cd lcm-lora-sdv1-5-maixcam2
52+
python3 launcher.py --init_image ax620e_models/img2img-init.png --isize 256 --model_dir ax620e_models/ --seed 1 --prompt "Change to black clothes" -o "ax620e_img2img_axe.png"
53+
```
54+
55+
参数说明:
56+
- `--init_image`: 初始图片, 模型基于这个图片生成图片
57+
- `--isize`: 输入图片的尺寸, 推荐填写256
58+
- `--model_dir`: 模型目录
59+
- `--seed`: 随机种子, 代表图片生成时的随机性
60+
- `-o`: 输出图片名称
61+
- `--prompt`: 描述文字, 模型基于这里的描述生成图片
62+
63+

docs/doc/zh/sidebar.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ items:
125125
label: InternVL 视觉语言模型
126126
- file: mllm/vlm_qwen3.md
127127
label: Qwen3-VL 视觉语言模型
128+
- file: mllm/lm_lora_sdv1_5.md
129+
label: LCM-LoRA-SDv1-5 模型
128130

129131
- label: AI 模型转换和移植
130132
items:

0 commit comments

Comments
 (0)