SD1.5-LCM

Introduction

This repository currently only supports the 4G memory platform MaixCAM2, which is used to implement image-to-image and text-to-image tasks, and supports 256x256 resolution.

Upload the model

Upload this model folder lcm-lora-sdv1-5-maixcam2 to the device, generally upload to /root/models directory.

The repository is named lcm-lora-sdv1-5-maixcam2, and the file with the same name lcm-lora-sdv1-5-maixcam2 in the repository is the actual model file used. Get the IP address of the board method see here for details.

Use the scp command to upload the model (192.168.1.100 is the IP address of the device):

scp -r lcm-lora-sdv1-5-maixcam2/lcm-lora-sdv1-5-maixcam2 root@192.168.1.100:/root/models

Method 1 (depends on MaixPy version 4.12.5 or later)

Upload the model, and use MaixVision to run the following code to implement image-to-image and text-to-image tasks.

Text-to-Image

from maix import sdv1_5

model = sdv1_5.SDV1_5("/root/models/lcm-lora-sdv1-5-maixcam2/model.mud")
model.init()
model.refer(prompt="A white dog.", save_path="/root/text2img.jpg")

model.deinit()

Image-to-Image

from maix import sdv1_5

model = sdv1_5.SDV1_5("/root/models/lcm-lora-sdv1-5-maixcam2/model.mud")
model.init(img2img=True)
model.refer(prompt="Replace the dog with a cat.", init_image_path="/root/text2img.jpg", seed=1, save_path="/root/img2img.jpg")

model.deinit()

Method 2 (does not depend on MaixPy)

Upload launcher.py to the board

scp -r lcm-lora-sdv1-5-maixcam2/launcher.py root@192.168.1.100:/root

Text-to-Image

Login to the board's terminal and execute the following command to start the text-to-image task:

cd /root
python3 launcher.py --isize 256 --model_dir /root/models/lcm-lora-sdv1-5-maixcam2/ -o "ax620e_txt2img_axe.png" --prompt "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k"

Image-to-Image

Login to the board's terminal and execute the following command to start the image-to-image task:

cd /root
python3 launcher.py --init_image /root/models/lcm-lora-sdv1-5-maixcam2/img2img-init.png --isize 256 --model_dir /root/models/lcm-lora-sdv1-5-maixcam2/ --seed 1 --prompt "Astronauts in a jungle, cold color palette, muted colors, detailed, 8k" -o "ax620e_img2img_axe.png"
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for sipeed/lcm-lora-sdv1-5-maixcam2

Finetuned
(2)
this model