stability_sdk 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/Gemfile.lock +3 -3
- data/Rakefile +5 -0
- data/lib/generation_pb.rb +26 -3
- data/lib/generation_services_pb.rb +1 -0
- data/lib/stability_sdk/version.rb +1 -1
- data/stability_sdk.gemspec +2 -2
- metadata +7 -7
- data/proto/generation.proto +0 -186
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 401df5c1aa6c7c458a171cc6e7f437a420d56a17f394236c42afe6b7114986bc
|
4
|
+
data.tar.gz: 744723a641d79456d255a0120118f8d218137d0901c760ede079d9dc51301f50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f37b8db84a96fb1df551ef789e43138eb80adb8e8540a7b3619e44b66bed7b193aeb704ab8099daaf64f761c3e92bfd90088faf3285c9a1ffc07a06e457ae20a
|
7
|
+
data.tar.gz: 7b8b4bec82c39a5046bbe805e213fe5f4c5ddb0dd279352bd619768a711fc17a0254a958ddeac46d3835a76e75e7578ab11e82fdda9cb77d477d62ba5677c222
|
data/.gitmodules
ADDED
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -8,3 +8,8 @@ Rake::TestTask.new(:test) do |t|
|
|
8
8
|
end
|
9
9
|
|
10
10
|
task :default => :test
|
11
|
+
|
12
|
+
desc "Parse proto file and generate output"
|
13
|
+
task :protoc do
|
14
|
+
sh "grpc_tools_ruby_protoc -I api-interfaces/src/proto/ --ruby_out=lib --grpc_out=lib api-interfaces/src/proto/generation.proto"
|
15
|
+
end
|
data/lib/generation_pb.rb
CHANGED
@@ -65,8 +65,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
65
65
|
proto3_optional :vector_adjust_prior, :string, 1
|
66
66
|
end
|
67
67
|
add_message "gooseai.ScheduleParameters" do
|
68
|
-
|
69
|
-
|
68
|
+
proto3_optional :start, :float, 1
|
69
|
+
proto3_optional :end, :float, 2
|
70
70
|
end
|
71
71
|
add_message "gooseai.StepParameter" do
|
72
72
|
optional :scaled_step, :float, 1
|
@@ -110,11 +110,25 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
110
110
|
optional :requested_type, :enum, 3, "gooseai.ArtifactType"
|
111
111
|
repeated :prompt, :message, 4, "gooseai.Prompt"
|
112
112
|
proto3_optional :conditioner, :message, 6, "gooseai.ConditionerParameters"
|
113
|
-
proto3_optional :classifier, :message, 7, "gooseai.ClassifierParameters"
|
114
113
|
oneof :params do
|
115
114
|
optional :image, :message, 5, "gooseai.ImageParameters"
|
115
|
+
optional :classifier, :message, 7, "gooseai.ClassifierParameters"
|
116
116
|
end
|
117
117
|
end
|
118
|
+
add_message "gooseai.OnStatus" do
|
119
|
+
repeated :reason, :enum, 1, "gooseai.FinishReason"
|
120
|
+
proto3_optional :target, :string, 2
|
121
|
+
repeated :action, :enum, 3, "gooseai.StageAction"
|
122
|
+
end
|
123
|
+
add_message "gooseai.Stage" do
|
124
|
+
optional :id, :string, 1
|
125
|
+
optional :request, :message, 2, "gooseai.Request"
|
126
|
+
repeated :on_status, :message, 3, "gooseai.OnStatus"
|
127
|
+
end
|
128
|
+
add_message "gooseai.ChainRequest" do
|
129
|
+
optional :request_id, :string, 1
|
130
|
+
repeated :stage, :message, 2, "gooseai.Stage"
|
131
|
+
end
|
118
132
|
add_enum "gooseai.FinishReason" do
|
119
133
|
value :NULL, 0
|
120
134
|
value :LENGTH, 1
|
@@ -159,6 +173,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
159
173
|
value :CLSFR_MODE_ZEROSHOT, 0
|
160
174
|
value :CLSFR_MODE_MULTICLASS, 1
|
161
175
|
end
|
176
|
+
add_enum "gooseai.StageAction" do
|
177
|
+
value :STAGE_ACTION_PASS, 0
|
178
|
+
value :STAGE_ACTION_DISCARD, 1
|
179
|
+
value :STAGE_ACTION_RETURN, 2
|
180
|
+
end
|
162
181
|
end
|
163
182
|
end
|
164
183
|
|
@@ -180,10 +199,14 @@ module Gooseai
|
|
180
199
|
ClassifierCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gooseai.ClassifierCategory").msgclass
|
181
200
|
ClassifierParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gooseai.ClassifierParameters").msgclass
|
182
201
|
Request = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gooseai.Request").msgclass
|
202
|
+
OnStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gooseai.OnStatus").msgclass
|
203
|
+
Stage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gooseai.Stage").msgclass
|
204
|
+
ChainRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gooseai.ChainRequest").msgclass
|
183
205
|
FinishReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gooseai.FinishReason").enummodule
|
184
206
|
ArtifactType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gooseai.ArtifactType").enummodule
|
185
207
|
DiffusionSampler = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gooseai.DiffusionSampler").enummodule
|
186
208
|
Upscaler = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gooseai.Upscaler").enummodule
|
187
209
|
Action = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gooseai.Action").enummodule
|
188
210
|
ClassifierMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gooseai.ClassifierMode").enummodule
|
211
|
+
StageAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gooseai.StageAction").enummodule
|
189
212
|
end
|
data/stability_sdk.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
25
|
spec.require_paths = ["lib"]
|
26
26
|
|
27
|
-
spec.add_dependency "grpc"
|
28
|
-
spec.add_dependency "mime-types"
|
27
|
+
spec.add_dependency "grpc", ">= 1.0.0"
|
28
|
+
spec.add_dependency "mime-types", ">= 3.0.0"
|
29
29
|
spec.add_development_dependency "grpc-tools"
|
30
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stability_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kosei Moriyama
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mime-types
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 3.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 3.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: grpc-tools
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -62,6 +62,7 @@ extensions: []
|
|
62
62
|
extra_rdoc_files: []
|
63
63
|
files:
|
64
64
|
- ".gitignore"
|
65
|
+
- ".gitmodules"
|
65
66
|
- ".travis.yml"
|
66
67
|
- Gemfile
|
67
68
|
- Gemfile.lock
|
@@ -76,7 +77,6 @@ files:
|
|
76
77
|
- lib/stability_sdk/cli.rb
|
77
78
|
- lib/stability_sdk/client.rb
|
78
79
|
- lib/stability_sdk/version.rb
|
79
|
-
- proto/generation.proto
|
80
80
|
- stability_sdk.gemspec
|
81
81
|
homepage: https://github.com/cou929/stability-sdk-ruby
|
82
82
|
licenses: []
|
data/proto/generation.proto
DELETED
@@ -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
|
-
}
|