_async
ImageGenerateAsyncResponse
Bases: HordeResponseBaseModel, JobResponseMixin, ResponseRequiringFollowUpMixin, ContainsMessageResponseMixin
Represents the data returned from the /v2/generate/async endpoint.
v2 API Model: RequestAsync
Source code in horde_sdk/ai_horde_api/apimodels/generate/_async.py
warnings
class-attribute
instance-attribute
Any warnings that were generated by the server or a serving worker.
validate_warnings
Source code in horde_sdk/ai_horde_api/apimodels/generate/_async.py
get_follow_up_returned_params
get_follow_up_default_request_type
classmethod
get_follow_up_request_types
classmethod
Source code in horde_sdk/ai_horde_api/apimodels/generate/_async.py
get_follow_up_failure_cleanup_request_type
classmethod
get_api_model_name
classmethod
__hash__
ImageGenerateAsyncDryRunResponse
ImageGenerationInputPayload
Bases: ImageGenerateParamMixin
Represents the 'params' field in the /v2/generate/async endpoint.
v2 API Model: ModelGenerationInputStable
Source code in horde_sdk/ai_horde_api/apimodels/generate/_async.py
steps
class-attribute
instance-attribute
The number of image generation steps to perform.
n
class-attribute
instance-attribute
The number of images to generate. Defaults to 1, maximum is 20.
get_api_model_name
classmethod
validate_n
ImageGenerateAsyncRequest
Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin, RequestUsesWorkerMixin
Represents the data needed to make a request to the /v2/generate/async endpoint.
v2 API Model: GenerationInputStable
Source code in horde_sdk/ai_horde_api/apimodels/generate/_async.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | |
prompt
instance-attribute
The prompt which will be sent to Stable Diffusion to generate an image.
params
class-attribute
instance-attribute
The parameters for the image generation.
nsfw
class-attribute
instance-attribute
Set to true if this request is NSFW. This will skip workers which censor images.
censor_nsfw
class-attribute
instance-attribute
If the request is SFW, and the worker accidentally generates NSFW, it will send back a censored image.
r2
class-attribute
instance-attribute
If True, the image will be sent via cloudflare r2 download link.
shared
class-attribute
instance-attribute
If True, The image will be shared with LAION for improving their dataset. This will also reduce your kudos consumption by 2. For anonymous users, this is always True.
replacement_filter
class-attribute
instance-attribute
If enabled, suspicious prompts are sanitized through a string replacement filter instead.
source_image
class-attribute
instance-attribute
The public URL of the source image or a base64 string to use.
source_processing
class-attribute
instance-attribute
If source_image is provided, specifies how to process it.
source_mask
class-attribute
instance-attribute
If source_processing is set to 'inpainting' or 'outpainting', this parameter can be optionally provided as the Base64-encoded webp mask of the areas to inpaint. If this arg is not passed, the inpainting/outpainting mask has to be embedded as alpha channel.
extra_source_images
class-attribute
instance-attribute
Additional uploaded images which can be used for further operations.