mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-06 02:00:46 +00:00
parameter for predefined SD weights
This commit is contained in:
1 parent
0540d2caba
commit
c8fa722b3d
2 files changed
+8
-1
No files matched your search
+4
-1
@@ -416,7 +416,10 @@ pub async fn process_job_lora(
|
||||
|
||||
// download model + vae for lora
|
||||
// use lora with whatever checkpoint make it fixed id if it works submit it
|
||||
let weight_token_sd_model_token = ModelWeightToken(String::from("weight_dmmthavhawqc2hj7yqyemcbf8")); // any generic model.
|
||||
let weight_token_sd_model_token = ModelWeightToken::new_from_str(&sd_deps.predefined_sd_weight_token);
|
||||
|
||||
info!("Using predefined SD weight token: {:?}", &weight_token_sd_model_token);
|
||||
|
||||
let sd_weight_record = get_weight_by_token(
|
||||
&weight_token_sd_model_token,
|
||||
false,
|
||||
|
||||
+4
@@ -8,6 +8,8 @@ pub struct StableDiffusionDependencies {
|
||||
pub downloaders: StableDiffusionDownloaders,
|
||||
pub inference_command: StableDiffusionInferenceCommand,
|
||||
pub vae_bucket_path: String,
|
||||
pub predefined_sd_weight_token: String,
|
||||
pub predefined_lora_weight_token: String,
|
||||
}
|
||||
|
||||
impl StableDiffusionDependencies {
|
||||
@@ -16,6 +18,8 @@ impl StableDiffusionDependencies {
|
||||
downloaders: StableDiffusionDownloaders::build_all_from_env(),
|
||||
inference_command: StableDiffusionInferenceCommand::from_env()?,
|
||||
vae_bucket_path: easyenv::get_env_string_required("SD_VAE_BUCKET_PATH")?,
|
||||
predefined_sd_weight_token: easyenv::get_env_string_required("SD_PREDEFINED_SD_WEIGHT_TOKEN")?,
|
||||
predefined_lora_weight_token: easyenv::get_env_string_required("SD_PREDEFINED_LORA_WEIGHT_TOKEN")?,
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user