Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update facerestore node to facerestore_cf #285

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/maintests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Install tox and any other packages
run: |
python -m pip install --upgrade pip
pip install --upgrade -r requirements.dev.txt
pip install --upgrade tox
- name: Check build_helper.py horde-engine imports have no breaking dependency changes
run: tox -e test-build-helper
- name: Build unit test environment, confirm CUDA is available on host
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/prtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Run pre-commit
uses: pre-commit/[email protected]
with:
Expand All @@ -45,7 +47,7 @@ jobs:
- name: Install tox and any other packages
run: |
python -m pip install --upgrade pip
pip install --upgrade -r requirements.dev.txt
pip install --upgrade tox
- name: Check build_helper.py horde-engine imports have no breaking dependency changes
run: tox -e test-build-helper
- name: Build unit test environment, confirm CUDA is available on host
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ parts/
sdist/
var/
wheels/
models/
hordelib/models/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
Expand Down
8 changes: 8 additions & 0 deletions hordelib/comfy_horde.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,14 @@ def _set_comfyui_paths(self) -> None:
_comfy_supported_pt_extensions,
)

_comfy_folder_names_and_paths["facerestore_models"] = (
[
str(UserSettings.get_model_directory() / "gfpgan"),
str(UserSettings.get_model_directory() / "codeformer"),
],
_comfy_supported_pt_extensions,
)

_comfy_folder_names_and_paths["controlnet"] = (
[
_comfy_folder_names_and_paths["controlnet"][0][0],
Expand Down
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
204 changes: 0 additions & 204 deletions hordelib/nodes/facerestore/__init__.py

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions hordelib/nodes/facerestore/facelib/utils/__init__.py

This file was deleted.

Loading
Loading