Downloads · 30 days
0
0% of all-time downloads
sipeed/lcm-lora-sdv1-5-maixcam2
lcm-lora-sdv1-5-maixcam2 is a machine learning model from sipeed. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as bsd-3-clause.
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.
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
5
Public
Repo size
1.5 GB
Likes
0
Public
Click a slice to open those files.
.axmodel1.2 GB · 100%
From the Hugging Face model README
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 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 namelcm-lora-sdv1-5-maixcam2in 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 [email protected]:/root/models
Upload the model, and use MaixVision to run the following code to implement image-to-image and text-to-image tasks.
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()
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()
launcher.py to the boardscp -r lcm-lora-sdv1-5-maixcam2/launcher.py [email protected]:/root
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"
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"