Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
af79e9e
Add server example
stduhpf Aug 25, 2024
4b92c60
server: remove pingpong endpoint
stduhpf Aug 26, 2024
c30eb9e
Server: Fix missing return on non-void function
stduhpf Aug 27, 2024
1a35a45
Server: change default host
stduhpf Aug 27, 2024
fdc38b6
Server: Fix printf
stduhpf Aug 27, 2024
043cc62
server: move httplib to thirdparty folder
stduhpf Oct 4, 2024
4c851d8
Server: accept json inputs + return bas64 image
stduhpf Oct 4, 2024
185f218
server: use t.join() instead of infinite loop
stduhpf Oct 4, 2024
c52c9c5
server: fix CI Build
stduhpf Oct 4, 2024
181a354
server: attach image metadata in response
stduhpf Oct 5, 2024
f0ce3ec
server: add simple client script
stduhpf Oct 5, 2024
45797b5
Server: add client docstrings
stduhpf Oct 5, 2024
bb05737
server: client: fix image preview on non-windows os
stduhpf Oct 5, 2024
f845f41
server: support sampling method arg
stduhpf Oct 6, 2024
5a51e7d
server: small test client fixes
stduhpf Oct 5, 2024
28d7ee0
Try adding photomaker support
stduhpf Oct 22, 2024
2636107
server: update
stduhpf Nov 25, 2024
b9d1fb8
server: update and refacor (add queue)
stduhpf Jan 2, 2025
38bfcba
server: update samplers and schedulers
stduhpf Jan 2, 2025
8364bba
global running task_id
stduhpf Jan 2, 2025
4d17555
basic webui
stduhpf Jan 2, 2025
db963ee
Make server ui better
stduhpf Jan 3, 2025
9ad1d3a
Fixes
stduhpf Jan 3, 2025
db9f47f
Frontend: dirty queue display
stduhpf Jan 3, 2025
614fb30
server: do not block when loading
stduhpf Jan 3, 2025
ed66505
server: fix queue
stduhpf Jan 4, 2025
b876341
server: allow to unload model components
stduhpf Jan 4, 2025
f76afb9
Frontend: qol
stduhpf Jan 4, 2025
750c823
Use progress_callback
stduhpf Jan 4, 2025
a36a508
update progress bars (+fixes)
stduhpf Jan 5, 2025
c281f15
frontend.cpp: use relative paths in fetch() (#4) (cherry-picked)
mord0d Jul 10, 2025
5095ff2
rebaseon master and apply api changes
stduhpf Jul 10, 2025
6553235
server: update api
stduhpf Jul 17, 2025
cfa17db
server: use new naming convention
stduhpf Jul 18, 2025
57aed4f
server: change API
stduhpf Jul 23, 2025
818fd14
server: redirect base path to ui
stduhpf Jul 23, 2025
f8e9b3d
server: update lib api (fix build)
stduhpf Nov 15, 2025
b643de1
server: enable previews
stduhpf Nov 15, 2025
c5c0085
server: fix default shift (+format code)
stduhpf Nov 15, 2025
9044052
sd.h API changes again
stduhpf Nov 16, 2025
b4386fc
server: refactor args parsing (same as cli)
stduhpf Nov 16, 2025
f997056
server: refactor inner params to match api
stduhpf Nov 16, 2025
bc2ece7
fix small order of operation mistake
stduhpf Nov 16, 2025
10a591a
server: clean launch args
stduhpf Nov 17, 2025
8757cd9
server: refactor prompt json parsing + new API (kept legacy API worki…
stduhpf Nov 18, 2025
33d4f5e
server: implement some stuff
stduhpf Nov 19, 2025
68bc7e3
fix sd_ctx leak
stduhpf Nov 19, 2025
5639836
server: fix ctx not reliably updating when it should
stduhpf Nov 19, 2025
a706b33
do not expose lora dir
stduhpf Nov 19, 2025
7354bbf
implement even more stuff
stduhpf Nov 19, 2025
a083d8e
Support Qwen
stduhpf Nov 19, 2025
0ddd3da
Fix http code for task not found
stduhpf Nov 19, 2025
34847c7
support init_image (basic img2img)
stduhpf Nov 19, 2025
e104251
add (ai-generated) openAPI documentation
stduhpf Nov 19, 2025
ea7db7d
fix documentation
stduhpf Nov 19, 2025
0f1843a
add support for mask, ref_images and control image (flex.2)
stduhpf Nov 20, 2025
ff9588d
update API doc
stduhpf Nov 20, 2025
4273723
server: support photomaker and controlnets
stduhpf Nov 20, 2025
b796278
fix
stduhpf Nov 20, 2025
495977c
fix mistake in docs
stduhpf Nov 20, 2025
47e46bc
Fix more LLM mistakes in doc
stduhpf Nov 20, 2025
979f089
Fix symlink handling
stduhpf Nov 21, 2025
14f15a8
Fix invalid paths with missing trailing /
stduhpf Nov 21, 2025
968025d
fix mask_image channels + remove duplicated preview_interval parsing
stduhpf Nov 21, 2025
de5dd79
Load user-provided front-ends
stduhpf Nov 21, 2025
752bbd4
docs: fix
stduhpf Nov 21, 2025
060b579
improve docs
stduhpf Nov 21, 2025
9602849
fix img2img channels
stduhpf Nov 21, 2025
84d1736
docs: small fix
stduhpf Nov 21, 2025
913c657
Fix useless ctx reload when ctx gen options are specified but kept th…
stduhpf Nov 21, 2025
5fa7017
update api again
stduhpf Nov 22, 2025
fef1a4c
server: rebase on lastest master
stduhpf Dec 3, 2025
3952d59
qwen2vl -> llm
stduhpf Dec 4, 2025
6ded7f0
server: refactor
stduhpf Dec 5, 2025
c88cdee
rebase
stduhpf Dec 5, 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 @@

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe rename to b64.hpp?

//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