refactor: simplify ControlNet output caching (#1655)

This commit is contained in:
leejet authored and GitHub committed 2026-06-14 16:58:37 +08:00
1 parent 17d70b91e6
commit 9838264c49
2 files changed
+32 -51

No files matched your search

+4
View File
@@ -2007,6 +2007,10 @@ protected:
}
bool copy_cache_tensors_to_cache_buffer(const std::unordered_set<std::string>* cache_keep_names = nullptr) {
if (cache_tensor_map.empty() && cache_keep_names == nullptr) {
return true;
}
ggml_context* old_cache_ctx = cache_ctx;
ggml_backend_buffer_t old_cache_buffer = cache_buffer;
cache_ctx = nullptr;