-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmodulesettings.json
165 lines (156 loc) · 6.79 KB
/
modulesettings.json
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
{
"Modules": {
"Text2Image": {
"Name": "Text to Image",
"Version": "1.3.1",
"PublishingInfo": {
"Description": "Generates an image from a text prompt.",
"Category": "Generative AI",
"Stack": "Python, PyTorch, Stable Diffusion",
"License": "CPOL",
"LicenseUrl": "http://www.codeproject.com/info/cpol10.aspx",
"Author": "Matthew Dennis",
"Homepage": "https://github.com/codeproject/CodeProject.AI-Server/",
"BasedOn": "Diffusers", // What project is this based on?
"BasedOnUrl": "https://github.com/huggingface/diffusers" // The URL for that project
},
"LaunchSettings": {
"AutoStart": false, // Start this when the server starts
"FilePath": "stable_diffusion_adapter.py", // Name of file that gets launched
"Runtime": "python3.9", // file is launched by Python
"RuntimeLocation": "Local", // We want our own virt. env., not a shared one
"PostStartPauseSecs": 1, // Generally 1 if using GPU, 0 for CPU
"Queue": "text2image_queue", // Can be left as null if you wish
"Parallelism": 1 // 0 = Default (number of CPUs - 1)
},
"EnvironmentVariables": {
// "MODEL_SIZE": "Medium", // tiny, small, medium, large
"CPAI_MODULE_TEXT2IMAGE_MODELS_DIR": "%CURRENT_MODULE_PATH%/assets",
"CPAI_MODULE_TEXT2IMAGE_MODEL_NAME": "@runwayml/stable-diffusion-v1-5"
},
"GpuOptions": {
"InstallGPU": true, // Should we install GPU enabled code?
"EnableGPU": true, // Should we enable GPU support (if installed)
"AcceleratorDeviceName": null, // eg "cuda:0" or just leave blank for default
"HalfPrecision": "enable" // For code that supports half-precision. Use 'Force', 'Enable', 'Disable'
},
"InstallOptions": {
"Platforms": [ "windows", "macos", "linux" ], // "macos-arm64"
"ModuleReleases":
[
{ "ModuleVersion": "1.0.0", "ServerVersionRange": [ "2.5.5", "2.6.0" ], "ReleaseDate": "2024-03-20", "ReleaseNotes": "Initial Release", "Importance": "Major" },
{ "ModuleVersion": "1.1.0", "ServerVersionRange": [ "2.5.6", "2.6.0" ], "ReleaseDate": "2024-03-28", "ReleaseNotes": "Updated for new long running process handling", "Importance": "Major" },
{ "ModuleVersion": "1.1.1", "ServerVersionRange": [ "2.6.0", "2.6.0" ], "ReleaseDate": "2024-03-26", "ReleaseNotes": "Bug fixes" },
{ "ModuleVersion": "1.1.2", "ServerVersionRange": [ "2.6.1", "2.7.0" ], "ReleaseDate": "2024-04-01", "ReleaseNotes": "Updates for server 2.6" },
{ "ModuleVersion": "1.2.0", "ServerVersionRange": [ "2.6.5", "2.7.0" ], "ReleaseDate": "2024-04-25", "ReleaseNotes": "Updates for server 2.6.5" },
{ "ModuleVersion": "1.2.1", "ServerVersionRange": [ "2.6.5", "2.7.0" ], "ReleaseDate": "2024-06-26", "ReleaseNotes": "Corrections to compatibility settings" },
{ "ModuleVersion": "1.2.2", "ServerVersionRange": [ "2.6.5", "2.7.0" ], "ReleaseDate": "2024-06-26", "ReleaseNotes": "Corrections for Numpy 2.0 breaking changes" },
{ "ModuleVersion": "1.3.0", "ServerVersionRange": [ "2.8.0", "" ], "ReleaseDate": "2024-08-02", "ReleaseNotes": "Updated for server 2.8" },
{ "ModuleVersion": "1.3.1", "ServerVersionRange": [ "2.8.0", "" ], "ReleaseDate": "2024-11-23", "ReleaseNotes": "Improved CUDA 12 support" }
]
},
"UIElements": {
"Menus": [
{
"Label": "Half Precision",
"Options": [
{
"Label": "Force on",
"Setting": "CPAI_HALF_PRECISION",
"Value": "force"
},
{
"Label": "Use Default",
"Setting": "CPAI_HALF_PRECISION",
"Value": "enable"
},
{
"Label": "Disable",
"Setting": "CPAI_HALF_PRECISION",
"Value": "disable"
}
]
}
]
},
"RouteMaps": [
{
"Name": "Text to Image Stable Diffusion",
"Route": "text2image/create",
"Method": "POST",
"Command": "create",
"Description": "Creates an image based on the input prompt",
"Inputs": [
{
"Name": "prompt",
"Type": "Text",
"Description": "The prompt to be used by Stable Diffusion to create the image."
},
{
"Name": "negative_prompt",
"Type": "Text",
"Description": "The negative prompt to be used by Stable Diffusion to create the image."
},
{
"Name": "num_images",
"Type": "Integer",
"Description": "The number of images to generate. Defaults to 1.",
"DefaultValue": 1,
"MinValue": 1,
"MaxValue": 4
},
{
"Name": "num_steps",
"Type": "Integer",
"Description": "The number of inference steps to run.",
"DefaultValue": 20,
"MinValue": 1,
"MaxValue": 100
},
{
"Name": "seed",
"Type": "Integer",
"Description": "The seed to use for the diffusion random number generator. Defaults to a random seed."
},
{
"Name": "width",
"Type": "Integer",
"Description": "The width of the image to be created. Defaults to 512. Must be a multiple of 8.",
"DefaultValue": 512,
"MinValue": 16,
"MaxValue": 1024
},
{
"Name": "height",
"Type": "Integer",
"Description": "The height of the image to be created. Must be a multiple of 8.",
"DefaultValue": 512,
"MinValue": 16,
"MaxValue": 1024
},
{
"Name": "guidance_scale",
"Type": "Float",
"Description": "How well the process aligns with the prompt for image generation (0.0 - 20.0). Defaults to 7.0.",
"DefaultValue": 7.0,
"MinValue": 0.0,
"MaxValue": 20.0
}
],
"Outputs": [
{
"Name": "success",
"Type": "Boolean",
"Description": "True if successful."
},
{
"Name": "images",
"Type": "File[]",
"Description": "An array of 1-4 images generated."
}
]
}
]
}
}
}