5 unstable releases
0.3.2 | Aug 14, 2024 |
---|---|
0.3.0 | Aug 13, 2024 |
0.2.1 | Feb 28, 2024 |
0.2.0 | Feb 18, 2024 |
0.1.0 | Dec 16, 2023 |
#772 in Images
319 downloads per month
Used in 2 crates
(via kalosm-vision)
180KB
4K
SLoC
RWuerstchen
RWuerstchen is a rust wrapper for library for Wuerstchen implemented in the Candle ML framework.
RWuerstchen generates images efficiently from text prompts.
Usage
use futures_util::StreamExt;
use rwuerstchen::*;
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let model = Wuerstchen::builder().build().await?;
let settings = WuerstchenInferenceSettings::new(
"a cute cat with a hat in a room covered with fur with incredible detail",
);
if let Ok(mut images) = model.run(settings) {
while let Some(image) = images.next().await {
if let Some(buf) = image.generated_image() {
buf.save(&format!("{}.png",image.sample_num()))?;
}
}
}
Ok(())
}
Dependencies
~34–55MB
~1M SLoC