Hybrid SD: Edge-Cloud Collaborative Inference for Stable Diffusion Models
Paper • 2408.06646 • Published • 1
How to use cqyan/hybrid-sd-v1-4-lcm-224m with Diffusers:
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("cqyan/hybrid-sd-v1-4-lcm-224m", dtype=torch.bfloat16, device_map="cuda")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]Hybrid-SD-LCM-224M is an architecturally compressed LCM for efficient general-purpose text-to-image synthesis. This model is constructed by removing unimportant structural parameters in the ResNet blocks and Attention blocks, and is obtained based on bk-sdm-tiny.
@article{yan2024hybrid,
title={Hybrid SD: Edge-Cloud Collaborative Inference for Stable Diffusion Models},
author={Yan, Chenqian and Liu, Songwei and Liu, Hongjian and Peng, Xurui and Wang, Xiaojian and Chen, Fangming and Fu, Lean and Mei, Xing},
journal={arXiv preprint arXiv:2408.06646},
year={2024}
}