mark unused params, fix shared lists
This commit is contained in:
parent
b7a780bacc
commit
3789862a6f
|
@ -67,7 +67,7 @@ def noise_source_fill_edge(
|
||||||
|
|
||||||
|
|
||||||
def noise_source_fill_mask(
|
def noise_source_fill_mask(
|
||||||
source: Image.Image, dims: Point, origin: Point, fill="white", **kw
|
_source: Image.Image, dims: Point, origin: Point, fill="white", **kw
|
||||||
) -> Image.Image:
|
) -> Image.Image:
|
||||||
"""
|
"""
|
||||||
Fill the whole canvas, no source or noise.
|
Fill the whole canvas, no source or noise.
|
||||||
|
@ -95,7 +95,7 @@ def noise_source_gaussian(
|
||||||
|
|
||||||
|
|
||||||
def noise_source_uniform(
|
def noise_source_uniform(
|
||||||
source: Image.Image, dims: Point, origin: Point, **kw
|
_source: Image.Image, dims: Point, origin: Point, **kw
|
||||||
) -> Image.Image:
|
) -> Image.Image:
|
||||||
width, height = dims
|
width, height = dims
|
||||||
size = width * height
|
size = width * height
|
||||||
|
@ -115,7 +115,7 @@ def noise_source_uniform(
|
||||||
|
|
||||||
|
|
||||||
def noise_source_normal(
|
def noise_source_normal(
|
||||||
source: Image.Image, dims: Point, origin: Point, **kw
|
_source: Image.Image, dims: Point, origin: Point, **kw
|
||||||
) -> Image.Image:
|
) -> Image.Image:
|
||||||
width, height = dims
|
width, height = dims
|
||||||
size = width * height
|
size = width * height
|
||||||
|
|
|
@ -18,13 +18,13 @@ class ServerContext:
|
||||||
cors_origin: str = "*",
|
cors_origin: str = "*",
|
||||||
num_workers: int = 1,
|
num_workers: int = 1,
|
||||||
any_platform: bool = True,
|
any_platform: bool = True,
|
||||||
block_platforms: List[str] = [],
|
block_platforms: List[str] = None,
|
||||||
default_platform: str = None,
|
default_platform: str = None,
|
||||||
image_format: str = "png",
|
image_format: str = "png",
|
||||||
cache: ModelCache = None,
|
cache: ModelCache = None,
|
||||||
cache_path: str = None,
|
cache_path: str = None,
|
||||||
show_progress: bool = True,
|
show_progress: bool = True,
|
||||||
optimizations: List[str] = [],
|
optimizations: List[str] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.bundle_path = bundle_path
|
self.bundle_path = bundle_path
|
||||||
self.model_path = model_path
|
self.model_path = model_path
|
||||||
|
@ -33,13 +33,13 @@ class ServerContext:
|
||||||
self.cors_origin = cors_origin
|
self.cors_origin = cors_origin
|
||||||
self.num_workers = num_workers
|
self.num_workers = num_workers
|
||||||
self.any_platform = any_platform
|
self.any_platform = any_platform
|
||||||
self.block_platforms = block_platforms
|
self.block_platforms = block_platforms or []
|
||||||
self.default_platform = default_platform
|
self.default_platform = default_platform
|
||||||
self.image_format = image_format
|
self.image_format = image_format
|
||||||
self.cache = cache or ModelCache(num_workers)
|
self.cache = cache or ModelCache(num_workers)
|
||||||
self.cache_path = cache_path or path.join(model_path, ".cache")
|
self.cache_path = cache_path or path.join(model_path, ".cache")
|
||||||
self.show_progress = show_progress
|
self.show_progress = show_progress
|
||||||
self.optimizations = optimizations
|
self.optimizations = optimizations or []
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_environ(cls):
|
def from_environ(cls):
|
||||||
|
|
Loading…
Reference in New Issue