lint: correct annotations for Python 3.9.

This commit is contained in:
Kevin Turner 2022-11-25 13:52:29 -08:00
parent 716ca8f8b9
commit 56153c2ebf
3 changed files with 9 additions and 0 deletions

View File

@ -2,6 +2,8 @@
Base class for ldm.invoke.generator.* Base class for ldm.invoke.generator.*
including img2img, txt2img, and inpaint including img2img, txt2img, and inpaint
''' '''
from __future__ import annotations
import os import os
import os.path as osp import os.path as osp
import random import random

View File

@ -1,3 +1,5 @@
from __future__ import annotations
import secrets import secrets
import warnings import warnings
from dataclasses import dataclass from dataclasses import dataclass

View File

@ -4,15 +4,20 @@ They are moved between GPU and CPU as necessary. If CPU memory falls
below a preset minimum, the least recently used model will be below a preset minimum, the least recently used model will be
cleared and loaded from disk when next needed. cleared and loaded from disk when next needed.
''' '''
from __future__ import annotations
import contextlib
import gc import gc
import hashlib import hashlib
import io import io
import os import os
import sys import sys
import textwrap
import time import time
import traceback import traceback
import warnings import warnings
from pathlib import Path from pathlib import Path
from typing import Union
import torch import torch
import transformers import transformers