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: make forms and vram_to_leave_free optional in worker config #68

Merged
merged 2 commits into from
Oct 30, 2023
Merged
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
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