Skip to content

consts

ALCHEMY_PARAMETER_FIELDS

Bases: StrEnum

Field names that commonly appear in alchemy parameter payloads.

Source code in horde_sdk/generation_parameters/alchemy/consts.py
class ALCHEMY_PARAMETER_FIELDS(StrEnum):
    """Field names that commonly appear in alchemy parameter payloads."""

    result_id = auto()
    form = auto()
    source_image = auto()
    upscaler = auto()
    facefixer = auto()
    interrogator = auto()
    caption_model = auto()
    nsfw_detector = auto()

result_id class-attribute instance-attribute

result_id = auto()

form class-attribute instance-attribute

form = auto()

source_image class-attribute instance-attribute

source_image = auto()

upscaler class-attribute instance-attribute

upscaler = auto()

facefixer class-attribute instance-attribute

facefixer = auto()

interrogator class-attribute instance-attribute

interrogator = auto()

caption_model class-attribute instance-attribute

caption_model = auto()

nsfw_detector class-attribute instance-attribute

nsfw_detector = auto()

KNOWN_ALCHEMY_FORMS

Bases: StrEnum

Forms (type of services) for alchemist type workers.

(nsfw, caption, interrogation, post_process, etc...)

Source code in horde_sdk/generation_parameters/alchemy/consts.py
class KNOWN_ALCHEMY_FORMS(StrEnum):
    """Forms (type of services) for alchemist type workers.

    (nsfw, caption, interrogation, post_process, etc...)
    """

    nsfw = auto()
    """NSFW detection."""
    caption = auto()
    """Captioning (i.e., BLIP)."""
    interrogation = auto()
    """Interrogation (i.e., CLIP)."""
    post_process = auto()
    """Upscaling, facefixing, etc."""

nsfw class-attribute instance-attribute

nsfw = auto()

NSFW detection.

caption class-attribute instance-attribute

caption = auto()

Captioning (i.e., BLIP).

interrogation class-attribute instance-attribute

interrogation = auto()

Interrogation (i.e., CLIP).

post_process class-attribute instance-attribute

post_process = auto()

Upscaling, facefixing, etc.

KNOWN_UPSCALERS

Bases: StrEnum

The upscalers that are known to the API.

(RealESRGAN_x4plus, RealESRGAN_x2plus, RealESRGAN_x4plus_anime_6B, etc)

Source code in horde_sdk/generation_parameters/alchemy/consts.py
class KNOWN_UPSCALERS(StrEnum):
    """The upscalers that are known to the API.

    (RealESRGAN_x4plus, RealESRGAN_x2plus, RealESRGAN_x4plus_anime_6B, etc)
    """

    BACKEND_DEFAULT = auto()
    """The default model for the worker backend."""

    RealESRGAN_x4plus = auto()
    RealESRGAN_x2plus = auto()
    RealESRGAN_x4plus_anime_6B = auto()
    NMKD_Siax = auto()
    four_4x_AnimeSharp = "4x_AnimeSharp"
    """AKA 4x_AnimeSharp"""

BACKEND_DEFAULT class-attribute instance-attribute

BACKEND_DEFAULT = auto()

The default model for the worker backend.

RealESRGAN_x4plus class-attribute instance-attribute

RealESRGAN_x4plus = auto()

RealESRGAN_x2plus class-attribute instance-attribute

RealESRGAN_x2plus = auto()

RealESRGAN_x4plus_anime_6B class-attribute instance-attribute

RealESRGAN_x4plus_anime_6B = auto()

NMKD_Siax class-attribute instance-attribute

NMKD_Siax = auto()

four_4x_AnimeSharp class-attribute instance-attribute

four_4x_AnimeSharp = '4x_AnimeSharp'

AKA 4x_AnimeSharp

KNOWN_FACEFIXERS

Bases: StrEnum

The facefixers that are known to the API.

(CodeFormers, etc)

Source code in horde_sdk/generation_parameters/alchemy/consts.py
class KNOWN_FACEFIXERS(StrEnum):
    """The facefixers that are known to the API.

    (CodeFormers, etc)
    """

    BACKEND_DEFAULT = auto()
    """The default model for the worker backend."""

    GFPGAN = auto()
    CodeFormers = auto()

BACKEND_DEFAULT class-attribute instance-attribute

BACKEND_DEFAULT = auto()

The default model for the worker backend.

GFPGAN class-attribute instance-attribute

