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 StreamExt;
use *;
async
RWuerstchen is a rust wrapper for library for Wuerstchen implemented in the Candle ML framework.
RWuerstchen generates images efficiently from text prompts.
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",
);
let 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(())
}