Views
No views yet
4G memory platform MaixCAM2, which is used to implement image-to-image and text-to-image tasks, and supports 320x320 resolution.lcm-lora-sdv1-5-320x320-maixcam2 to the device, generally upload to /root/models directory.The repository is namedlcm-lora_sdv1-5-320x320-maixcam2, and the file with the same namelcm-lora-sdv1-5-320x320-maixcam2in the repository is the actual model file used. Get the IP address of the board method see here for details.
scp command to upload the model (192.168.1.100 is the IP address of the device):scp -r lcm-lora-sdv1-5-320x320-maixcam2/lcm-lora-sdv1-5-320x320-maixcam2 root@192.168.1.100:/root/models1from maix import sdv1_5
2
3model = sdv1_5.SDV1_5("/root/models/lcm-lora-sdv1-5-320x320-maixcam2/model.mud")
4model.init()
5model.refer(prompt="A white dog.", save_path="/root/text2img.jpg")
6
7model.deinit()1from maix import sdv1_5
2
3model = sdv1_5.SDV1_5("/root/models/lcm-lora-sdv1-5-320x320-maixcam2/model.mud")
4model.init(img2img=True)
5model.refer(prompt="Replace the dog with a cat.", init_image_path="/root/text2img.jpg", seed=1, save_path="/root/img2img.jpg")
6
7model.deinit()launcher.py to the boardscp -r lcm-lora-sdv1-5-320x320-maixcam2/launcher.py root@192.168.1.100:/root1cd /root
2python3 launcher.py --isize 320 --model_dir /root/models/lcm-lora-sdv1-5-320x320-maixcam2/ -o "ax620e_txt2img_axe.png" --prompt "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k"1cd /root
2python3 launcher.py --init_image /root/models/lcm-lora-sdv1-5-320x320-maixcam2/img2img-init.png --isize 320 --model_dir /root/models/lcm-lora-sdv1-5-320x320-maixcam2/ --seed 1 --prompt "Astronauts in a jungle, cold color palette, muted colors, detailed, 8k" -o "ax620e_img2img_axe.png"