mirror of https://github.com/vladmandic/automatic
parent
a4bc61919d
commit
4f336d3aab
|
|
@ -76,7 +76,6 @@ persistent=yes
|
|||
py-version=3.9
|
||||
recursive=no
|
||||
source-roots=
|
||||
suggestion-mode=yes
|
||||
unsafe-load-any-extension=no
|
||||
|
||||
[BASIC]
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ def run_pip(pkg, desc=None): # compatbility function
|
|||
desc = pkg
|
||||
for f in forbidden:
|
||||
if f in pkg:
|
||||
debug_install('Blocked package installation: package={f}')
|
||||
debug_install(f'Blocked package installation: package={f}')
|
||||
return True
|
||||
index_url_line = f' --index-url {index_url}' if index_url != '' else ''
|
||||
return run(f'"{sys.executable}" -m pip {pkg} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ def download_url_to_file(url: str, dst: str):
|
|||
continue
|
||||
break
|
||||
else:
|
||||
shared.log.error('Error downloading: url={url} no usable temporary filename found')
|
||||
shared.log.error(f'Error downloading: url={url} no usable temporary filename found')
|
||||
return
|
||||
try:
|
||||
with Progress(TextColumn('[cyan]{task.description}'), BarColumn(), TaskProgressColumn(), TimeRemainingColumn(), TimeElapsedColumn(), console=shared.console) as progress:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import typing
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import torch
|
||||
import numpy as np
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ def encode(*args):
|
|||
class RestrictedUnpickler(pickle.Unpickler):
|
||||
extra_handler = None
|
||||
|
||||
def persistent_load(self, saved_id):
|
||||
assert saved_id[0] == 'storage'
|
||||
def persistent_load(self, pid):
|
||||
assert pid[0] == 'storage'
|
||||
try:
|
||||
return TypedStorage(_internal=True)
|
||||
except TypeError:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# pylint: disable=redefined-builtin,no-member,protected-access
|
||||
|
||||
from typing import Any, Dict, List, Tuple, Optional, Union
|
||||
from typing import Dict, List, Tuple, Optional, Union
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
|
||||
|
|
@ -463,7 +463,7 @@ class SDNQQuantizer(DiffusersQuantizer, HfQuantizer):
|
|||
*args, **kwargs, # pylint: disable=unused-argument
|
||||
):
|
||||
if self.pre_quantized:
|
||||
layer, tensor_name = get_module_from_name(model, param_name)
|
||||
layer, _tensor_name = get_module_from_name(model, param_name)
|
||||
if hasattr(layer, "sdnq_dequantizer"):
|
||||
return True
|
||||
elif param_name.endswith(".weight"):
|
||||
|
|
|
|||
|
|
@ -8,4 +8,4 @@ current_dir = os.path.dirname(os.path.abspath(__file__))
|
|||
parent_dir = os.path.dirname(current_dir)
|
||||
if parent_dir not in sys.path:
|
||||
sys.path.insert(0, parent_dir)
|
||||
"""
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1288,7 +1288,7 @@ class VideoAutoencoderKL(diffusers.AutoencoderKL):
|
|||
result_rows.append(torch.cat(result_row, dim=4))
|
||||
dec = torch.cat(result_rows, dim=3)
|
||||
return dec
|
||||
|
||||
|
||||
def forward(
|
||||
self, x: torch.FloatTensor, mode: Literal["encode", "decode", "all"] = "all", **kwargs
|
||||
):
|
||||
|
|
|
|||
|
|
@ -162,10 +162,10 @@ def load_cascade_combined(checkpoint_info, diffusers_load_config):
|
|||
|
||||
# Balanced offload hooks:
|
||||
class StableCascadeDecoderPipelineFixed(diffusers.StableCascadeDecoderPipeline):
|
||||
def guidance_scale(self):
|
||||
def guidance_scale(self): # pylint: disable=invalid-overridden-method
|
||||
return self._guidance_scale
|
||||
|
||||
def do_classifier_free_guidance(self):
|
||||
def do_classifier_free_guidance(self): # pylint: disable=invalid-overridden-method
|
||||
return self._guidance_scale > 1
|
||||
|
||||
@torch.no_grad()
|
||||
|
|
|
|||
Loading…
Reference in New Issue