feat: --stream-layers for streaming weights from CPU during generation (#1576)

This commit is contained in:
fszontagh authored and GitHub committed 2026-06-02 22:35:28 +08:00
1 parent 7948df8ac1
commit ed74577c40
12 files changed
+692 -12

No files matched your search

+2
View File
@@ -18,6 +18,7 @@ struct UpscalerGGML {
bool direct = false;
int tile_size = 128;
size_t max_graph_vram_bytes = 0;
bool stream_layers_enabled = false;
std::string backend_spec;
std::string params_backend_spec;
@@ -31,6 +32,7 @@ struct UpscalerGGML {
bool offload_params_to_cpu,
int n_threads);
void set_max_graph_vram_bytes(size_t max_vram_bytes);
void set_stream_layers_enabled(bool enabled);
sd::Tensor<float> upscale_tensor(const sd::Tensor<float>& input_tensor);
sd_image_t upscale(sd_image_t input_image, uint32_t upscale_factor);
};