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

fix: more accurate gen_metadata logic; always send nsfw information #295

Merged
merged 4 commits into from
Sep 28, 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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ repos:
- horde_safety==0.2.3
- torch==2.3.1
- ruamel.yaml
- horde_engine==2.15.2
- horde_sdk==0.14.10
- horde_engine==2.15.3
- horde_sdk==0.14.11
- horde_model_reference==0.9.0
- semver
2 changes: 1 addition & 1 deletion horde-bridge.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cd /d %~dp0
call runtime python -s -m pip -V

call python -s -m pip uninstall hordelib
call python -s -m pip install horde_sdk~=0.14.10 horde_model_reference~=0.9.0 horde_engine~=2.15.2 horde_safety~=0.2.3 -U
call python -s -m pip install horde_sdk~=0.14.11 horde_model_reference~=0.9.0 horde_engine~=2.15.3 horde_safety~=0.2.3 -U

if %ERRORLEVEL% NEQ 0 (
echo "Please run update-runtime.cmd."
Expand Down
2 changes: 1 addition & 1 deletion horde_worker_regen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

ASSETS_FOLDER_PATH = Path(__file__).parent / "assets"

__version__ = "9.0.4"
__version__ = "9.0.5"


import pkg_resources # noqa: E402
Expand Down
2 changes: 1 addition & 1 deletion horde_worker_regen/_version_meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"recommended_version": "9.0.4",
"recommended_version": "9.0.5",
"required_min_version": "9.0.2",
"required_min_version_update_date": "2024-09-26",
"required_min_version_info": {
Expand Down
13 changes: 9 additions & 4 deletions horde_worker_regen/process_management/process_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1816,12 +1816,17 @@ def receive_and_handle_process_messages(self) -> None:
completed_job_info.state = GENERATION_STATE.csam
elif message.safety_evaluations[i].is_nsfw:
new_meta_entry = GenMetadataEntry(
type=METADATA_TYPE.censorship,
type=METADATA_TYPE.information,
value=METADATA_VALUE.nsfw,
)
completed_job_info.job_image_results[i].generation_faults.append(new_meta_entry)
if completed_job_info.state != GENERATION_STATE.csam:
completed_job_info.state = GENERATION_STATE.censored
if message.safety_evaluations[i].replacement_image_base64 is not None:
new_meta_entry = GenMetadataEntry(
type=METADATA_TYPE.censorship,
value=METADATA_VALUE.nsfw,
)
completed_job_info.job_image_results[i].generation_faults.append(new_meta_entry)
if completed_job_info.state != GENERATION_STATE.csam:
completed_job_info.state = GENERATION_STATE.censored
else:
completed_job_info.censored = False
# logger.debug([c.generation_faults for c in completed_job_info.job_image_results])
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "horde_worker_regen"
version = "9.0.4"
version = "9.0.5"
description = "Allows you to connect to the AI Horde and generate images for users."
authors = [
{name = "tazlin", email = "[email protected]"},
Expand Down
4 changes: 2 additions & 2 deletions requirements.rocm.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
numpy==1.26.4
torch==2.3.1+rocm6.0

horde_sdk~=0.14.10
horde_sdk~=0.14.11
horde_safety~=0.2.3
horde_engine~=2.15.2
horde_engine~=2.15.3
horde_model_reference~=0.9.0

python-dotenv
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
numpy==1.26.4
torch==2.3.1

horde_sdk~=0.14.10
horde_sdk~=0.14.11
horde_safety~=0.2.3
horde_engine~=2.15.2
horde_engine~=2.15.3
horde_model_reference>=0.9.0

python-dotenv
Expand Down
Loading