Commit Graph

88 Commits

Author SHA1 Message Date
Wagner Bruna 276c651a12 sd: sync to master-593-3d6064b (#2175)
* sd: sync to master-593-3d6064b

* sd: use the same sdtype_adapter object for all builds

Since master-592-b8079e2, no sd.cpp source depends on the ggml
backend build anymore.

* sd: fix main_gpu selection

* sd: report backend devices to the Python layer
2026-05-04 14:05:34 +08:00
Wagner Bruna e2bdd6d7aa sd: sync to master-591-331cfa5 (#2155)
* sd: sync to master-585-44cca3d

* sd: sync to master-587-b8bdffc

* sd: sync to master-591-331cfa5
2026-05-01 16:33:28 +08:00
Wagner Bruna bad9b61064 sd: sync to master-582-7023fc4 (#2150)
* sd: remove sampler alias handling from the C++ layer

It's already handled at the Python layer.

* sd: sync to master-580-7d33d4b

* sd: sync to master-582-7023fc4
2026-04-21 23:01:33 +08:00
Wagner Bruna f371bb14d4 sd: sync to master-560-e8323ca (#2082)
* sd: sync to master-540-f16a110

* tae post-merge fixes

* build fixes

* restore image mask for non-inpainting models

* sd: sync to master-551-99c1de3

* avoid nlohmann/json.hpp include diffs

* Euler A now works on Flux

* sd: sync to master-555-7397dda

avi_writer.h got removed upstream, but I've simply kept the local
copy for now.

* sd: sync to master-558-8afbeb6

* sd: sync to master-560-e8323ca
2026-04-09 14:44:59 +08:00
Wagner Bruna 9223f41320 sd: call SetCircularAxesAll directly (#2078) 2026-03-29 01:17:48 +08:00
Concedo 4a5c903718 sd model model replacement logic: adjusted approach for easy merge 2026-03-26 21:57:42 +08:00
Concedo fdfb713d91 added --sdmaingpu allowing image models to be independently placed on any gpu 2026-03-21 17:34:12 +08:00
Wagner Bruna 6e7b9a1549 sd: sync to master-529-630ee03 (#2040) 2026-03-17 00:23:28 +08:00
Wagner Bruna feea014774 sd: support for dynamic LoRA loading from a directory (#2036)
* backend support for controlling LoRA cache and fixed multipliers

The generation LoRA multipliers are now added to the initial
multipliers, so e.g. a merged LCM model will behave the same as
a normal model with a preloaded LCM LoRA.

* frontend support
2026-03-16 20:39:21 +08:00
Wagner Bruna b437d18319 add support for cache modes to accelerate image generation (#2021)
* sd: sync to master-525-d6dd6d7

* sd: add support for cache modes for inference acceleration

* keep gendefaults as a JSON object inside the config file

* covered more invalid cases on gendefaults parsing
2026-03-15 15:27:14 +08:00
Wagner Bruna 3f42ed1af7 support for customizing LoRA multipliers through the sdapi (#1982)
* fix corner case in sd_oai_transform_params

Also fix typo in the function name.

* support for customizing loaded LoRA multipliers

The `sdloramult` flag now accepts a list of multipliers, one for each
LoRA. If all multipliers are non-zero, LoRAs load as before, with no extra
VRAM usage or performance impact.

If any LoRA has a multiplier of 0, we switch to `at_runtime` mode, and these
LoRAs will be available to multiplier changes via the `lora` sdapi field and
show up in the `sdapi/v1/loras` endpoint. All LoRAs are still preloaded on
startup, and cached to avoid file reloads.

If the list of multipliers is shorter than the list of LoRAs, the multiplier
list is extended with the first multiplier (1.0 by default), to keep it
compatible with the previous behavior.

* support for `<lora:name:multiplier>` prompt syntax and metadata

* add a few tests for sanitize_lora_multipliers
2026-03-10 21:29:39 +08:00
Wagner Bruna 9158bd8b4d sd: sync to master-520-d950627 (#2006)
* sd: sync to master-509-4cdfff5

* sd: Anima support

* sd: sync to master-514-5792c66

* sd: additional workaround for Anima .safetensors model

* sd: sync to master-517-ba35dd7

* sd: sync to master-520-d950627
2026-03-08 01:23:03 +08:00
Wagner Bruna 5c40f07d4a sd: sync to 0752cc9 (master-507-b314d80 +1) (#1999)
* sd: sync to 0752cc9 (master-507-b314d80 +1)

* sd: add flow-shift support to gendefaults
2026-02-28 12:22:32 +08:00
Wagner Bruna a6c0a224b2 sd: sync to master-506-c9cd497 (#1991) 2026-02-23 17:35:59 +08:00
Concedo 83f905919b flash attention is broken on qwen image edit. disabled conditioner to fix (+1 squashed commits)
Squashed commits:

[1b705cb6e] flash attention is broken on qwen image edit. disabled conditioner to fix
2026-02-14 11:59:03 +08:00
Wagner Bruna ae5183be10 sd: sync to master-504-636d3cb (#1969)
* sd: sync to master-504-636d3cb

* sd: fix and simplify limit calculation

- restore the "arbitrarily high" 8192 limit, since it's used to turn
off the img_hard_limit (and if each side was always limited by 2048,
we wouldn't need hard_megapixel_res_limit)
- avoid changing the config cfg_square_limit during a generation
- apply the hard_megapixel_res_limit only in the configuration-changed
path, since the default path uses constants
- clean up comments

The calculation itself remains the same:
- default area limit: 832² for SD1.5/SD2, 1024² otherwise
- configured limit always between 64 and 2048
2026-02-14 08:12:08 +08:00
Wagner Bruna d9ac52a01a sd: sync to master-492-f957fa3 (#1957)
* sd: sync to master-492-f957fa3

* add Res Multistep and Res 2s samplers

* make sdflashattention control flash_attn too
2026-02-04 16:12:39 +08:00
Wagner Bruna 715a76ce5f sd: sync to master-480-b87fe13 (#1932) 2026-01-21 20:49:35 +08:00
Concedo 393791496d flux 2 taesd (+1 squashed commits)
Squashed commits:

[adfc3f3a2] flux 2 taesd
2026-01-19 23:47:16 +08:00
Wagner Bruna 10851f223d sd: sync to master-473-9565c7f (#1927)
* sd: sync to master-473-9565c7f

* sd: add support for flux2 klein
2026-01-19 01:04:34 +08:00
Wagner Bruna c91fc850c1 sd: sync to master-467-0e52afc (#1916) 2026-01-15 23:06:51 +08:00
Wagner Bruna 0ef55844d3 sd: sync to master-453-4ff2c8c (#1907) 2026-01-03 15:28:27 +08:00
Concedo 442fa7cd7c support for circular textures in sdcpp 2026-01-01 16:34:09 +08:00
Wagner Bruna 84765f5967 sd: sync to master-447-ccb6b0a (#1898)
* sd: sync to master-438-298b110

* sd: sync to master-440-3e81246

* sd: sync to master-444-a0adcfb

* sd: sync to master-447-ccb6b0a
2025-12-27 16:30:52 +08:00
Concedo 7c82cad72c support ovis, added taehv wan embed, fixed compile error (+1 squashed commits)
Squashed commits:

[ab71f6d33] support ovis, added taehv wan embed
2025-12-22 17:08:09 +08:00
Wagner Bruna 44ce1a80b3 sd: sync to master-431-23fce0b (#1893)
* sd: sync to master-427-78e15bd

* add kl_optimal to the available schedulers list

* more robust workaround to avoid stb linkage issues

* sd: sync to master-431-23fce0b

* add TAEHV support and disable TAE if the model isn't found
2025-12-22 15:07:09 +08:00
Wagner Bruna 78bbe89956 sd: sync to master-417-43a70e8 (#1889)
* sd: sync to master-417-43a70e8

* fix sdmain build

* switch to upstream apply_loras()

* refactor u8 path conversions and add it to the gguf reader
2025-12-16 16:16:48 +08:00
Concedo 1aab32fe03 fixed safetensors loading for zimage 2025-12-09 18:09:47 +08:00
Wagner Bruna 801840d3bd sd: sync to master-391-5865b5e (#1878) 2025-12-08 19:53:52 +08:00
Wagner Bruna 510508e7da sd: sync to master-391-5865b5e (#1872) 2025-12-04 16:29:38 +08:00
Concedo 7316c24bf6 fixes to load flux2 2025-12-03 18:38:54 +08:00
Wagner Bruna fbdcc74ae6 adapt kcpp changes for z-image 2025-12-01 19:15:38 -03:00
Wagner Bruna fcb86f22df sd: sync to master-387-e4c50f1 2025-12-01 19:15:38 -03:00
Wagner Bruna 07f53a4d84 fix qwen2vl tensor detection 2025-12-01 17:04:56 -03:00
Wagner Bruna 3db48a1536 sd: sync to master-383-20eb674 2025-12-01 17:04:56 -03:00
Wagner Bruna 717d9c6401 sd: sync to master-377-2034588 2025-11-23 19:29:01 -03:00
Wagner Bruna 703bbf67d8 sd: sync to master-371-5498cc0 2025-11-23 19:29:01 -03:00
Wagner Bruna 8ef66e90c1 sd: sync to master-366-f532972 2025-11-23 19:29:01 -03:00
Wagner Bruna 3a7dd1a97f sd: sync to master-358-347710f
Also adapt Koboldcpp LoRA loading function, and add
backend support for lora_apply_mode.
2025-11-23 19:28:54 -03:00
Wagner Bruna 3318b73c94 sd: sync to master-355-694f0d9 2025-11-23 19:28:34 -03:00
LostRuins Concedo a5cc934f04 cherry pick patch in https://github.com/leejet/stable-diffusion.cpp/pull/957 and https://github.com/leejet/stable-diffusion.cpp/pull/935 2025-11-10 23:05:38 +08:00
Concedo 7179e49aef fix from https://github.com/leejet/stable-diffusion.cpp/pull/926 2025-11-01 23:38:37 +08:00
Concedo c2316353a1 allow usage of flux without some components 2025-10-30 22:32:20 +08:00
Wagner Bruna 96a70033ba sd: sync to master-343-dd75fc0 (#1818) 2025-10-30 13:44:59 +08:00
Wagner Bruna c652d08f02 sd: sync to master-340-9e28be6 (#1816) 2025-10-27 21:47:48 +08:00
Wagner Bruna 2cab657c60 sd: sync to master-336-917f7bf (#1810) 2025-10-25 21:19:35 +08:00
Wagner Bruna fef73919ea sd: clean up changes against stable-diffusion.cpp 90ef5f8 (#1804)
* sd: clean up changes against stable-diffusion.cpp 90ef5f8

Clean up the diff, and include a few missing changes, mainly from
the upscaler and model weight type statistics.

* added line clear again

* remove excess spaces

---------

Co-authored-by: LostRuins Concedo <39025047+LostRuins@users.noreply.github.com>
2025-10-23 22:00:33 +08:00
Concedo 86b94456de Sync sd.cpp to 90ef5f8 2025-10-20 11:07:42 +08:00
Concedo fab2ff0687 sync sd.cpp to e370258 2025-10-20 10:45:34 +08:00
Concedo d9e898afe0 reset scheduler if default otherwise it will persist the old one 2025-10-19 19:53:40 +08:00