mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
fix lut
Co-authored-by: Copilot <copilot@github.com> Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
+6
-3
@@ -1,8 +1,8 @@
|
||||
# Change Log for SD.Next
|
||||
|
||||
## Update for 2026-05-05
|
||||
## Update for 2026-05-07
|
||||
|
||||
### Highlights for 2026-05-05
|
||||
### Highlights for 2026-05-07
|
||||
|
||||
*What's New?*
|
||||
- Image editing models now can work with multiple image inputs!
|
||||
@@ -13,7 +13,7 @@ For full details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/m
|
||||
|
||||
[ReadMe](https://github.com/vladmandic/automatic/blob/master/README.md) | [ChangeLog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) | [Docs](https://vladmandic.github.io/sdnext-docs/) | [WiKi](https://github.com/vladmandic/automatic/wiki) | [Discord](https://discord.com/invite/sd-next-federal-batch-inspectors-1101998836328697867) | [Sponsor](https://github.com/sponsors/vladmandic)
|
||||
|
||||
### Details for 2026-05-05
|
||||
### Details for 2026-05-07
|
||||
|
||||
- **Features**
|
||||
- **Multi-image** workflows!
|
||||
@@ -66,6 +66,9 @@ For full details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/m
|
||||
- lora false deactivate
|
||||
- kandinsky-5 t2i/i2i workflows
|
||||
- progress do not timeout when paused
|
||||
- faster server shutdown/restart, thanks @awsr
|
||||
- `openvino` force offload none
|
||||
- `lut` file handling
|
||||
|
||||
## Update for 2026-04-28
|
||||
|
||||
|
||||
@@ -181,10 +181,16 @@ def _apply_color_temp(img: torch.Tensor, kelvin: float) -> torch.Tensor:
|
||||
|
||||
def _apply_lut(image: Image.Image, lut_cube_file: str, strength: float) -> Image.Image:
|
||||
"""Apply .cube LUT file via pillow-lut-tools."""
|
||||
if not lut_cube_file or not os.path.isfile(lut_cube_file):
|
||||
if not lut_cube_file:
|
||||
return image
|
||||
pillow_lut = _ensure_pillow_lut()
|
||||
if hasattr(lut_cube_file, "name"):
|
||||
lut_cube_file = lut_cube_file.name
|
||||
if hasattr(lut_cube_file, "as_posix"):
|
||||
lut_cube_file = lut_cube_file.as_posix()
|
||||
try:
|
||||
if not os.path.isfile(lut_cube_file):
|
||||
return image
|
||||
pillow_lut = _ensure_pillow_lut()
|
||||
cube = pillow_lut.load_cube_file(lut_cube_file)
|
||||
if strength != 1.0:
|
||||
cube = pillow_lut.amplify_lut(cube, strength)
|
||||
|
||||
Reference in New Issue
Block a user