stability_sdk 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,186 +0,0 @@
1
- syntax = 'proto3';
2
- package gooseai;
3
- option go_package = "./;generation";
4
-
5
- enum FinishReason {
6
- NULL = 0;
7
- LENGTH = 1;
8
- STOP = 2;
9
- ERROR = 3;
10
- FILTER = 4;
11
- }
12
-
13
-
14
- enum ArtifactType {
15
- ARTIFACT_NONE = 0;
16
- ARTIFACT_IMAGE = 1;
17
- ARTIFACT_VIDEO = 2;
18
- ARTIFACT_TEXT = 3;
19
- ARTIFACT_TOKENS = 4;
20
- ARTIFACT_EMBEDDING = 5;
21
- ARTIFACT_CLASSIFICATIONS = 6;
22
- ARTIFACT_MASK = 7;
23
- }
24
-
25
- message Token {
26
- optional string text = 1;
27
- uint32 id = 2;
28
- }
29
-
30
- message Tokens {
31
- repeated Token tokens = 1;
32
- optional string tokenizer_id = 2;
33
- }
34
-
35
- message Artifact {
36
- uint64 id = 1;
37
- ArtifactType type = 2;
38
- string mime = 3;
39
- optional string magic = 4;
40
- oneof data {
41
- bytes binary = 5;
42
- string text = 6;
43
- Tokens tokens = 7;
44
- ClassifierParameters classifier = 11;
45
- }
46
- uint32 index = 8;
47
- FinishReason finish_reason = 9;
48
- uint32 seed = 10;
49
- }
50
-
51
- message PromptParameters {
52
- optional bool init = 1;
53
- optional float weight = 2;
54
- }
55
-
56
- message Prompt {
57
- optional PromptParameters parameters = 1;
58
- oneof prompt {
59
- string text = 2;
60
- Tokens tokens = 3;
61
- Artifact artifact = 4;
62
- }
63
- }
64
-
65
- message AnswerMeta {
66
- optional string gpu_id = 1;
67
- optional string cpu_id = 2;
68
- optional string node_id = 3;
69
- optional string engine_id = 4;
70
- }
71
-
72
- message Answer {
73
- string answer_id = 1;
74
- string request_id = 2;
75
- uint64 received = 3;
76
- uint64 created = 4;
77
- optional AnswerMeta meta = 6;
78
- repeated Artifact artifacts = 7;
79
- }
80
-
81
- enum DiffusionSampler {
82
- SAMPLER_DDIM = 0;
83
- SAMPLER_DDPM = 1;
84
- SAMPLER_K_EULER = 2;
85
- SAMPLER_K_EULER_ANCESTRAL = 3;
86
- SAMPLER_K_HEUN = 4;
87
- SAMPLER_K_DPM_2 = 5;
88
- SAMPLER_K_DPM_2_ANCESTRAL = 6;
89
- SAMPLER_K_LMS = 7;
90
- }
91
-
92
- message SamplerParameters {
93
- optional float eta = 1;
94
- optional uint64 sampling_steps = 2;
95
- optional uint64 latent_channels = 3;
96
- optional uint64 downsampling_factor = 4;
97
- optional float cfg_scale = 5;
98
- }
99
-
100
- message ConditionerParameters {
101
- optional string vector_adjust_prior = 1;
102
- }
103
-
104
- enum Upscaler {
105
- UPSCALER_RGB = 0;
106
- UPSCALER_GFPGAN = 1;
107
- UPSCALER_ESRGAN = 2;
108
- }
109
-
110
- message ScheduleParameters {
111
- float start = 1;
112
- float end = 2;
113
- }
114
-
115
- message StepParameter {
116
- float scaled_step = 1;
117
- optional SamplerParameters sampler = 2;
118
- optional ScheduleParameters schedule = 3;
119
- }
120
-
121
- message TransformType {
122
- oneof type {
123
- DiffusionSampler diffusion = 1;
124
- Upscaler upscaler = 2;
125
- }
126
- }
127
-
128
- message ImageParameters {
129
- optional uint64 height = 1;
130
- optional uint64 width = 2;
131
- repeated uint32 seed = 3;
132
- optional uint64 samples = 4;
133
- optional uint64 steps = 5;
134
- optional TransformType transform = 6;
135
- repeated StepParameter parameters = 7;
136
- }
137
-
138
- enum Action {
139
- ACTION_PASSTHROUGH = 0;
140
- ACTION_REGENERATE_DUPLICATE = 1;
141
- ACTION_REGENERATE = 2;
142
- ACTION_OBFUSCATE_DUPLICATE = 3;
143
- ACTION_OBFUSCATE = 4;
144
- ACTION_DISCARD = 5;
145
- }
146
-
147
- enum ClassifierMode {
148
- CLSFR_MODE_ZEROSHOT = 0;
149
- CLSFR_MODE_MULTICLASS = 1;
150
- /*CLSFR_MODE_ODDSRATIO = 2;*/
151
- }
152
-
153
- message ClassifierConcept {
154
- string concept = 1;
155
- optional float threshold = 2;
156
- }
157
-
158
- message ClassifierCategory {
159
- string name = 1;
160
- repeated ClassifierConcept concepts = 2;
161
- optional float adjustment = 3;
162
- optional Action action = 4;
163
- optional ClassifierMode classifier_mode = 5;
164
- }
165
-
166
- message ClassifierParameters {
167
- repeated ClassifierCategory categories = 1;
168
- repeated ClassifierCategory exceeds = 2;
169
- optional Action realized_action = 3;
170
- }
171
-
172
- message Request {
173
- string engine_id = 1;
174
- string request_id = 2;
175
- ArtifactType requested_type = 3;
176
- repeated Prompt prompt = 4;
177
- oneof params {
178
- ImageParameters image = 5;
179
- }
180
- optional ConditionerParameters conditioner = 6;
181
- optional ClassifierParameters classifier = 7;
182
- }
183
-
184
- service GenerationService {
185
- rpc Generate (Request) returns (stream Answer) {};
186
- }