feat: add configurable conditioning cache for all models (#2034)

This commit is contained in:
leejet authored and GitHub committed 2026-09-23 22:25:42 +08:00
1 parent 241518b35d
commit e6281b6318
12 files changed
+172 -51

No files matched your search

+6 -2
View File
@@ -26,6 +26,7 @@ class RNG;
struct Denoiser;
struct LoraModel;
struct ConditionerParams;
class ConditioningCache;
struct SDCondition;
struct RefImageParams;
namespace Wav2Vec2 {
@@ -178,8 +179,9 @@ public:
std::recursive_mutex execution_mutex;
std::unique_ptr<ModelConfig> config_;
RunnerState runner_state_;
bool conditioning_cache_allowed_ = false;
bool executing_ = false;
std::unique_ptr<ConditioningCache> conditioning_cache_;
std::vector<ModelManager::LoraSpec> conditioning_loras_;
bool executing_ = false;
std::shared_ptr<Denoiser> denoiser;
std::vector<float> file_alphas_cumprod;
@@ -362,6 +364,8 @@ public:
bool apply_loras(const sd_lora_t* loras, uint32_t lora_count);
SDCondition get_learned_condition(const ConditionerParams& params);
void reset_generation_extensions();
void prepare_generation_extensions(const sd_pm_params_t& pm_params,