From adfed2b616bd26ba239fd25ca7f611e76e49ea35 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sun, 23 Mar 2025 23:59:20 -0400 Subject: [PATCH] debug --- .../src/ml/stable_diffusion/infer_clip_text_embeddings.rs | 2 ++ .../src-tauri/src/endpoints/realtime_image_endpoint.rs | 5 +++-- .../src-tauri/src/endpoints/text_to_image_endpoint.rs | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/desktop/ml_models/src/ml/stable_diffusion/infer_clip_text_embeddings.rs b/crates/desktop/ml_models/src/ml/stable_diffusion/infer_clip_text_embeddings.rs index 6808598252..4c1591bc44 100644 --- a/crates/desktop/ml_models/src/ml/stable_diffusion/infer_clip_text_embeddings.rs +++ b/crates/desktop/ml_models/src/ml/stable_diffusion/infer_clip_text_embeddings.rs @@ -126,8 +126,10 @@ fn do_infer_clip_text_embeddings( // TODO(bt,2025-03-23): These used to be two different clip models. We should only need one. let clip_weights = if first { + println!(">>>>> CLIP 1"); clip_weights_path } else { + println!(">>>>> CLIP 2"); clip_weights_path }; diff --git a/crates/desktop/src-tauri/src/endpoints/realtime_image_endpoint.rs b/crates/desktop/src-tauri/src/endpoints/realtime_image_endpoint.rs index 0f20f53bdc..e8656c9a6f 100644 --- a/crates/desktop/src-tauri/src/endpoints/realtime_image_endpoint.rs +++ b/crates/desktop/src-tauri/src/endpoints/realtime_image_endpoint.rs @@ -8,7 +8,7 @@ use log::{error, info}; use ml_models::ml::model_cache::ModelCache; use ml_models::ml::prompt_cache::PromptCache; use ml_models::ml::stable_diffusion::lcm_pipeline::{lcm_pipeline, Args}; -use ml_models::ml::weights_registry::weights::{CLIP_JSON, LYKON_DEAMSHAPER_7_TEXT_ENCODER_FP16, LYKON_DEAMSHAPER_7_VAE, SIMIANLUO_LCM_DREAMSHAPER_V7_UNET}; +use ml_models::ml::weights_registry::weights::{CLIP_JSON, LYKON_DEAMSHAPER_7_TEXT_ENCODER_FP16, LYKON_DEAMSHAPER_7_VAE, SDXL_TURBO_CLIP_TEXT_ENCODER, SIMIANLUO_LCM_DREAMSHAPER_V7_UNET}; use std::path::PathBuf; use tauri::{AppHandle, State}; @@ -85,7 +85,8 @@ async fn do_infer_image( let vae_path = weights_dir.weight_path(&LYKON_DEAMSHAPER_7_VAE); let unet_path = weights_dir.weight_path(&SIMIANLUO_LCM_DREAMSHAPER_V7_UNET); let clip_json_path = weights_dir.weight_path(&CLIP_JSON); - let clip_weights_path= weights_dir.weight_path(&LYKON_DEAMSHAPER_7_TEXT_ENCODER_FP16); + //let clip_weights_path= weights_dir.weight_path(&LYKON_DEAMSHAPER_7_TEXT_ENCODER_FP16); + let clip_weights_path= weights_dir.weight_path(&SDXL_TURBO_CLIP_TEXT_ENCODER); let args = Args { image: &image, diff --git a/crates/desktop/src-tauri/src/endpoints/text_to_image_endpoint.rs b/crates/desktop/src-tauri/src/endpoints/text_to_image_endpoint.rs index 312f55088e..b15f375326 100644 --- a/crates/desktop/src-tauri/src/endpoints/text_to_image_endpoint.rs +++ b/crates/desktop/src-tauri/src/endpoints/text_to_image_endpoint.rs @@ -12,7 +12,7 @@ use once_cell::sync::Lazy; use std::io::Cursor; use std::path::PathBuf; use tauri::{AppHandle, State}; -use ml_models::ml::weights_registry::weights::{CLIP_JSON, LYKON_DEAMSHAPER_7_TEXT_ENCODER_FP16, LYKON_DEAMSHAPER_7_VAE, SIMIANLUO_LCM_DREAMSHAPER_V7_UNET}; +use ml_models::ml::weights_registry::weights::{CLIP_JSON, LYKON_DEAMSHAPER_7_TEXT_ENCODER_FP16, LYKON_DEAMSHAPER_7_VAE, SDXL_TURBO_CLIP_TEXT_ENCODER, SIMIANLUO_LCM_DREAMSHAPER_V7_UNET}; const RANDOM_SEED: u32 = 42; @@ -83,7 +83,7 @@ async fn do_infer_image( let vae_path = weights_dir.weight_path(&LYKON_DEAMSHAPER_7_VAE); let unet_path = weights_dir.weight_path(&SIMIANLUO_LCM_DREAMSHAPER_V7_UNET); let clip_json_path = weights_dir.weight_path(&CLIP_JSON); - let clip_weights_path= weights_dir.weight_path(&LYKON_DEAMSHAPER_7_TEXT_ENCODER_FP16); + let clip_weights_path= weights_dir.weight_path(&SDXL_TURBO_CLIP_TEXT_ENCODER); let args = Args { image: &image,