Stable Diffusion Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > SD - Stable Diffusion AI > SDL. - Stable Diffusion Local System >

Stable Diffusion Commands

SDL.Copy Image to File

Previous Top Next


MiniRobotLanguage (MRL)

 

SDL.Copy Image to File

Save an image from the internal AIO_Image register Array to a file.

 

CTF_Image_0004

Created using the Script below.

 

Intention

 

Using SDL.Analyze and other Commands, the generated Image(s) are stored in a Base64 encoded Format in the internal AIO_Image()-Array.

The SDL.Copy Image to File command facilitates the transfer of these images, stored within the system's internal AIO_Image() register array, directly to disk.

 
Whether you're performing image analysis, manipulations, or just need to archive results, this command streamlines the process.

With options for custom file names, batch saving, and data decoding, it offers comprehensive flexibility for image-saving tasks.

 

Sample:

SDL.Copy Image to File|<Image Register Number>|<File Name and Path>|<Number of Files>|<Decoding Option>

 

' Some operation that fills the AIO_Image register.

SDL.Analyze  

SDL.Copy Image to File|0|Image_?.png|2|1

 

In this example, after some image analysis, two decoded versions of the image from the first position of the AIO_Image register are saved with filenames like Image_0000.png and Image_0001.png.

 

 

 

 

Syntax

 

 

SDL.Copy Image to File|P1[|P2][|P3][|P4]

 

 

Parameter Explanation

 

P1 - <Image Register Number>: The number representing the specific image in the AIO_Image register, 0-based.

P2 - <File Name and Path>: The desired filename and path for the saved image. A '?' placeholder can be included, which will be replaced by a 4-digit number. If a file with the given name exists, the number will        be incremented. An empty entry defaults to the ?exeloc\ directory.

P3 - <Loop multiple Files>: Optional. "Loop to". If set to a number higher than zero, it indicates that multiple files, based on successive register entries, should be saved with incrementing filenames.
      If given, the number must be higher then P1

P4 - <Decode Base64 Option>: Optional. When set to "1", the command decodes the image data from Base64 format before saving.

 

 

 

 

Example

 

'***********************************

' SDL.-Sample

'***********************************

$$PRO=Bio Food, natural women, meditating on a rainbow

$$NEG=ugly,comic,unrealistic,fat,unhealty,malformed faces

 

SDL.SetSteps|120 

SDL.Set_Sampler|3

SDL.Get Several|4|$$RET

DBP. Sampler=3 ($$RET)

SDL.Set Model Free|dreamlike-photoreal-2.0.safetensors

SDL.Set Extra Parameter|"restore_faces": true

'SDL.gtf|$$PRO|$$FIL|$$NEG|7

SDL.gtv|$$PRO|$$NEG|$$RES

SDL.Analyze

SDL.Copy Image to File|0|?exeloc\CTF_Image_?.png|0|1

DMP.6

MBX.!

ENR.

 

 

 

 

 

 

Remarks

 

 This is an Command for special use and my not be needed for daily use.

 

 

Limitations:

 

-

 

 

See also: