switch to pillow-heif

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-08-25 19:53:14 +02:00
parent 144c00efdd
commit 6cdc3bba7e
8 changed files with 20 additions and 6 deletions
+3 -2
View File
@@ -3,8 +3,9 @@
## Short-term
- Update LTX wiki, @CalamitousFelicitousness
- LoRA: new handler, @CalamitousFelicitousness
- LoRA: native loader for MiniMax-H3
- LoRA: merge new handler, @CalamitousFelicitousness
- LoRA: native loader for MiniMax-H3: fl2va, ref2va, pruned
- TAESD: preview for MiniMax-H3 <https://github.com/madebyollin/taehv>
- Productize benchmark tool, @CalamitousFelicitousness
- Inpaint: https://discord.com/channels/1101998836328697867/1130536562422186044/1506850651035144322, @vladmandic
- Control tab verify overrides handling, @vladmandic
+1 -1
View File
@@ -109,7 +109,7 @@ def print_json(data):
def read_exif(filename: str):
if filename.lower().endswith('.heic'):
from pi_heif import register_heif_opener
from pillow_heif import register_heif_opener
register_heif_opener()
try:
image = Image.open(filename)
+1 -1
View File
@@ -104,7 +104,7 @@ if __name__ == '__main__':
if not filetype.is_image(file):
continue
if file.lower().endswith('.heic'):
from pi_heif import register_heif_opener
from pillow_heif import register_heif_opener
register_heif_opener()
log.debug(file)
img = Image.open(file)
+1 -1
View File
@@ -1327,7 +1327,7 @@ def install_insightface():
def install_optional():
t_start = time.time()
log.info('Installing optional requirements...')
install('pi-heif')
install('pillow-heif')
install('addict')
install('yapf')
install('--no-build-isolation git+https://github.com/Disty0/BasicSR@23c1fb6f5c559ef5ce7ad657f2fa56e41b121754', 'basicsr', ignore=True, quiet=True)
+3
View File
@@ -28,6 +28,9 @@ def load_model(model: str):
t0 = time.time()
ckpt = sd_models.CheckpointInfo(filename=selected.repo)
shared.sd_model = load_minimax(ckpt, workflow=selected.workflow)
if shared.sd_model is None:
log.error(f'Load video: engine="{engine}" selected="{model}" failed')
return None
sd_models.set_diffuser_options(shared.sd_model) # apply attention, offload, etc.
loaded = f'repo={selected.repo} workflow={selected.workflow}'
t1 = time.time()
+8
View File
@@ -23,6 +23,14 @@ def apply_progress_bar_config(block):
apply_progress_bar_config(child)
def trace_modules(pipe):
from modules.sd_offload_utils import get_module_names
for module_name in get_module_names(pipe):
module = getattr(pipe, module_name, None)
if isinstance(module, torch.nn.Module):
log.trace(f'Module: name={module_name} cls={module.__class__.__name__} device={next(module.parameters()).device} dtype={next(module.parameters()).dtype}')
def install_state_hook(pipe):
runner_log = logging.getLogger('diffusers.modular_pipelines.modular_pipeline')
if not any(isinstance(f, InterruptLogFilter) for f in runner_log.filters):
+2
View File
@@ -34,6 +34,8 @@ def load_minimax(checkpoint_info, diffusers_load_config = None, workflow: str |
pipe.sdnext_supported_min_frames = int(pipe.min_duration * pipe.fps) # fresh pipes report the true floor; still mode gates per instance
video_load.loaded_model = None # image-path load invalidates the video tab's name cache
# if hasattr(pipe, 'vae'):
# pipe.vae = pipe.vae.to(torch.float16) # minimax loads vae in float32
if hasattr(pipe, 'vae') and hasattr(pipe.vae, 'enable_tiling'):
pipe.vae.enable_tiling()