diff --git a/CHANGELOG.md b/CHANGELOG.md index e4caa5cc4..1ad61a1fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Feature highlights include: - Redesigned [LTXVideo](https://vladmandic.github.io/sdnext-docs/Video) interface with support for general video models plus optimized [FramePack](https://vladmandic.github.io/sdnext-docs/FramePack) and [LTXVideo](https://vladmandic.github.io/sdnext-docs/LTX) support - Fully integrated nudity detection and optional censorship with [NudeNet](https://vladmandic.github.io/sdnext-docs/NudeNet) - New background replacement and relightning methods using **Latent Bridge Matching** and new **PixelArt** processing filter +- Enhanced auto-detection of default sampler types/settings results in avoiding common mistakes - Additional **LLM/VLM** models available for captioning and prompt enhance - Number of workflow and general quality-of-life improvements, especially around **Styles**, **Detailer**, **Preview**, **Batch**, **Control** - Compute improvements @@ -41,14 +42,16 @@ For details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/master - [WanAI Wan 2.2](https://github.com/Wan-Video/Wan2.2) both 5B and A14B variants, for both T2V and I2V support go to: *video -> generic -> wan -> pick variant* optimized support with *VACE*, etc. will follow soon - *note*: quantization and offloading are highly recommended! + *caution* Wan2.2 on its own is ~68GB, but also includes optional second-stage for later low-noise processing which is absolutely massive at additional ~54GB + you can enable second stage processing in *settings -> model options*, its disabled by default + *note*: quantization and offloading are highly recommended regardless of first-stage only or both stages! - [WanAI Wan](https://wan.video/) T2V models for T2I workflows Wan is originally designed for *video* workflows, but now also be used for *text-to-image* workflows! Supports Wan2.1 in 1.3B and 14B variants and Wan2.2 in 5B and A14B variants supports all standard features such as quantization, offloading, TAESD preview generation, LoRA support etc. can also load unet/transformer fine-tunes in safetensors format using UNET loader simply select in *networks -> models -> reference* - *note* 1.3B model is a bit too small for good results and 14B is very large at 78GB so aggressive quantization and offloading are recommended + *note* 1.3B model is a bit too small for good results and 14B is very large at 78GB even without second-stage so aggressive quantization and offloading are recommended - [FreePix F-Lite](https://huggingface.co/Freepik/F-Lite) F-Lite is a 10B model trained exclusively on copyright-safe and SFW content, trained on internal dataset comprising approximately 80 million copyright-safe images available via *networks -> models -> reference* @@ -138,6 +141,7 @@ For details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/master - **Detailer** add option to merge multiple results from each detailer model for example, hands model can result in two hands each being processed separately or both hands can be merged into one composite job - **Control** auto-update width/height on image upload + - autodetect **V-prediction** models and override default sampler prediction type as needed - **SDNQ** - use inference context during quantization - use static compile diff --git a/installer.py b/installer.py index 35a14c4a4..eafe37d3f 100644 --- a/installer.py +++ b/installer.py @@ -593,7 +593,7 @@ def check_diffusers(): t_start = time.time() if args.skip_all or args.skip_git: return - sha = '1c50a5f7e0392281336e21bc3f74ba48f8819207' # diffusers commit hash + sha = 'a6d9f6a1a9a9ede2c64972d83ccee192b801c4a0' # diffusers commit hash pkg = pkg_resources.working_set.by_key.get('diffusers', None) minor = int(pkg.version.split('.')[1] if pkg is not None else -1) cur = opts.get('diffusers_version', '') if minor > -1 else '' diff --git a/modules/merging/modules_sdxl.py b/modules/merging/modules_sdxl.py index 35ecece34..959ad36e5 100644 --- a/modules/merging/modules_sdxl.py +++ b/modules/merging/modules_sdxl.py @@ -97,6 +97,7 @@ def load_unet(pipe: diffusers.StableDiffusionXLPipeline, override:str=None): except Exception as e: yield msg(f'unet: {e}') + def load_scheduler(pipe: diffusers.StableDiffusionXLPipeline, override:str=None): if recipe.scheduler is None and override is None: return diff --git a/modules/sd_models.py b/modules/sd_models.py index 3777b2cbc..35db128c1 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -506,8 +506,15 @@ def load_diffuser_file(model_type, pipeline, checkpoint_info, diffusers_load_con def set_overrides(sd_model, checkpoint_info): if 'bigaspv25' in checkpoint_info.name.lower(): - sd_model.scheduler = diffusers.UniPCMultistepScheduler(prediction_type="flow_prediction", use_flow_sigmas=True) - shared.log.info(f'Setting override: model="{checkpoint_info.name}" component=scheduler cls={sd_model.scheduler.__class__.__name__}') + scheduler_config = sd_model.scheduler.config + scheduler_config['prediction_type'] = 'flow_prediction' + sd_model.scheduler = diffusers.UniPCMultistepScheduler.from_config(scheduler_config) + shared.log.info(f'Setting override: model="{checkpoint_info.name}" component=scheduler prediction="flow-prediction"') + if 'vpred' in checkpoint_info.name.lower() or 'v-pred' in checkpoint_info.name.lower(): + scheduler_config = sd_model.scheduler.config + scheduler_config['prediction_type'] = 'v_prediction' + sd_model.scheduler = diffusers.EulerDiscreteScheduler.from_config(scheduler_config) + shared.log.info(f'Setting override: model="{checkpoint_info.name}" component=scheduler prediction="v-prediction"') def set_defaults(sd_model, checkpoint_info): diff --git a/modules/shared.py b/modules/shared.py index 441ea9a4e..4a5ceb4c1 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -195,8 +195,12 @@ options_templates.update(options_section(('sd', "Models & Loading"), { })) options_templates.update(options_section(('model_options', "Models Options"), { - "model_sd3_disable_te5": OptionInfo(False, "StableDiffusion3: T5 disable encoder"), - "model_h1_llama_repo": OptionInfo("Default", "HiDream: LLama repo", gr.Textbox), + "model_sd3_sep": OptionInfo("