@@ -233,39 +233,13 @@ class StableDiffusionGGML {
233233 bool vae_on_cpu,
234234 bool diffusion_flash_attn,
235235 bool tae_preview_only,
236- const std::vector<std::string>& rpc_servers,
237236 const float * tensor_split) {
238237 use_tiny_autoencoder = taesd_path.size () > 0 ;
239238
240239 ggml_log_set (ggml_log_callback_default, nullptr );
241240
242241 std::vector<ggml_backend_dev_t > devices;
243242
244- if (!rpc_servers.empty ()) {
245- ggml_backend_reg_t rpc_reg = ggml_backend_reg_by_name (" RPC" );
246- if (!rpc_reg) {
247- LOG_ERROR (" failed to find RPC backend" );
248- return false ;
249- }
250-
251- typedef ggml_backend_dev_t (*ggml_backend_rpc_add_device_t )(const char * endpoint);
252- ggml_backend_rpc_add_device_t ggml_backend_rpc_add_device_fn = (ggml_backend_rpc_add_device_t )ggml_backend_reg_get_proc_address (rpc_reg, " ggml_backend_rpc_add_device" );
253- if (!ggml_backend_rpc_add_device_fn) {
254- LOG_ERROR (" failed to find RPC device add function" );
255- return false ;
256- }
257-
258- for (const std::string& server : rpc_servers) {
259- ggml_backend_dev_t dev = ggml_backend_rpc_add_device_fn (server.c_str ());
260- if (dev) {
261- devices.push_back (dev);
262- } else {
263- LOG_ERROR (" failed to add RPC device for server '%s'" , server.c_str ());
264- return false ;
265- }
266- }
267- }
268-
269243 // use all available devices
270244 for (size_t i = 0 ; i < ggml_backend_dev_count (); ++i) {
271245 ggml_backend_dev_t dev = ggml_backend_dev_get (i);
@@ -1496,7 +1470,6 @@ sd_ctx_t* new_sd_ctx(const char* model_path_c_str,
14961470 bool keep_vae_on_cpu,
14971471 bool diffusion_flash_attn,
14981472 bool tae_preview_only,
1499- const char * rpc_servers,
15001473 const float * tensor_splits) {
15011474 sd_ctx_t * sd_ctx = (sd_ctx_t *)malloc (sizeof (sd_ctx_t ));
15021475 if (sd_ctx == NULL ) {
@@ -1514,17 +1487,6 @@ sd_ctx_t* new_sd_ctx(const char* model_path_c_str,
15141487 std::string id_embd_path (id_embed_dir_c_str);
15151488 std::string lora_model_dir (lora_model_dir_c_str);
15161489 std::vector<std::string> rpc_servers_vec;
1517- if (rpc_servers != nullptr && rpc_servers[0 ] != ' \0 ' ) {
1518- // split the servers set them into model->rpc_servers
1519- std::string servers (rpc_servers);
1520- size_t pos = 0 ;
1521- while ((pos = servers.find (' ,' )) != std::string::npos) {
1522- std::string server = servers.substr (0 , pos);
1523- rpc_servers_vec.push_back (server);
1524- servers.erase (0 , pos + 1 );
1525- }
1526- rpc_servers_vec.push_back (servers);
1527- }
15281490
15291491 sd_ctx->sd = new StableDiffusionGGML (n_threads,
15301492 vae_decode_only,
@@ -1554,7 +1516,6 @@ sd_ctx_t* new_sd_ctx(const char* model_path_c_str,
15541516 keep_vae_on_cpu,
15551517 diffusion_flash_attn,
15561518 tae_preview_only,
1557- rpc_servers_vec,
15581519 tensor_splits)) {
15591520 delete sd_ctx->sd ;
15601521 sd_ctx->sd = NULL ;
0 commit comments