Skip to content

Commit

Permalink
Merge pull request #67 from Haidra-Org/config
Browse files Browse the repository at this point in the history
fix: make `forms` and `vram_to_keep_free` optional in worker config
  • Loading branch information
tazlin authored Oct 30, 2023
2 parents 7ceb6a0 + 37ad22f commit 48b675b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions horde_sdk/ai_horde_worker/bridge_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class ImageWorkerBridgeData(SharedHordeBridgeData):
)
"""The amount of RAM to leave free for the system to use. This is a percentage or a number in megabytes."""

vram_to_leave_free: str = Field(
vram_to_leave_free: str | None = Field(
default="80%",
pattern=r"^\d+%$|^\d+$",
json_schema_extra={"unit": "Percent or MB"},
Expand All @@ -259,7 +259,9 @@ class ImageWorkerBridgeData(SharedHordeBridgeData):
alchemist_name: str = "An Awesome Alchemist"
"""The name of the worker if it is an alchemist. This is used to easily identify the worker."""

forms: list[str]
forms: list[str] = Field(
default_factory=list,
)
"""The type of services or processing an alchemist worker will provide."""

@field_validator("forms", mode="before")
Expand Down

0 comments on commit 48b675b

Please sign in to comment.