Skip to content

Commit

Permalink
Merge pull request #68 from Haidra-Org/main
Browse files Browse the repository at this point in the history
fix: make `forms` and `vram_to_leave_free` optional in worker config
  • Loading branch information
tazlin authored Oct 30, 2023
2 parents 31ac464 + 48b675b commit e0a16b0
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 e0a16b0

Please sign in to comment.