From f49e66577a3edca6be384d4e115accbede51c95a Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 8 Dec 2023 12:27:00 -0500 Subject: [PATCH] lint fixes --- CHANGELOG.md | 13 ++++++------- modules/images.py | 3 +-- modules/shared.py | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b75fd984..8d92b4930 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log for SD.Next -## Update for 2023-12-07 +## Update for 2023-12-08 *Note*: based on `diffusers==0.25.0.dev0` @@ -16,17 +16,16 @@ - **Schedulers** - add timesteps range, changing it will make scheduler to be over-complete or under-complete - add rescale betas with zero SNR option (applicable to Euler and DDIM, allows for higher dynamic range) -- **Process** - - create videos from batch or folder processing - supports GIF, PNG and MP4 with full interpolation, scene change detection, etc. - - **LoRA** +- **General** + - **Process** create videos from batch or folder processing + supports GIF, PNG and MP4 with full interpolation, scene change detection, etc. + - **LoRA** - add support for block weights, thanks @AI-Casanova example `` - - reintroduce alternative loading method in settings: `lora_force_diffusers` + - reintroduce alternative loading method in settings: `lora_force_diffusers` - add support for `lora_fuse_diffusers` if using alternative method use if you have multiple complex loras that may be causing performance degradation as it fuses lora with model during load instead of interpreting lora on-the-fly -- **General** - **CivitAI downloader** allow usage of access tokens for gated or private models - **Extra networks** new *settting -> extra networks -> build info on first access* indexes all networks on first access instead of server startup diff --git a/modules/images.py b/modules/images.py index f3b7dbd09..84b861626 100644 --- a/modules/images.py +++ b/modules/images.py @@ -579,7 +579,6 @@ save_thread.start() def save_image(image, path, basename='', seed=None, prompt=None, extension=shared.opts.samples_format, info=None, short_filename=False, no_prompt=False, grid=False, pnginfo_section_name='parameters', p=None, existing_info=None, forced_filename=None, suffix='', save_to_dirs=None): # pylint: disable=unused-argument - import sys if image is None: shared.log.warning('Image is none') return None, None @@ -683,7 +682,7 @@ def save_video(p, images, filename = None, video_type: str = 'none', duration: f filename = os.path.join(shared.opts.outdir_video, filename) filename = namegen.sequence(filename, shared.opts.outdir_video, '') else: - if not os.pathsep in filename: + if os.pathsep not in filename: filename = os.path.join(shared.opts.outdir_video, filename) if not filename.lower().endswith(video_type.lower()): filename += f'.{video_type.lower()}' diff --git a/modules/shared.py b/modules/shared.py index 1d6ee1586..4fc1bb856 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -280,7 +280,7 @@ options_templates.update(options_section(('cuda', "Compute Settings"), { "cuda_dtype": OptionInfo("FP32" if sys.platform == "darwin" or cmd_opts.use_openvino else "BF16" if devices.backend == "ipex" else "FP16", "Device precision type", gr.Radio, {"choices": ["FP32", "FP16", "BF16"]}), "no_half": OptionInfo(False if not cmd_opts.use_openvino else True, "Use full precision for model (--no-half)", None, None, None), "no_half_vae": OptionInfo(False if not cmd_opts.use_openvino else True, "Use full precision for VAE (--no-half-vae)"), - "upcast_sampling": OptionInfo(False if not sys.platform == "darwin" else True, "Enable upcast sampling"), + "upcast_sampling": OptionInfo(False if sys.platform != "darwin" else True, "Enable upcast sampling"), "upcast_attn": OptionInfo(False, "Enable upcast cross attention layer"), "cuda_cast_unet": OptionInfo(False, "Use fixed UNet precision"), "disable_nan_check": OptionInfo(True, "Disable NaN check in produced images/latent spaces", gr.Checkbox, {"visible": False}),