Repository navigation
|
I have just found out about DGL. Web search did not find anything, is it a custom language of sd.cpp? Seems recent addition to the repo, correct? I support efforts for developing scripting abilities, I also saw "tensors" mentioned so hope DGL will be able to be used for some precision tasks. Are there practical cases that can be done already in DGL that cannot be scripted in bash + sd-cli? TIA |
Replies: 3 comments 5 replies
|
DGL landed in #2396 and runs inside |
|
Yes, DGL is a project-specific DSL introduced in #2396, which was merged on Nov 22, 2026. The key difference is that Bash orchestrates inference from outside the engine, while DGL lets you compose the inference pipeline itself. Some practical use cases already supported by DGL:
A concrete example is the MiniMax H3 latent hires script, which performs latent upscaling, audio/video latent manipulation and a second sampling pass before decoding the final output. Bash can certainly chain multiple sd-cli invocations, but it cannot directly access or manipulate internal values that the CLI does not expose. Conceptually, DGL is closer to a script workflow than a replacement for Bash. It allows users to implement custom diffusion pipelines without having to modify the C++ implementation for every new workflow. See also: |
|
I'm quite confused on how this DGL even works when running sd-server. Apparently the whole DGL just basically removed the PR from last month to add ADetailer support to the sd-server. It seems that I have to make a whole DGL file, but then from what my AI is telling me about the source code, that both the sdcpp nor sdapi api don't even have a way to use the DGL file specified, since it requires reading the dgl file locally first and editing the values and submitting the job to a new dgl endpoint. I can no longer run a command like this: ./build/bin/sd-server \
--listen-ip 127.0.0.1 \
--listen-port 1234 \
-m /var/lib/llama-swap/models/stable-diffusion/sd15/DreamShaper_8_pruned.safetensors \
--backend "diffusion=vulkan1,te=cpu,vae=vulkan1" \
--auto-fit on \
-W 512 \
-H 512 \
--steps 20 \
--cfg-scale 7.0 \
--sampling-method dpm++2m \
--scheduler karras \
--seed 42 \
--ad-model /var/lib/llama-swap/models/stable-diffusion/adetailer/face_yolov8n.safetensors \
--ad-prompt "portrait photo, detailed face" \
--ad-negative-prompt "" \
--extra-ad-args "confidence=0.3,denoising_strength=0.4,inpaint_width=512,inpaint_height=512,mask_blur=4"aChatGPT claims I need this entire DGL file: |
Yes, DGL is a project-specific DSL introduced in #2396, which was merged on Nov 22, 2026.
The key difference is that Bash orchestrates inference from outside the engine, while DGL lets you compose the inference pipeline itself.
Some practical use cases already supported by DGL: