Expand description
§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",
);
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(())
}Structs§
- Channel
Image Stream - A stream of images from a tokio channel.
- Image
- An image generated by the model
- Wuerstchen
- A quantized wuerstchen image diffusion model
- Wuerstchen
Builder - A builder for the Wuerstchen model.
- Wuerstchen
Inference Settings - Settings for running inference with the Wuerstchen model.
Enums§
- Model
Loading Progress - The progress starting a model