<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > SD - Stable Diffusion AI > SDL. - Stable Diffusion Local System > ! SDL - TXT2IMG > Stable Diffusion Commands |
MiniRobotLanguage (MRL)
SDL.txt2img / SDL.t2i
Use Local Stable Diffusion using the native JSON-Body without using internal Registers. Result is placed in Clipboard.
Intention
The SDL.txt2img Clipboard command is designed to convert a text prompt into a visual image that is not saved, but just placed in Clipboard.
You can use ANA.FromClipboard|$$IMR Command to continue processing the Image.
This is particularly useful for generating images based on textual descriptions or prompts.
The command takes a complete JSON-Structure (P1) and a target file path (P2) where the generated image will be saved.
Syntax
SDL.txt2img|P1
Parameter Explanation
•P1 - Parameters: Specifies the parameters for generating the image. This includes the text prompt, styles, seed, subseed, sampler name, batch size, number of iterations, steps, configuration scale, width, height, and whether to restore faces.
Example
$$PRO=neural network beautiful golden girl Galaxy robot digital photorealistic NC-1701 enterprise
' Use Image Register 0
$$IMR=0
$$EXT="prompt": "$$PRO",
'$$EXT+"styles": ["string"],
$$EXT+"seed": -1,
$$EXT+"subseed": -1,
$$EXT+"sampler_name": "Euler",
$$EXT+"batch_size": 1,
$$EXT+"n_iter": 1,
$$EXT+"steps": 50,
$$EXT+"cfg_scale": 7,
$$EXT+"width": 512,
$$EXT+"height": 512,
$$EXT+"restore_faces": true,
SDL.t2i|$$EXT
' Uncomment the following Line if you do not receive a picture
'SDL.Show Error
ANA.FromClipboard|$$IMR
$$TXT=SPR/SDO. generated.
$$COA=&HFFFFFF
$$COB==&H0
$$BGC=-2
$$XPA=30
$$YPA=450
ANA.PrintAt|$$IMR|$$TXT|$$COA|$$BGC|$$XPA|$$YPA|24
ANA.PrintAt|$$IMR|$$TXT|$$COB|$$BGC|($$XPA+1)|($$YPA+2)|24
DBP.Loaded in IR:$$IMR -> $$FIL
ANA.Show|$$IMR
ANA.Save|$$IMR|$$FIL
'SDL.gpr|$$RET
DBP.$$RET
ENR.
Remarks
Following you can see the possible Parameters.
{
"enable_hr": false,
"denoising_strength": 0,
"firstphase_width": 0,
"firstphase_height": 0,
"hr_scale": 2,
"hr_upscaler": "string",
"hr_second_pass_steps": 0,
"hr_resize_x": 0,
"hr_resize_y": 0,
"hr_sampler_name": "string",
"hr_prompt": "",
"hr_negative_prompt": "",
"prompt": "",
"styles": [
"string"
],
"seed": -1,
"subseed": -1,
"subseed_strength": 0,
"seed_resize_from_h": -1,
"seed_resize_from_w": -1,
"sampler_name": "string",
"batch_size": 1,
"n_iter": 1,
"steps": 50,
"cfg_scale": 7,
"width": 512,
"height": 512,
"restore_faces": false,
"tiling": false,
"do_not_save_samples": false,
"do_not_save_grid": false,
"negative_prompt": "string",
"eta": 0,
"s_min_uncond": 0,
"s_churn": 0,
"s_tmax": 0,
"s_tmin": 0,
"s_noise": 1,
"override_settings": {},
"override_settings_restore_afterwards": true,
"script_args": [],
"sampler_index": "Euler",
"script_name": "string",
"send_images": true,
"save_images": false,
"alwayson_scripts": {}
}
Limitations:
-
See also:
•