Skip to content

Commit

Permalink
Merge pull request #100 from Haidra-Org/main
Browse files Browse the repository at this point in the history
feat: support for lora is_version
  • Loading branch information
tazlin authored Dec 26, 2023
2 parents ad3a5a3 + 1de348a commit 0069059
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 15 deletions.
2 changes: 2 additions & 0 deletions horde_sdk/ai_horde_api/apimodels/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ class LorasPayloadEntry(BaseModel):
"""The strength of the LoRa against the clip model."""
inject_trigger: str | None = Field(default=None, min_length=1, max_length=30)
"""Any trigger required to activate the LoRa model."""
is_version: bool = Field(default=False)
"""If true, will treat the lora name as a version ID."""


class TIPayloadEntry(BaseModel):
Expand Down
6 changes: 3 additions & 3 deletions horde_sdk/ai_horde_api/apimodels/generate/_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class ImageGenerationJobSubmitRequest(BaseAIHordeRequest, JobRequestMixin, APIKe
def validate_generation(self) -> ImageGenerationJobSubmitRequest:
if self.generation == "":
logger.error("Generation cannot be an empty string.")
logger.error(self)
logger.error(self.log_safe_model_dump())

if self.seed == 0:
logger.error("Seed cannot be 0.")
logger.error(self)
logger.debug(f"Seed is 0 for {self.id_}. That might not be intended.")
logger.debug(self.log_safe_model_dump())

return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"name": "GlowingRunesAIV6",
"model": 1.0,
"clip": 1.0,
"inject_trigger": "a"
"inject_trigger": "a",
"is_version": false
}
],
"tis": [
Expand Down Expand Up @@ -59,5 +60,6 @@
"r2": true,
"shared": false,
"replacement_filter": true,
"dry_run": false
"dry_run": false,
"proxied_account": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"aaa"
],
"bridge_version": 1,
"bridge_agent": "AI Horde Worker:11:https://github.com/db0/AI-Horde-Worker",
"bridge_agent": "AI Horde Worker:24:https://github.com/db0/AI-Horde-Worker",
"threads": 1,
"require_upfront_kudos": false,
"max_pixels": 262144,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"use_default_badwordsids": true,
"stop_sequence": [
""
]
],
"min_p": 0.0
},
"softprompt": "a",
"trusted_workers": false,
Expand All @@ -36,5 +37,6 @@
"models": [
""
],
"dry_run": false
"dry_run": false,
"proxied_account": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"aaa"
],
"bridge_version": 1,
"bridge_agent": "AI Horde Worker:11:https://github.com/db0/AI-Horde-Worker",
"bridge_agent": "AI Horde Worker:24:https://github.com/db0/AI-Horde-Worker",
"threads": 1,
"require_upfront_kudos": false,
"max_length": 512,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"amount": 1,
"bridge_version": 1,
"bridge_agent": "AI Horde Worker:11:https://github.com/db0/AI-Horde-Worker",
"bridge_agent": "AI Horde Worker:24:https://github.com/db0/AI-Horde-Worker",
"threads": 1,
"max_tiles": 16
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"flagged": false,
"customizer": false,
"vpn": false,
"service": false,
"special": false,
"filtered": false,
"reset_suspicion": false,
"contact": "[email protected]"
"contact": "[email protected]",
"admin_comment": "User is sus"
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
"trusted": false,
"flagged": false,
"vpn": false,
"service": false,
"special": false,
"suspicious": 0,
"pseudonymous": false,
"contact": "[email protected]",
"admin_comment": "User is sus",
"account_age": 60,
"usage": {
"megapixelsteps": 0.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"name": "GlowingRunesAIV6",
"model": 1.0,
"clip": 1.0,
"inject_trigger": "a"
"inject_trigger": "a",
"is_version": false
}
],
"tis": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"stop_sequence": [
""
],
"min_p": 0.0,
"prompt": ""
},
"id": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
"trusted": false,
"flagged": false,
"vpn": false,
"service": false,
"special": false,
"suspicious": 0,
"pseudonymous": false,
"contact": "[email protected]",
"admin_comment": "User is sus",
"account_age": 60,
"usage": {
"megapixelsteps": 0.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
"trusted": false,
"flagged": false,
"vpn": false,
"service": false,
"special": false,
"suspicious": 0,
"pseudonymous": false,
"contact": "[email protected]",
"admin_comment": "User is sus",
"account_age": 60,
"usage": {
"megapixelsteps": 0.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"flagged": false,
"customizer": false,
"vpn": false,
"service": false,
"special": false,
"new_suspicion": 0,
"contact": "[email protected]"
"contact": "[email protected]",
"admin_comment": "User is sus"
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"id": ""
},
"contact": "[email protected]",
"bridge_agent": "AI Horde Worker:11:https://github.com/db0/AI-Horde-Worker",
"bridge_agent": "AI Horde Worker:24:https://github.com/db0/AI-Horde-Worker",
"max_pixels": 262144,
"megapixelsteps_generated": 0.0,
"img2img": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"id": ""
},
"contact": "[email protected]",
"bridge_agent": "AI Horde Worker:11:https://github.com/db0/AI-Horde-Worker",
"bridge_agent": "AI Horde Worker:24:https://github.com/db0/AI-Horde-Worker",
"max_pixels": 262144,
"megapixelsteps_generated": 0.0,
"img2img": false,
Expand Down

0 comments on commit 0069059

Please sign in to comment.