Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
0c5e995
Add server example
stduhpf Aug 25, 2024
dc15892
server: remove pingpong endpoint
stduhpf Aug 26, 2024
ab6b004
Server: Fix missing return on non-void function
stduhpf Aug 27, 2024
112974a
Server: change default host
stduhpf Aug 27, 2024
2656cc7
Server: Fix printf
stduhpf Aug 27, 2024
0d86a30
server: move httplib to thirdparty folder
stduhpf Oct 4, 2024
585301e
Server: accept json inputs + return bas64 image
stduhpf Oct 4, 2024
35db2ca
server: use t.join() instead of infinite loop
stduhpf Oct 4, 2024
b00389e
server: fix CI Build
stduhpf Oct 4, 2024
f0ddce4
server: attach image metadata in response
stduhpf Oct 5, 2024
557f385
server: add simple client script
stduhpf Oct 5, 2024
c92a797
Server: add client docstrings
stduhpf Oct 5, 2024
a44891a
server: client: fix image preview on non-windows os
stduhpf Oct 5, 2024
d0f3fa6
server: support sampling method arg
stduhpf Oct 6, 2024
230231a
server: small test client fixes
stduhpf Oct 5, 2024
84d6c6e
Try adding photomaker support
stduhpf Oct 22, 2024
597c335
server: update
stduhpf Nov 25, 2024
5fb2b90
server: update and refacor (add queue)
stduhpf Jan 2, 2025
6bfc192
server: update samplers and schedulers
stduhpf Jan 2, 2025
a2b4d6c
global running task_id
stduhpf Jan 2, 2025
3282783
basic webui
stduhpf Jan 2, 2025
7673691
Make server ui better
stduhpf Jan 3, 2025
aead0a9
Fixes
stduhpf Jan 3, 2025
d7c8c0d
Frontend: dirty queue display
stduhpf Jan 3, 2025
3c0fc93
server: do not block when loading
stduhpf Jan 3, 2025
cb0ca02
server: fix queue
stduhpf Jan 4, 2025
5b2319e
server: allow to unload model components
stduhpf Jan 4, 2025
8cbf9de
Frontend: qol
stduhpf Jan 4, 2025
d786aac
Use progress_callback
stduhpf Jan 4, 2025
0e700bd
update progress bars (+fixes)
stduhpf Jan 5, 2025
8125482
frontend.cpp: use relative paths in fetch() (#4) (cherry-picked)
mord0d Jul 10, 2025
30f33bc
rebaseon master and apply api changes
stduhpf Jul 10, 2025
81ec08d
server: update api
stduhpf Jul 17, 2025
671c9ef
server: use new naming convention
stduhpf Jul 18, 2025
495f4e1
server: change API
stduhpf Jul 23, 2025
74cb1ff
server: redirect base path to ui
stduhpf Jul 23, 2025
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
3 changes: 2 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

add_subdirectory(cli)
add_subdirectory(cli)
add_subdirectory(server)
6 changes: 6 additions & 0 deletions examples/server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set(TARGET sd-server)

add_executable(${TARGET} main.cpp)
install(TARGETS ${TARGET} RUNTIME)
target_link_libraries(${TARGET} PRIVATE stable-diffusion ${CMAKE_THREAD_LIBS_INIT})
target_compile_features(${TARGET} PUBLIC cxx_std_17)
42 changes: 42 additions & 0 deletions examples/server/b64.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

//FROM
//https://stackoverflow.com/a/34571089/5155484

static const std::string b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";//=
static std::string base64_encode(const std::string &in) {
std::string out;

int val=0, valb=-6;
for (uint8_t c : in) {
val = (val<<8) + c;
valb += 8;
while (valb>=0) {
out.push_back(b[(val>>valb)&0x3F]);
valb-=6;
}
}
if (valb>-6) out.push_back(b[((val<<8)>>(valb+8))&0x3F]);
while (out.size()%4) out.push_back('=');
return out;
}


static std::string base64_decode(const std::string &in) {

std::string out;

std::vector<int> T(256,-1);
for (int i=0; i<64; i++) T[b[i]] = i;

int val=0, valb=-8;
for (uint8_t c : in) {
if (T[c] == -1) break;
val = (val<<6) + T[c];
valb += 6;
if (valb>=0) {
out.push_back(char((val>>valb)&0xFF));
valb-=8;
}
}
return out;
}
Loading
Loading