diff --git a/TODO.md b/TODO.md index 5442387b0..a83374d90 100644 --- a/TODO.md +++ b/TODO.md @@ -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 - Productize benchmark tool, @CalamitousFelicitousness - Inpaint: https://discord.com/channels/1101998836328697867/1130536562422186044/1506850651035144322, @vladmandic - Control tab verify overrides handling, @vladmandic diff --git a/cli/image-exif.py b/cli/image-exif.py index e63fd9e71..c36d5628a 100755 --- a/cli/image-exif.py +++ b/cli/image-exif.py @@ -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) diff --git a/cli/image-grid.py b/cli/image-grid.py index f6f8ed755..3ce062595 100755 --- a/cli/image-grid.py +++ b/cli/image-grid.py @@ -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) diff --git a/extensions-builtin/sdnq b/extensions-builtin/sdnq index 26e5fd7da..b8f20dd74 160000 --- a/extensions-builtin/sdnq +++ b/extensions-builtin/sdnq @@ -1 +1 @@ -Subproject commit 26e5fd7da6a759b82c03b14510e73165591c870b +Subproject commit b8f20dd74c3d96b603907d1cba974703ad05e1c7 diff --git a/installer.py b/installer.py index 7843bfd10..e3c8ba58d 100644 --- a/installer.py +++ b/installer.py @@ -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) diff --git a/modules/minimax/minimax_video.py b/modules/minimax/minimax_video.py index 1cbfb6442..5e4592328 100644 --- a/modules/minimax/minimax_video.py +++ b/modules/minimax/minimax_video.py @@ -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() diff --git a/modules/modular_load.py b/modules/modular_load.py index b8e8b8cc0..66d6de771 100644 --- a/modules/modular_load.py +++ b/modules/modular_load.py @@ -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): diff --git a/pipelines/model_minimax.py b/pipelines/model_minimax.py index 6db7eb719..8a60a774f 100644 --- a/pipelines/model_minimax.py +++ b/pipelines/model_minimax.py @@ -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()