diff --git a/crates/service/job/inference_job/src/job/job_types/image_generation/sd/process_job.rs b/crates/service/job/inference_job/src/job/job_types/image_generation/sd/process_job.rs index ea015bc426..74e8f6109f 100644 --- a/crates/service/job/inference_job/src/job/job_types/image_generation/sd/process_job.rs +++ b/crates/service/job/inference_job/src/job/job_types/image_generation/sd/process_job.rs @@ -195,7 +195,15 @@ pub async fn process_job_sd( return Err(ProcessSingleJobError::from_anyhow_error(anyhow!("Failed to Download"))); } }; + let download_file_path = work_temp_dir.path().join(download_filename); + + if file_exists(download_file_path.as_path()) == false { + return Err( + ProcessSingleJobError::from_anyhow_error(anyhow!("Failed to Download SD Model from Google")) + ); + } + info!("File Retrieved at {}", download_file_path.display()); // download vae for model @@ -393,6 +401,12 @@ pub async fn process_job_lora( let download_file_path = work_temp_dir.path().join(download_filename); info!("File Retrieved at {}", download_file_path.display()); + if file_exists(download_file_path.as_path()) == false { + return Err( + ProcessSingleJobError::from_anyhow_error(anyhow!("Failed to Download loRA Model from Google Drive")) + ); + } + // download model + vae for lora // use lora with whatever checkpoint make it fixed id if it works submit it