Skip to content

Commit

Permalink
style: fix
Browse files Browse the repository at this point in the history
style: fix types for pipline map
  • Loading branch information
tazlin committed Jul 16, 2024
1 parent 20a1ddc commit 559be00
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion hordelib/horde.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class HordeLib:
}

# pipeline parameter <- hordelib payload parameter mapping
PAYLOAD_TO_PIPELINE_PARAMETER_MAPPING = { # FIXME
PAYLOAD_TO_PIPELINE_PARAMETER_MAPPING: dict[str, str | Callable] = { # FIXME
"sampler.sampler_name": "sampler_name",
"sampler.cfg": "cfg_scale",
"sampler.denoise": "denoising_strength",
Expand Down Expand Up @@ -820,6 +820,9 @@ def _final_pipeline_adjustments(self, payload, pipeline_data) -> tuple[dict, lis
# values for steps on things like stable cascade
if isinstance(key, FunctionType):
pipeline_params[newkey] = key(payload)
elif not isinstance(key, str):
logger.error(f"Invalid key {key}")
raise RuntimeError(f"Invalid key {key}")
elif "*" in key:
key, multiplier = key.split("*", 1)
elif key in payload:
Expand Down
2 changes: 1 addition & 1 deletion hordelib/nodes/facerestore_cf/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Packaged code in this directory (unless stated otherwise) licensed under GPL and sourced from https://github.com/mav-rik/facerestore_cf. See LICENSE for more information.
Packaged code in this directory (unless stated otherwise) licensed under GPL and sourced from https://github.com/mav-rik/facerestore_cf. See LICENSE for more information.
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ head:
[-1, 3, C3, [1024, False]], # 22 (P5/32-large)

[[16, 19, 22], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5)
]
]
2 changes: 1 addition & 1 deletion hordelib/nodes/node_model_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import torch
from loguru import logger

from hordelib.shared_model_manager import SharedModelManager
from hordelib.comfy_horde import log_free_ram
from hordelib.shared_model_manager import SharedModelManager


# Don't let the name fool you, this class is trying to load all the files that will be necessary
Expand Down

0 comments on commit 559be00

Please sign in to comment.