* Update stable-diffusion.cpp to 5900ef6605c6 (new API)
* Clean up pending LoRA code and simplify LoRA changes to upstream
* Move VAE tiling disabling for TAESD to sdtype_adapter.cpp
* Move auxiliary ctx functions to sdtype_adapter.cpp
* Use ref_images parameter for Kontext images
* Drop clip skip workaround (fixed upstream)
* Workaround for flash attention with img2img
leejet/stable-diffusion.cpp#756
* Workaround for Chroma with flash attention, debug prints
* Disable forcing CLIP weights to F32 for reduced memory usage
The recent ggml update added another quant type, GGML_TYPE_MXFP4,
which got the same value as SD_TYPE_COUNT. That made the embedded
sd.cpp quantize to GGML_TYPE_MXFP4 by default.
Photomaker in particular ends up crashing due to
"Missing CPY op for types: f32 mxfp4".
* add backend support for changing the VAE tiling threshold
* trigger VAE tiling by image area instead of dimensions
I've tested with GGML_VULKAN_MEMORY_DEBUG all resolutions with
the same 768x768 area (even extremes like 64x9216), and many
below that: all consistently allocate 6656 bytes per image pixel.
As tiling is primarily useful to avoid excessive memory usage, it
seems reasonable to enable VAE tiling based on area rather than
maximum image side.
However, as there is currently no user interface option to change
it back to a lower value, it's best to maintain the default
behavior for now.
* replace the notile option with a configurable threshold
This allows selecting a lower threshold value, reducing the
peak memory usage.
The legacy sdnotile parameter gets automatically converted to
the new parameter, if it's the only one supplied.
* simplify tiling checks, 768 default visible in launcher
---------
Co-authored-by: Concedo <39025047+LostRuins@users.noreply.github.com>
* refactor image gen configuration screen
* make image size limit configurable
* fix resolution limits and keep dimensions closer to the original ratio
* use 0.0 for the configured default image size limit
This prevents the current default value from being saved into the
config files, in case we later decide to adopt a different value.
* export image model version when loading
* restore model-specific default image size limit
* change the image area restriction to be specified by a square side
* move image resolution limits down to the C++ level
* Revert "export image model version when loading"
This reverts commit fa65b23de3.
* Linting Fixes:
PY:
- Inconsistent var name sd_restrict_square -> sd_restrict_square_var
- GUI swap back to using absolute row numbers for now.
- fstring fix
- size_limit -> side_limit inconsistency
C++:
- roundup_64 standalone function
- refactor sd_fix_resolution variable names for clarity
- move "anti crashing" hard total megapixel limit always to be applied after soft total megapixel limit instead of conditionally only when sd_restrict_square is unset
* allow unsafe resolutions if debugmode is on
---------
Co-authored-by: Concedo <39025047+LostRuins@users.noreply.github.com>