Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions examples/common/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@ ArgOptions SDContextParams::get_options() {
"--stream-layers",
"enable residency+prefetch streaming on top of --max-vram (no effect without --max-vram; defaults to false)",
true, &stream_layers},
{"",
"--multi-gpu",
"distribute model params across multiple GPUs for parallel computation (defaults to false)",
true, &multi_gpu},
{"",
"--force-sdxl-vae-conv-scale",
"force use of conv scale on sdxl vae",
Expand Down Expand Up @@ -733,6 +737,7 @@ std::string SDContextParams::to_string() const {
<< " offload_params_to_cpu: " << (offload_params_to_cpu ? "true" : "false") << ",\n"
<< " max_vram: " << max_vram << ",\n"
<< " stream_layers: " << (stream_layers ? "true" : "false") << ",\n"
<< " multi_gpu: " << (multi_gpu ? "true" : "false") << ",\n"
<< " backend: \"" << backend << "\",\n"
<< " params_backend: \"" << params_backend << "\",\n"
<< " enable_mmap: " << (enable_mmap ? "true" : "false") << ",\n"
Expand Down Expand Up @@ -815,6 +820,7 @@ sd_ctx_params_t SDContextParams::to_sd_ctx_params_t(bool vae_decode_only, bool f
str_to_vae_format(vae_format),
max_vram,
stream_layers,
multi_gpu,
backend.c_str(),
params_backend.c_str(),
};
Expand Down
1 change: 1 addition & 0 deletions examples/common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ struct SDContextParams {
bool offload_params_to_cpu = false;
float max_vram = 0.f;
bool stream_layers = false;
bool multi_gpu = false;
std::string backend;
std::string params_backend;
bool enable_mmap = false;
Expand Down
2 changes: 1 addition & 1 deletion ggml
Submodule ggml updated 183 files
1 change: 1 addition & 0 deletions include/stable-diffusion.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ typedef struct {
enum sd_vae_format_t vae_format;
float max_vram; // GiB budget for graph-cut segmented param offload (0 = disabled, -1 = auto free VRAM minus 1 GiB)
bool stream_layers; // Enable residency+prefetch streaming on top of --max-vram (no effect without --max-vram)
bool multi_gpu; // Distribute model params across multiple GPUs for parallel computation
const char* backend;
const char* params_backend;
} sd_ctx_params_t;
Expand Down
Loading