GFPGAN = auto()

CodeFormers class-attribute instance-attribute

CodeFormers = auto()

KNOWN_MISC_POST_PROCESSORS

Bases: StrEnum

The misc post processors that are known to the API.

(strip_background, etc)

Source code in horde_sdk/generation_parameters/alchemy/consts.py
class KNOWN_MISC_POST_PROCESSORS(StrEnum):
    """The misc post processors that are known to the API.

    (strip_background, etc)
    """

    strip_background = auto()

strip_background class-attribute instance-attribute

strip_background = auto()

KNOWN_CLIP_BLIP_TYPES

Bases: StrEnum

The CLIP and BLIP models that are known to the API.

Source code in horde_sdk/generation_parameters/alchemy/consts.py
class KNOWN_CLIP_BLIP_TYPES(StrEnum):
    """The CLIP and BLIP models that are known to the API."""

    caption = auto()
    """The caption (BLIP) model."""
    interrogation = auto()
    """The interrogation (CLIP) model."""
    nsfw = auto()
    """The NSFW model."""

caption class-attribute instance-attribute

caption = auto()

The caption (BLIP) model.

interrogation class-attribute instance-attribute

interrogation = auto()

The interrogation (CLIP) model.

nsfw class-attribute instance-attribute

nsfw = auto()

The NSFW model.

KNOWN_INTERROGATORS

Bases: StrEnum

The interrogators that are known to the API.

Source code in horde_sdk/generation_parameters/alchemy/consts.py
class KNOWN_INTERROGATORS(StrEnum):
    """The interrogators that are known to the API."""

    BACKEND_DEFAULT = auto()
    """The default model for the worker backend."""

    vit_l_14 = "sentence-transformers/clip-ViT-L-14"
    vit_big_g_14_laion2b_39b_b160k = "laion/CLIP-ViT-bigG-14-laion2B-39B-b160k"

BACKEND_DEFAULT class-attribute instance-attribute

BACKEND_DEFAULT = auto()

The default model for the worker backend.

vit_l_14 class-attribute instance-attribute

vit_l_14 = 'sentence-transformers/clip-ViT-L-14'

vit_big_g_14_laion2b_39b_b160k class-attribute instance-attribute

vit_big_g_14_laion2b_39b_b160k = (
    "laion/CLIP-ViT-bigG-14-laion2B-39B-b160k"
)

KNOWN_CAPTION_MODELS

Bases: StrEnum

The caption models that are known to the API.

Source code in horde_sdk/generation_parameters/alchemy/consts.py
class KNOWN_CAPTION_MODELS(StrEnum):
    """The caption models that are known to the API."""

    BACKEND_DEFAULT = auto()
    """The default model for the worker backend."""

    BLIP_BASE_SALESFORCE = "Salesforce/blip-image-captioning-base"
    BLIP_LARGE_SALESFORCE = "Salesforce/blip-image-captioning-large"

BACKEND_DEFAULT class-attribute instance-attribute

BACKEND_DEFAULT = auto()

The default model for the worker backend.

BLIP_BASE_SALESFORCE class-attribute instance-attribute

BLIP_BASE_SALESFORCE = (
    "Salesforce/blip-image-captioning-base"
)

BLIP_LARGE_SALESFORCE class-attribute instance-attribute

BLIP_LARGE_SALESFORCE = (
    "Salesforce/blip-image-captioning-large"
)

KNOWN_ALCHEMY_TYPES

Bases: StrEnum

The alchemy processes (types) that are known to the API.

(caption, GFPGAN, strip_background, etc)

Source code in horde_sdk/generation_parameters/alchemy/consts.py
class KNOWN_ALCHEMY_TYPES(StrEnum):
    """The alchemy processes (types) that are known to the API.

    (caption, GFPGAN, strip_background, etc)
    """

    _NONE = ""  # FIXME

    caption = KNOWN_CLIP_BLIP_TYPES.caption
    interrogation = KNOWN_CLIP_BLIP_TYPES.interrogation
    nsfw = KNOWN_CLIP_BLIP_TYPES.nsfw

    RealESRGAN_x4plus = KNOWN_UPSCALERS.RealESRGAN_x4plus
    RealESRGAN_x2plus = KNOWN_UPSCALERS.RealESRGAN_x2plus
    RealESRGAN_x4plus_anime_6B = KNOWN_UPSCALERS.RealESRGAN_x4plus_anime_6B
    NMKD_Siax = KNOWN_UPSCALERS.NMKD_Siax
    fourx_AnimeSharp = KNOWN_UPSCALERS.four_4x_AnimeSharp

    GFPGAN = KNOWN_FACEFIXERS.GFPGAN
    CodeFormers = KNOWN_FACEFIXERS.GFPGAN

    strip_background = KNOWN_MISC_POST_PROCESSORS.strip_background

caption class-attribute instance-attribute

caption = caption

interrogation class-attribute instance-attribute

interrogation = interrogation

nsfw class-attribute instance-attribute

nsfw = nsfw

RealESRGAN_x4plus class-attribute instance-attribute

RealESRGAN_x4plus = RealESRGAN_x4plus

RealESRGAN_x2plus class-attribute instance-attribute

RealESRGAN_x2plus = RealESRGAN_x2plus

RealESRGAN_x4plus_anime_6B class-attribute instance-attribute

RealESRGAN_x4plus_anime_6B = RealESRGAN_x4plus_anime_6B

NMKD_Siax class-attribute instance-attribute

NMKD_Siax = NMKD_Siax

fourx_AnimeSharp class-attribute instance-attribute

fourx_AnimeSharp = four_4x_AnimeSharp

GFPGAN class-attribute instance-attribute

GFPGAN = GFPGAN

CodeFormers class-attribute instance-attribute

CodeFormers = GFPGAN

strip_background class-attribute instance-attribute

strip_background = strip_background

is_upscaler_form

is_upscaler_form(form: KNOWN_ALCHEMY_TYPES | str) -> bool

Check if the form is an upscaler form.

Source code in horde_sdk/generation_parameters/alchemy/consts.py
def is_upscaler_form(form: KNOWN_ALCHEMY_TYPES | str) -> bool:
    """Check if the form is an upscaler form."""
    value = form
    if isinstance(form, KNOWN_ALCHEMY_TYPES):
        value = form.value

    return value in KNOWN_UPSCALERS.__members__ or value in KNOWN_UPSCALERS.__members__.values()

is_facefixer_form

is_facefixer_form(form: KNOWN_ALCHEMY_TYPES | str) -> bool

Check if the form is a facefixer form.

Source code in horde_sdk/generation_parameters/alchemy/consts.py
def is_facefixer_form(form: KNOWN_ALCHEMY_TYPES | str) -> bool:
    """Check if the form is a facefixer form."""
    value = form
    if isinstance(form, KNOWN_ALCHEMY_TYPES):
        value = form.value

    return value in KNOWN_FACEFIXERS.__members__ or value in KNOWN_FACEFIXERS.__members__.values()

is_interrogator_form

is_interrogator_form(
    form: KNOWN_ALCHEMY_TYPES | str,
) -> bool

Check if the form is an interrogator form.

Source code in horde_sdk/generation_parameters/alchemy/consts.py
def is_interrogator_form(form: KNOWN_ALCHEMY_TYPES | str) -> bool:
    """Check if the form is an interrogator form."""
    return form == KNOWN_CLIP_BLIP_TYPES.interrogation

is_caption_form

is_caption_form(form: KNOWN_ALCHEMY_TYPES | str) -> bool

Check if the form is a caption form.

Source code in horde_sdk/generation_parameters/alchemy/consts.py
def is_caption_form(form: KNOWN_ALCHEMY_TYPES | str) -> bool:
    """Check if the form is a caption form."""
    return form == KNOWN_CLIP_BLIP_TYPES.caption

is_nsfw_detector_form

is_nsfw_detector_form(
    form: KNOWN_ALCHEMY_TYPES | str,
) -> bool

Check if the form is an NSFW form.

Source code in horde_sdk/generation_parameters/alchemy/consts.py
def is_nsfw_detector_form(form: KNOWN_ALCHEMY_TYPES | str) -> bool:
    """Check if the form is an NSFW form."""
    return form == KNOWN_CLIP_BLIP_TYPES.nsfw

is_strip_background_form

is_strip_background_form(
    form: KNOWN_ALCHEMY_TYPES | str,
) -> bool

Check if the form is a strip background form.

Source code in horde_sdk/generation_parameters/alchemy/consts.py
def is_strip_background_form(form: KNOWN_ALCHEMY_TYPES | str) -> bool:
    """Check if the form is a strip background form."""
    return form == KNOWN_MISC_POST_PROCESSORS.strip_background