Domain
class yandex_cloud_ml_sdk._models.image_generation.function.ImageGeneration
A class for image generation models.
It provides the functionality to call an image generation model by constructing the appropriate URI based on the provided model name and version.
Returns a model’s object through which requests to the backend are made.
>>> model = sdk.models.image_generation('yandex-art') # this is how the model is created
__call__(model_name, *, model_version='latest')
Call the image generation model with the specified name and version.
Constructs the URI for the model based on the provided model’s name and version. If the name contains ://, it is treated as a complete URI. Otherwise, it looks up the model name in the well-known names dictionary. But after this, in any case, we construct a URI in the form art://<folder_id>/
|
Parameters |
Model
class yandex_cloud_ml_sdk._models.image_generation.model.ImageGenerationModel
A class of the one, concrete model. This model encapsulates the URI and configuration.
run_deferred(messages, *, timeout=60)
Executes the image generation operation asynchronously and returns an operation representing the ongoing image generation process.
|
Parameters |
|
|
Return type |
attach_deferred(operation_id, timeout=60)
Attaches to an ongoing image generation operation.
|
Parameters |
|
|
Return type |
property config: ConfigTypeT
configure(*, seed=Undefined, width_ratio=Undefined, height_ratio=Undefined, mime_type=Undefined)
Configures the image generation model with specified parameters and returns the configured instance of the model.
|
Parameters |
|
|
Return type |
property uri: str