Skip to main content

AI Model Application

This block allows you to apply AI model to process an input. The configurable options of the AI model application block is as follows:

URL

the URL of the AI model, which is HTTPS URL of a CoreML file with the .mlmodel extension.

Model Type

Specify the type of the model. Currently this block support 2 types of models: Image to Image and Image Object Detection.

Result Confirmer

turning this option on will show a confirmation dialog before the result is sent to the next block. This is useful when you want to make sure the result is correct before sending it to the next block.

Confidence Threshold

Some models will return a list of possible results, with a confidence score for each result. This option allows you to specify the minimum confidence score for a result to be considered valid. For example, if you set this option to 0.5, then only results with a confidence score of 0.5 or higher will be considered valid.

The following options are for Stable Diffusion only.

Seed

The seed is used to generate a random number. This is useful when you want to generate a random number in a block. Different seeds will generate different images.

Guidance Scale

The Guidance Scale parameter controls how closely Stable Diffusion will follow your prompt when generating images.

Number of Inference Steps

The Number of Inference Steps parameter controls how many times Stable Diffusion will run inference on the image. The higher the number, the more the image will be refined.

Disable Safety

Turning this option on will disable the safety mechanism in Stable Diffusion. This is useful when you want to generate images that are not safe for work.

Also, you must have safetyChecker in your model to use this option. Otherwise, this option will be ignored.

Number Of Images

The Number Of Images parameter controls how many images will be generated. The higher the number, the more images will be generated. The default value is 1 and recommended to be 1 for performance reasons.

Strength

The Strength parameter controls how strong the prompt will be. The higher the number, the stronger the prompt will be.