-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #276 from Haidra-Org/main
fix: config default root models to allow new API fields
- Loading branch information
Showing
46 changed files
with
798 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# _styles | ||
::: horde_sdk.ai_horde_api.apimodels._styles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from enum import auto | ||
|
||
from pydantic import Field | ||
from strenum import StrEnum | ||
|
||
from horde_sdk.generic_api.apimodels import HordeAPIDataObject | ||
|
||
|
||
class StyleType(StrEnum): | ||
"""An enum representing the different types of styles.""" | ||
|
||
image = auto() | ||
text = auto() | ||
|
||
|
||
class ResponseModelStylesUser(HordeAPIDataObject): | ||
name: str | ||
id_: str = Field(alias="id") | ||
type_: StyleType = Field(alias="type") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
tests/test_data/ai_horde_api/example_payloads/_v2_collections_collection_id_patch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "My Awesome Collection", | ||
"info": "Collection of optimistic styles", | ||
"public": true, | ||
"styles": [ | ||
"a" | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
tests/test_data/ai_horde_api/example_payloads/_v2_collections_post.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "My Awesome Collection", | ||
"info": "Collection of optimistic styles", | ||
"public": true, | ||
"styles": [ | ||
"a" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
tests/test_data/ai_horde_api/example_payloads/_v2_styles_image_post.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"name": "My Awesome Image Style", | ||
"info": "photorealism excellence.", | ||
"prompt": "{p}{np}", | ||
"params": { | ||
"sampler_name": "k_euler", | ||
"cfg_scale": 7.5, | ||
"denoising_strength": 0.75, | ||
"hires_fix_denoising_strength": 0.75, | ||
"height": 512, | ||
"width": 512, | ||
"post_processing": [ | ||
"GFPGAN" | ||
], | ||
"karras": false, | ||
"tiling": false, | ||
"hires_fix": false, | ||
"clip_skip": 1, | ||
"facefixer_strength": 0.75, | ||
"loras": [ | ||
{ | ||
"name": "Magnagothica", | ||
"model": 1.0, | ||
"clip": 1.0, | ||
"inject_trigger": "a", | ||
"is_version": false | ||
} | ||
], | ||
"tis": [ | ||
{ | ||
"name": "7808", | ||
"inject_ti": "prompt", | ||
"strength": 1.0 | ||
} | ||
], | ||
"special": { | ||
"additionalProp1": {}, | ||
"additionalProp2": {}, | ||
"additionalProp3": {} | ||
}, | ||
"workflow": "qr_code", | ||
"transparent": false, | ||
"steps": 30 | ||
}, | ||
"public": true, | ||
"nsfw": false, | ||
"tags": [ | ||
"photorealistic" | ||
], | ||
"models": [ | ||
"stable_diffusion" | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
...ata/ai_horde_api/example_payloads/_v2_styles_image_style_id_example_example_id_patch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"url": "https://lemmy.dbzer0.com/pictrs/image/c9915186-ca30-4f5a-873c-a91287fb4419.webp", | ||
"primary": false | ||
} |
4 changes: 4 additions & 0 deletions
4
tests/test_data/ai_horde_api/example_payloads/_v2_styles_image_style_id_example_post.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"url": "https://lemmy.dbzer0.com/pictrs/image/c9915186-ca30-4f5a-873c-a91287fb4419.webp", | ||
"primary": false | ||
} |
Oops, something went wrong.