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.Set Sampler

Previous Top Next


MiniRobotLanguage (MRL)

 

SDL.Set Sampler

Set the Sampler for the Stable Diffusion (SD) process.

 

Sampler_0008   Sampler_10

Generated with the Script below (Sample-Script) and SDL.-Command.Watch in the second picture if you see something strange.

 

 

Intention

 

SDL.Set Sampler: the best choice

The SDL.Set Sampler command configures the sampler used by the Stable Diffusion (SD) process.

With a diverse set of samplers available, each optimized for different scenarios or properties,

users can tailor the SD process to their specific needs. The selected sampler can be specified by its index or its name, offering flexibility in command usage.

The SDL.Set Sampler will try to make the best of your Input - there is a Error correction built in for typing mistakes that will try to guess which Sampler you really want.

If you do not want any of the hard coded Samplers you need tu use "SDL.Set Sampler Free" instead.

The SDL.Set Sampler command provides a way to harness the capabilities of various samplers integrated into the SD process. Each sampler has unique properties, advantages, and trade-offs, so selecting the appropriate one is crucial for optimal results.

 

You can choose to select the Sampler "By name" or "by number".

 

Example Usage:

 

SDL.Set Sampler|Euler

or

SDL.Set Sampler|0

 

Both examples will set the sampler for the SD process to "Euler".

Index

Sampler

0

Euler

1

Euler a

2

LMS

3

Heun

4

DPM2

5

DPM2 a

6

DPM++ 2S a

7

DPM++ 2M

8

DPM++ SDE

9

DPM++ 2M SDE

10

DPM fast

11

DPM adaptive

12

LMS Karras

13

DPM2 Karras

14

DPM2 a Karras

15

DPM++ 2S a Karras

16

DPM++ 2M Karras

17

DPM++ SDE Karras

18

DPM++ 2M SDE Karras

19

DDIM

20

PLMS

21

UniPC

 

 

 

 

Syntax

 

 

SDL.Set Sampler|P1

 

 

Parameter Explanation

 

 P1 - <Sampler Index or Name>: The desired sampler, specified either by its index number or its name.

 

 The command will leave the name of the currently used Sampler on TOS.

 

 

 

Example

 

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

' SDL.-Sample

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

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

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

 

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

SDL.Set Extra Parameter|"restore_faces": true

SDL.SetSteps|150  

 

FOR.$$LOP|0|21

  SDL.Set_Sampler|$$LOP

  SDL.Get Several|4|$$SAN

  DBP. Sampler=$$LOP - $$SAN

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

  SDL.Set Extra Parameter|"restore_faces": true

  $$FIL=?exeloc\Sampler_$$LOP.jpg

  VAN.$$TIM=#dtime#

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

  CAL.$$TIM=#dsince#|i

  POP.$$PAT

  POP.$$SUC

  POP.$$SAM

  DBP. Sampler used:$$SAM

  IVV.$$SUC=1

    ANA.load|0|$$PAT

    ANA.Resizeto|0|1|640|640

    ANA.show|1

    $$FIL=?exeloc\Sampler_$$LOP_$$TIM_sec.jpg

    ANA.Save|1|$$PAT

  ELS.

    SDL.Get Several|6|$$RET

    DBP.$$RET

    SDL.Show Error

    MBT.No File generated.

  EIF.

NEX.

 

MBX.!

ENR.

 

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

The success and efficiency of the SD process depend on the chosen sampler, so understanding the properties of each sampler can be beneficial.

Users should ensure they use a valid sampler name or index. Invalid entries might lead to errors or unexpected behavior.

Generally this command is rather error-tolerant and will try to find the Sampler you have specified no matter if you make a typing mistake or not.

 

 

See also: