diff --git a/modules/async_worker.py b/modules/async_worker.py index 17455053..c22b8dc8 100644 --- a/modules/async_worker.py +++ b/modules/async_worker.py @@ -48,7 +48,6 @@ def worker(): from extras.expansion import safe_str from modules.util import remove_empty_str, HWC3, resize_image, get_image_shape_ceil, set_image_shape_ceil, \ get_shape_ceil, resample_image, erode_or_dilate, ordinal_suffix, get_enabled_loras - from modules.upscaler import perform_upscale from modules.flags import Performance from modules.meta_parser import get_metadata_parser, MetadataScheme diff --git a/modules/util.py b/modules/util.py index c143e2c4..e36ea6ee 100644 --- a/modules/util.py +++ b/modules/util.py @@ -1,14 +1,11 @@ -import typing - import numpy as np import datetime import random import math import os import cv2 - import re -from typing import List, Tuple, AnyStr +from typing import List, Tuple, AnyStr, NamedTuple import json @@ -320,7 +317,7 @@ def extract_styles_from_prompt(prompt, negative_prompt): return list(reversed(extracted)), real_prompt, negative_prompt -class PromptStyle(typing.NamedTuple): +class PromptStyle(NamedTuple): name: str prompt: str negative_prompt: str