mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 19:18:50 +00:00

* Start adding a stable-diffusion example. * Proper computation of the causal mask. * Add the chunk operation. * Work in progress: port the attention module. * Add some dummy modules for conv2d and group-norm, get the attention module to compile. * Re-enable the 2d convolution. * Add the embeddings module. * Add the resnet module. * Add the unet blocks. * Add the unet. * And add the variational auto-encoder. * Use the pad function from utils.
31 lines
474 B
Rust
31 lines
474 B
Rust
#[cfg(feature = "mkl")]
|
|
extern crate intel_mkl_src;
|
|
|
|
mod attention;
|
|
mod clip;
|
|
mod embeddings;
|
|
mod resnet;
|
|
mod unet_2d;
|
|
mod unet_2d_blocks;
|
|
mod utils;
|
|
mod vae;
|
|
|
|
use anyhow::Result;
|
|
use clap::Parser;
|
|
|
|
#[derive(Parser, Debug)]
|
|
#[command(author, version, about, long_about = None)]
|
|
struct Args {
|
|
/// Run on CPU rather than on GPU.
|
|
#[arg(long)]
|
|
cpu: bool,
|
|
|
|
#[arg(long)]
|
|
prompt: String,
|
|
}
|
|
|
|
fn main() -> Result<()> {
|
|
let _args = Args::parse();
|
|
Ok(())
|
|
}
|