-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.inc.php
More file actions
277 lines (242 loc) · 6.68 KB
/
config.inc.php
File metadata and controls
277 lines (242 loc) · 6.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<?php
/**
* Stable Diffusion Image Generator
*
* @author Moses Rivera
* @copyright xtrose® Media Studio 2025
* @license GNU GENERAL PUBLIC LICENSE
*/
declare(strict_types = 1);
// General Settings
//----------------------------------------------------------------------------------------------------------------------
/**
* Host with port
*
* @description The host and port where the stable diffusion API is running.
*
* @var string
*/
$this->host = 'http://127.0.0.1:7860';
/**
* Start Web-Application
*
* @description Start PHP Build-In server for the Web-Application.
*
* @var bool
*/
$this->startWebApplication = true;
/**
* Number of images to create
*
* @description The number of images to generate. If set to null or 0, the script will generate unlimited images.
*
* @var int|null
*/
$this->numberOfImages = 10;
/**
* Loop txt2txt -> img2img or loop img2img -> img2img
*
* @description Creates a txt2txt -> img2img or img2img -> img2img loop, depending on the mode option. Creates the first
* image with the configured mode and all subsequent images as img2img with the generated image.
* @warning Will automatically enable saveImages if enabled.
*
* @var bool
*/
$this->loop = false;
/**
* Dry run
*
* @description If true, only settings will be checked and no images will be created.
*
* @var bool
*/
$this->dryRun = false;
//----------------------------------------------------------------------------------------------------------------------
// Stable Diffusion default settings
//----------------------------------------------------------------------------------------------------------------------
/**
* Mode
*
* @description The mode to use. Can be txt2img or img2img. If img2img is selected, the Stable Diffusion img2img
* settings has to set correctly and the init images directory has to be set.
*
* @var string
*/
$this->mode = 'txt2img';
/**
* Checkpoint
*
* @description String of the checkpoint name, array from multiple checkpoints, null for all checkpoints are used in
* turn, false for selected checkpoint.
*
* @var string|array|false|null
*/
$this->checkpoint = null;
/**
* Sampler
*
* @description String of the sampler name, array from multiple samplers, null for default sampler (Euler).
*
* @var string|array|null
*/
$this->sampler = null;
/**
* String of prompt generator directory to merge prompt or set null to random select prompt directory
*
* @description The directory where the prompt generator files are located. A subdirectory in prompt directory where
* prompt files for prompt merging are located. If set to null, the images wil be generated with empty
* prompt.
*
* @var string|null
*/
$this->prompt = 'Demo';
/**
* String of prompt generator directory to merge prompt or set null to random select prompt directory
*
* @description The directory where the prompt generator files are located. A subdirectory in prompt directory where
* prompt files for prompt merging are located. If set to null, the images wil be generated with empty
* negative prompt.
*
* @var string|null
*/
$this->negativePrompt = null;
/**
* String of img2img init image directory or set null to random select init image directory
*
* @description The directory where the images to be initialized are located. A subdirectory in init_images directory
* where initialize images are stored. Only available if mode is img2img.
*
* @var string|null
*/
$this->initImages = 'Demo';
/**
* Image width
*
* @description The width of the generated images.
*
* @var int
*/
$this->width = 512;
/**
* Image height
*
* @description The height of the generated images.
*
* @var int
*/
$this->height = 512;
/**
* Number ob sampling steps
*
* @description The number of sampling steps to use for the generation.
*
* @var int
*/
$this->steps = 20;
/**
* Refiner checkpoint
*
* @description String of the refiner checkpoint name, array from multiple refiner checkpoints, null for deactivate
* refiner checkpoint.
*
* @var string|array|null
*/
$this->refinerCheckpoint = null;
/**
* Refiner switch at
*
* @description Float 0.0 - 1.0 when checkpoint switch to refiner checkpoint. Set 0.5 to set checkpoint should switch to
* refiner checkpoint at 50% of image creation.
*
* @var float
*/
$this->refinerSwitchAt = 0.8;
/**
* Restore faces
*
* @description Option restore faces and remove artifacts.
*
* @var bool
*/
$this->restoreFaces = false;
/**
* Tiling
*
* @description Tiling to generate seamless textures.
*
* @var bool
*/
$this->tiling = false;
//----------------------------------------------------------------------------------------------------------------------
// Lora
//----------------------------------------------------------------------------------------------------------------------
/**
* Lora
*
* @description String of the lora name, array from multiple loras, null for disable lora.
*
* @var string|array|null
*/
$this->lora = null;
/**
* Lora keywords
*
* @description Keywords to trigger special trained action of loras.
*
* @var string|null
*/
$this->loraKeywords = null;
//----------------------------------------------------------------------------------------------------------------------
// Hires fix (Only txt2img)
//----------------------------------------------------------------------------------------------------------------------
/**
* Enable hires fix
*
* @description Enable or disable hires fix. Only available in txt2img mode.
*
* @var bool
*/
$this->enableHr = false;
/**
* Hr upscaler
*
* @description Upscaler type string for specified upscaler, null for default upscaler (Latent). Only available if hires
* fix is enabled.
*
* @var string|null
*/
$this->hrUpscaler = null;
/**
* Hr resize width
*
* @description Width of the resized image. Only available if hires fix is enabled and hr scale is null.
*
* @var int|null
*/
$this->hrResizeX = null;
/**
* Hr resize height
*
* @description Height of the resized image. Only available if hires fix is enabled and hr scale is null.
*
* @var int|null
*/
$this->hrResizeY = null;
/**
* Hr scale
*
* @description Scale of the resized image. Only available if hires fix is enabled. Overrides hr resize width and
* height if not null.
*
* @var float|null
*/
$this->hrScale = 2;
/**
* Hr sampler
*
* @description Sampler type for hires. Only available if hires fix is enabled. Default sampler if null (Euler).
*
* @var string|null
*/
$this->hrSamplerName = null;
//----------------------------------------------------------------------------------------------------------------------