mirror of
https://github.com/Bing-su/adetailer.git
synced 2026-01-26 11:19:53 +00:00
refactor(script): reduce complexity
This commit is contained in:
@@ -5,6 +5,8 @@ from copy import copy
|
||||
from typing import TYPE_CHECKING, Any, Union
|
||||
|
||||
import torch
|
||||
from PIL import Image
|
||||
from typing_extensions import Protocol
|
||||
|
||||
from modules import safe
|
||||
from modules.shared import opts
|
||||
@@ -57,3 +59,7 @@ def preserve_prompts(p: PT):
|
||||
|
||||
def copy_extra_params(extra_params: dict[str, Any]) -> dict[str, Any]:
|
||||
return {k: v for k, v in extra_params.items() if not callable(v)}
|
||||
|
||||
|
||||
class PPImage(Protocol):
|
||||
image: Image.Image
|
||||
|
||||
Reference in New Issue
Block a user