<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > SD - Stable Diffusion AI > SDO. Stable Diffusion Online > SDO. Stable Diffusion Online |
MiniRobotLanguage (MRL)
SDO.Set ReSize
Set the final output size for images generated by Stable Diffusion Online (SDO), with optional resizing mode.
Intention
The "SDO.SetReSize" command allows users to define a custom final size for the images generated by Stable Diffusion (SD). This command resizes the rendered image to any specified size, offering flexibility beyond the limited resolutions that SD can render natively. Unlike the "SDO.Set Size" command, which requests SD to render the picture at a specific size, "SDO.SetReSize" takes the rendered image and resizes it, providing more control over the output dimensions.
•Resizing vs. Rendering Size: The "SDO.SetReSize" command offers more flexibility in defining the final image size compared to "SDO.Set Size". While "SDO.Set Size" requests SD to render the image at a specific size, the rendering resolutions are limited. In contrast, "SDO.SetReSize" can resize the rendered image to any specified dimensions.
•Resizing Mode: Users can choose between smooth and sharp resizing modes. Smooth resizing provides a softer appearance, while sharp resizing maintains more distinct edges. The choice depends on the desired visual effect and the nature of the image content.
•Compatibility: This command works with both local and online rendering via the SDO. / SDL. suite of commands.
•Limited Resolutions: While SD can render images in limited resolutions, "SDO.SetReSize" allows users to achieve any desired output size by resizing the rendered image.
Syntax
SDO.Set ReSize|P1|P2[|P3]
Parameter Explanation
•P1: Specifies the width of the final output image. Must be a positive integer.
•P2: Specifies the height of the final output image. If omitted or set to "0", the height will be equal to the width (P2 = P1).
•P3: (Optional) Specifies the resizing mode. "0" for smooth resizing and "1" for sharp resizing. If omitted, the default is smooth.
Example
'***********************************
' SDO.-Sample
'***********************************
' Resize the final output image to 800x600, using smooth resizing
SDO.SetReSize|800|600|0
' Resize the final output image to 500x500, using sharp resizing
SDO.SetReSize|500|500|1
' Resize the final output image to 400x400, using the default smooth resizing
SDO.SetReSize|400|400
Remarks
-
Limitations:
-
See also:
•