Conversation
|
https://github.com/HartsyAI/SwarmUI-SD.cpp-Backend I made an extension for SwarmUI that lets you use SDcpp. Its not built in like you are making but it can use almost all the features Swarm has been building on. |
|
Oh just saw this. I actually thought about implementing a webui for this project and already did so, but only posted it on Reddit. In the end I created a separate project because I also wanted to add more features like chat with llama.cpp support. But maybe if you want something a bit nicer I could simplify and backport it? https://old.reddit.com/r/StableDiffusion/comments/1prn3h9/what_does_a_good_webui_need/ https://github.com/Danmoreng/stable-diffusion.cpp/tree/archive/pre-sync-work |
|
Nice look. Works well.
|
|
When will it be merged in the master ? |
|
I think it would be better if the index.html (and gen_index_html.h?) where generated in the frontend repo, and exported as release assets and then fetched (optionally) from there. |
A submodule is a bit of a heavy hammer when you are really just interested in the ready index.html. Cmake is good at (optionally or not) fetching remote resources. |
|
Thank you for adding this UI! If anyone else finds this PR and wants to try this out, I had to run the following command and apply this patch (in addition to the instructions above). Hopefully this saves somebody some time. node scripts/build_gen_index_html.jsdiff --git a/CMakeLists.txt b/CMakeLists.txt
index e731d95..90b61c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,7 +40,7 @@ option(SD_FAST_SOFTMAX "sd: x1.5 faster softmax, inde
terministic (
option(SD_BUILD_SHARED_LIBS "sd: build shared libs" OFF)
option(SD_BUILD_SHARED_GGML_LIB "sd: build ggml as a separate shared lib" OFF)
option(SD_USE_SYSTEM_GGML "sd: use system-installed GGML library" OFF)
-#option(SD_BUILD_SERVER "sd: build server example"
ON)
+option(SD_BUILD_SERVER "sd: build server example"
ON)
if(SD_CUDA)
message("-- Use CUDA as backend stable-diffusion") |
The externally generated gen_index_html.h is difficult to review in terms of its actual source code. Therefore it is currently included as a submodule. Developers who need it can build it themselves. |
|
Put up sd.cpp with the new webui in a free huggingspace sapce. https://huggingface.co/spaces/Green-Sky/sd.cpp It is kind of annoying that you have to manually set steps and guidance to 1 for this model. Oh and an image gen takes almost 20sec. edit: would be cool if we could get one sponsored with a gpu.
|
Yeah, we'd need a way to select the server defaults for steps/guidance/sizes. Fetching the defaults from the server would be tricky, since we can't differentiate between "user explicitly selected 6" from "it's on the default value 6". One option could be doing like the clip_skip field: set the sliders to 0 or -1 by default, and omit the fields in those cases. Another approach could be adding a foldable section (like the 'generation options') for each control or control group, and only send those values when the controls are visible. |

Generate index.html and gen_index_html.h
Build sd.cpp
Example