Function init_sd_context_with_full_model

Source
pub fn init_sd_context_with_full_model(
    model_file: impl AsRef<str>,
    lora_model_dir: Option<&str>,
    controlnet_path: Option<&str>,
    controlnet_on_cpu: bool,
    clip_on_cpu: bool,
    vae_on_cpu: bool,
    n_threads: i32,
    task: StableDiffusionTask,
) -> Result<(), LlamaCoreError>
Expand description

Initialize the stable-diffusion context with the given full diffusion model

ยงArguments

  • model_file - Path to the stable diffusion model file.

  • lora_model_dir - Path to the Lora model directory.

  • controlnet_path - Path to the controlnet model file.

  • controlnet_on_cpu - Whether to run the controlnet on CPU.

  • clip_on_cpu - Whether to run the CLIP on CPU.

  • vae_on_cpu - Whether to run the VAE on CPU.

  • n_threads - Number of threads to use.

  • task - The task type to perform.