mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-26 23:29:53 +00:00
Some checks failed
CI / ubuntu-latest-cmake (push) Has been cancelled
CI / ubuntu-latest-cmake-vulkan (push) Has been cancelled
CI / Build and push container images (push) Has been cancelled
CI / macOS-latest-cmake (push) Has been cancelled
CI / windows-latest-cmake (cpu, -DGGML_NATIVE=OFF -DSD_BUILD_SHARED_LIBS=ON -DSD_BUILD_SHARED_GGML_LIB=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON) (push) Has been cancelled
CI / windows-latest-cmake (cuda12, -DSD_CUDA=ON -DSD_BUILD_SHARED_LIBS=ON -DCMAKE_CUDA_ARCHITECTURES='61;70;75;80;86;89;90;100;120' -DCMAKE_CUDA_FLAGS='-Xcudafe "--diag_suppress=177" -Xcudafe "--diag_suppress=550"' -DGGML_NATIVE=OFF -DSD_BUILD_SHARED_GGML_L… (push) Has been cancelled
CI / windows-latest-cmake (vulkan, -DSD_VULKAN=ON -DSD_BUILD_SHARED_LIBS=ON -DGGML_NATIVE=OFF -DSD_BUILD_SHARED_GGML_LIB=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON) (push) Has been cancelled
CI / windows-latest-rocm (push) Has been cancelled
CI / ubuntu-latest-rocm (10.1.0, x64, gfx900;gfx906;gfx908;gfx90a;gfx90c;gfx942;gfx950;gfx1010;gfx1011;gfx1012;gfx1030;gfx1031;gfx1032;gfx1033;gfx1034;gfx1035;gfx1036;gfx1100;gfx1101;gfx1102;gfx1103;gfx1150;gfx1151;gfx1152;gfx1153;gfx1200;gfx1201) (push) Has been cancelled
CI / release (push) Has been cancelled
26 lines
924 B
C++
26 lines
924 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "httplib.h"
|
|
#include "runtime.h"
|
|
|
|
void register_index_endpoints(httplib::Server& svr, const SDSvrParams& svr_params, const std::string& index_html);
|
|
void register_openai_api_endpoints(httplib::Server& svr, ServerRuntime& rt);
|
|
void register_sdapi_endpoints(httplib::Server& svr, ServerRuntime& rt);
|
|
void register_sdcpp_api_endpoints(httplib::Server& svr, ServerRuntime& rt);
|
|
void register_model_endpoints(httplib::Server& svr, ServerRuntime& rt);
|
|
|
|
class RuntimeRoutes {
|
|
httplib::Server& server_;
|
|
ServerRuntime& runtime_;
|
|
|
|
httplib::Server::Handler protect(httplib::Server::Handler handler);
|
|
|
|
public:
|
|
RuntimeRoutes(httplib::Server& server, ServerRuntime& runtime)
|
|
: server_(server), runtime_(runtime) {}
|
|
|
|
void get(const std::string& pattern, httplib::Server::Handler handler);
|
|
void post(const std::string& pattern, httplib::Server::Handler handler);
|
|
};
|