stability_sdk 0.3.5 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9c623b34b265936b3560c9bf2c8bc2f20f1882df4656c8050777cd2bb60b027
4
- data.tar.gz: d81a22156c80f6f62cb4bb0a3bcd00094dae492ccca4a1e0d0a9e6a62d2e5870
3
+ metadata.gz: 5f2ffcc50094e6ace2923dfdba9d5438d52c03b9012bfa9b22573234286f3ecb
4
+ data.tar.gz: 54838256d0da7d79a5dcf29b6850f8ce8dbf3c5f177b2aa1277331b04d63af42
5
5
  SHA512:
6
- metadata.gz: dcba5669c8bc711975c7f2c604c74e79396bf55b5594e1ce1ce3aff7627cf05eb356a3fb672e932670529b55aeaaecb97f02b595dbe274e3f02e27f4b16977ab
7
- data.tar.gz: e0ee6ea802ba9ef6b664e3b98238d107c0dc1373e565a6e0a77ddac78c9e7466fb4664faa4beee737c3bbbd67ba53bb5d9ba9aeb72ad673b6a6e366aa41cc12d
6
+ metadata.gz: e779dfe09129aa0acbc3c7ae33f3642d437344ff9b2df5197ffd3565bd5b2b686593a995e1688babc291b88a482fa5cbd3e6879288b27ebef91a1cec59138a2f
7
+ data.tar.gz: 3181608f4ebde29494c0244375fdaa3ff39c0a5ae635b08a543e932c84ed433f9ec9ec76c21f33d60ba4356895a6032defeec66cfca6e035f5085c1fcfbc03ca
data/Gemfile CHANGED
@@ -3,5 +3,5 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in stability_sdk.gemspec
4
4
  gemspec
5
5
 
6
- gem "rake", "~> 12.0"
7
- gem "minitest", "~> 5.0"
6
+ gem "rake"
7
+ gem "minitest"
data/Rakefile CHANGED
@@ -18,3 +18,8 @@ desc "Compile a dashboard proto file"
18
18
  task :protoc_dashboard do
19
19
  sh "grpc_tools_ruby_protoc -I api-interfaces/src/proto/ --ruby_out=lib --grpc_out=lib api-interfaces/src/proto/dashboard.proto"
20
20
  end
21
+
22
+ desc "Compile a tensorizer proto file"
23
+ task :protoc_tensorizer do
24
+ sh "grpc_tools_ruby_protoc -I api-interfaces/src/tensorizer/proto/ --ruby_out=lib --grpc_out=lib api-interfaces/src/tensorizer/proto/tensors.proto"
25
+ end
data/lib/dashboard_pb.rb CHANGED
@@ -1,153 +1,14 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: dashboard.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("dashboard.proto", :syntax => :proto3) do
8
- add_message "gooseai.OrganizationMember" do
9
- optional :organization, :message, 1, "gooseai.Organization"
10
- proto3_optional :user, :message, 2, "gooseai.User"
11
- optional :role, :enum, 3, "gooseai.OrganizationRole"
12
- optional :is_default, :bool, 4
13
- end
14
- add_message "gooseai.OrganizationGrant" do
15
- optional :amount_granted, :double, 1
16
- optional :amount_used, :double, 2
17
- optional :expires_at, :uint64, 3
18
- optional :granted_at, :uint64, 4
19
- end
20
- add_message "gooseai.OrganizationPaymentInfo" do
21
- optional :balance, :double, 1
22
- repeated :grants, :message, 2, "gooseai.OrganizationGrant"
23
- end
24
- add_message "gooseai.OrganizationAutoCharge" do
25
- optional :enabled, :bool, 1
26
- optional :id, :string, 2
27
- optional :created_at, :uint64, 3
28
- end
29
- add_message "gooseai.Organization" do
30
- optional :id, :string, 1
31
- optional :name, :string, 2
32
- optional :description, :string, 3
33
- repeated :members, :message, 4, "gooseai.OrganizationMember"
34
- proto3_optional :payment_info, :message, 5, "gooseai.OrganizationPaymentInfo"
35
- proto3_optional :stripe_customer_id, :string, 6
36
- proto3_optional :auto_charge, :message, 7, "gooseai.OrganizationAutoCharge"
37
- end
38
- add_message "gooseai.APIKey" do
39
- optional :key, :string, 1
40
- optional :is_secret, :bool, 2
41
- optional :created_at, :uint64, 3
42
- end
43
- add_message "gooseai.User" do
44
- optional :id, :string, 1
45
- proto3_optional :auth_id, :string, 2
46
- optional :profile_picture, :string, 3
47
- optional :email, :string, 4
48
- repeated :organizations, :message, 5, "gooseai.OrganizationMember"
49
- repeated :api_keys, :message, 7, "gooseai.APIKey"
50
- optional :created_at, :uint64, 8
51
- proto3_optional :email_verified, :bool, 9
52
- end
53
- add_message "gooseai.CostData" do
54
- optional :amount_tokens, :uint32, 1
55
- optional :amount_credits, :double, 2
56
- end
57
- add_message "gooseai.UsageMetric" do
58
- optional :operation, :string, 1
59
- optional :engine, :string, 2
60
- optional :input_cost, :message, 3, "gooseai.CostData"
61
- optional :output_cost, :message, 4, "gooseai.CostData"
62
- proto3_optional :user, :string, 5
63
- optional :aggregation_timestamp, :uint64, 6
64
- end
65
- add_message "gooseai.CostTotal" do
66
- optional :amount_tokens, :uint32, 1
67
- optional :amount_credits, :double, 2
68
- end
69
- add_message "gooseai.TotalMetricsData" do
70
- optional :input_total, :message, 1, "gooseai.CostTotal"
71
- optional :output_total, :message, 2, "gooseai.CostTotal"
72
- end
73
- add_message "gooseai.Metrics" do
74
- repeated :metrics, :message, 1, "gooseai.UsageMetric"
75
- optional :total, :message, 2, "gooseai.TotalMetricsData"
76
- end
77
- add_message "gooseai.EmptyRequest" do
78
- end
79
- add_message "gooseai.GetOrganizationRequest" do
80
- optional :id, :string, 1
81
- end
82
- add_message "gooseai.GetMetricsRequest" do
83
- optional :organization_id, :string, 1
84
- proto3_optional :user_id, :string, 2
85
- optional :range_from, :uint64, 3
86
- optional :range_to, :uint64, 4
87
- optional :include_per_request_metrics, :bool, 5
88
- end
89
- add_message "gooseai.APIKeyRequest" do
90
- optional :is_secret, :bool, 1
91
- end
92
- add_message "gooseai.APIKeyFindRequest" do
93
- optional :id, :string, 1
94
- end
95
- add_message "gooseai.UpdateDefaultOrganizationRequest" do
96
- optional :organization_id, :string, 1
97
- end
98
- add_message "gooseai.ClientSettings" do
99
- optional :settings, :bytes, 1
100
- end
101
- add_message "gooseai.CreateAutoChargeIntentRequest" do
102
- optional :organization_id, :string, 1
103
- optional :monthly_maximum, :uint64, 2
104
- optional :minimum_value, :uint64, 3
105
- optional :amount_credits, :uint64, 4
106
- end
107
- add_message "gooseai.CreateChargeRequest" do
108
- optional :amount, :uint64, 1
109
- optional :organization_id, :string, 2
110
- end
111
- add_message "gooseai.GetChargesRequest" do
112
- optional :organization_id, :string, 1
113
- optional :range_from, :uint64, 2
114
- optional :range_to, :uint64, 3
115
- end
116
- add_message "gooseai.Charge" do
117
- optional :id, :string, 1
118
- optional :paid, :bool, 2
119
- optional :receipt_link, :string, 3
120
- optional :payment_link, :string, 4
121
- optional :created_at, :uint64, 5
122
- optional :amount_credits, :uint64, 6
123
- end
124
- add_message "gooseai.Charges" do
125
- repeated :charges, :message, 1, "gooseai.Charge"
126
- end
127
- add_message "gooseai.GetAutoChargeRequest" do
128
- optional :organization_id, :string, 1
129
- end
130
- add_message "gooseai.AutoChargeIntent" do
131
- optional :id, :string, 1
132
- optional :payment_link, :string, 2
133
- optional :created_at, :uint64, 3
134
- optional :monthly_maximum, :uint64, 4
135
- optional :minimum_value, :uint64, 5
136
- optional :amount_credits, :uint64, 6
137
- end
138
- add_message "gooseai.UpdateUserInfoRequest" do
139
- proto3_optional :email, :string, 1
140
- end
141
- add_message "gooseai.UserPasswordChangeTicket" do
142
- optional :ticket, :string, 1
143
- end
144
- add_enum "gooseai.OrganizationRole" do
145
- value :MEMBER, 0
146
- value :ACCOUNTANT, 1
147
- value :OWNER, 2
148
- end
149
- end
150
- end
7
+
8
+ descriptor_data = "\n\x0f\x64\x61shboard.proto\x12\x07gooseai\"\xa9\x01\n\x12OrganizationMember\x12+\n\x0corganization\x18\x01 \x01(\x0b\x32\x15.gooseai.Organization\x12 \n\x04user\x18\x02 \x01(\x0b\x32\r.gooseai.UserH\x00\x88\x01\x01\x12\'\n\x04role\x18\x03 \x01(\x0e\x32\x19.gooseai.OrganizationRole\x12\x12\n\nis_default\x18\x04 \x01(\x08\x42\x07\n\x05_user\"h\n\x11OrganizationGrant\x12\x16\n\x0e\x61mount_granted\x18\x01 \x01(\x01\x12\x13\n\x0b\x61mount_used\x18\x02 \x01(\x01\x12\x12\n\nexpires_at\x18\x03 \x01(\x04\x12\x12\n\ngranted_at\x18\x04 \x01(\x04\"V\n\x17OrganizationPaymentInfo\x12\x0f\n\x07\x62\x61lance\x18\x01 \x01(\x01\x12*\n\x06grants\x18\x02 \x03(\x0b\x32\x1a.gooseai.OrganizationGrant\"I\n\x16OrganizationAutoCharge\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\n\n\x02id\x18\x02 \x01(\t\x12\x12\n\ncreated_at\x18\x03 \x01(\x04\"\xbc\x02\n\x0cOrganization\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12,\n\x07members\x18\x04 \x03(\x0b\x32\x1b.gooseai.OrganizationMember\x12;\n\x0cpayment_info\x18\x05 \x01(\x0b\x32 .gooseai.OrganizationPaymentInfoH\x00\x88\x01\x01\x12\x1f\n\x12stripe_customer_id\x18\x06 \x01(\tH\x01\x88\x01\x01\x12\x39\n\x0b\x61uto_charge\x18\x07 \x01(\x0b\x32\x1f.gooseai.OrganizationAutoChargeH\x02\x88\x01\x01\x42\x0f\n\r_payment_infoB\x15\n\x13_stripe_customer_idB\x0e\n\x0c_auto_charge\"<\n\x06\x41PIKey\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x11\n\tis_secret\x18\x02 \x01(\x08\x12\x12\n\ncreated_at\x18\x03 \x01(\x04\"\xf7\x01\n\x04User\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x07\x61uth_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x0fprofile_picture\x18\x03 \x01(\t\x12\r\n\x05\x65mail\x18\x04 \x01(\t\x12\x32\n\rorganizations\x18\x05 \x03(\x0b\x32\x1b.gooseai.OrganizationMember\x12!\n\x08\x61pi_keys\x18\x07 \x03(\x0b\x32\x0f.gooseai.APIKey\x12\x12\n\ncreated_at\x18\x08 \x01(\x04\x12\x1b\n\x0e\x65mail_verified\x18\t \x01(\x08H\x01\x88\x01\x01\x42\n\n\x08_auth_idB\x11\n\x0f_email_verified\"9\n\x08\x43ostData\x12\x15\n\ramount_tokens\x18\x01 \x01(\r\x12\x16\n\x0e\x61mount_credits\x18\x02 \x01(\x01\"\xba\x01\n\x0bUsageMetric\x12\x11\n\toperation\x18\x01 \x01(\t\x12\x0e\n\x06\x65ngine\x18\x02 \x01(\t\x12%\n\ninput_cost\x18\x03 \x01(\x0b\x32\x11.gooseai.CostData\x12&\n\x0boutput_cost\x18\x04 \x01(\x0b\x32\x11.gooseai.CostData\x12\x11\n\x04user\x18\x05 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x15\x61ggregation_timestamp\x18\x06 \x01(\x04\x42\x07\n\x05_user\":\n\tCostTotal\x12\x15\n\ramount_tokens\x18\x01 \x01(\r\x12\x16\n\x0e\x61mount_credits\x18\x02 \x01(\x01\"e\n\x10TotalMetricsData\x12\'\n\x0binput_total\x18\x01 \x01(\x0b\x32\x12.gooseai.CostTotal\x12(\n\x0coutput_total\x18\x02 \x01(\x0b\x32\x12.gooseai.CostTotal\"Z\n\x07Metrics\x12%\n\x07metrics\x18\x01 \x03(\x0b\x32\x14.gooseai.UsageMetric\x12(\n\x05total\x18\x02 \x01(\x0b\x32\x19.gooseai.TotalMetricsData\"\x0e\n\x0c\x45mptyRequest\"$\n\x16GetOrganizationRequest\x12\n\n\x02id\x18\x01 \x01(\t\"\x99\x01\n\x11GetMetricsRequest\x12\x17\n\x0forganization_id\x18\x01 \x01(\t\x12\x14\n\x07user_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x12\n\nrange_from\x18\x03 \x01(\x04\x12\x10\n\x08range_to\x18\x04 \x01(\x04\x12#\n\x1binclude_per_request_metrics\x18\x05 \x01(\x08\x42\n\n\x08_user_id\"\"\n\rAPIKeyRequest\x12\x11\n\tis_secret\x18\x01 \x01(\x08\"\x1f\n\x11\x41PIKeyFindRequest\x12\n\n\x02id\x18\x01 \x01(\t\";\n UpdateDefaultOrganizationRequest\x12\x17\n\x0forganization_id\x18\x01 \x01(\t\"\"\n\x0e\x43lientSettings\x12\x10\n\x08settings\x18\x01 \x01(\x0c\"\x80\x01\n\x1d\x43reateAutoChargeIntentRequest\x12\x17\n\x0forganization_id\x18\x01 \x01(\t\x12\x17\n\x0fmonthly_maximum\x18\x02 \x01(\x04\x12\x15\n\rminimum_value\x18\x03 \x01(\x04\x12\x16\n\x0e\x61mount_credits\x18\x04 \x01(\x04\">\n\x13\x43reateChargeRequest\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x17\n\x0forganization_id\x18\x02 \x01(\t\"R\n\x11GetChargesRequest\x12\x17\n\x0forganization_id\x18\x01 \x01(\t\x12\x12\n\nrange_from\x18\x02 \x01(\x04\x12\x10\n\x08range_to\x18\x03 \x01(\x04\"z\n\x06\x43harge\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04paid\x18\x02 \x01(\x08\x12\x14\n\x0creceipt_link\x18\x03 \x01(\t\x12\x14\n\x0cpayment_link\x18\x04 \x01(\t\x12\x12\n\ncreated_at\x18\x05 \x01(\x04\x12\x16\n\x0e\x61mount_credits\x18\x06 \x01(\x04\"+\n\x07\x43harges\x12 \n\x07\x63harges\x18\x01 \x03(\x0b\x32\x0f.gooseai.Charge\"/\n\x14GetAutoChargeRequest\x12\x17\n\x0forganization_id\x18\x01 \x01(\t\"\x90\x01\n\x10\x41utoChargeIntent\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0cpayment_link\x18\x02 \x01(\t\x12\x12\n\ncreated_at\x18\x03 \x01(\x04\x12\x17\n\x0fmonthly_maximum\x18\x04 \x01(\x04\x12\x15\n\rminimum_value\x18\x05 \x01(\x04\x12\x16\n\x0e\x61mount_credits\x18\x06 \x01(\x04\"5\n\x15UpdateUserInfoRequest\x12\x12\n\x05\x65mail\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_email\"*\n\x18UserPasswordChangeTicket\x12\x0e\n\x06ticket\x18\x01 \x01(\t*9\n\x10OrganizationRole\x12\n\n\x06MEMBER\x10\x00\x12\x0e\n\nACCOUNTANT\x10\x01\x12\t\n\x05OWNER\x10\x02\x32\xf7\x08\n\x10\x44\x61shboardService\x12-\n\x05GetMe\x12\x15.gooseai.EmptyRequest\x1a\r.gooseai.User\x12I\n\x0fGetOrganization\x12\x1f.gooseai.GetOrganizationRequest\x1a\x15.gooseai.Organization\x12:\n\nGetMetrics\x12\x1a.gooseai.GetMetricsRequest\x1a\x10.gooseai.Metrics\x12\x37\n\x0c\x43reateAPIKey\x12\x16.gooseai.APIKeyRequest\x1a\x0f.gooseai.APIKey\x12;\n\x0c\x44\x65leteAPIKey\x12\x1a.gooseai.APIKeyFindRequest\x1a\x0f.gooseai.APIKey\x12U\n\x19UpdateDefaultOrganization\x12).gooseai.UpdateDefaultOrganizationRequest\x1a\r.gooseai.User\x12\x43\n\x11GetClientSettings\x12\x15.gooseai.EmptyRequest\x1a\x17.gooseai.ClientSettings\x12\x45\n\x11SetClientSettings\x12\x17.gooseai.ClientSettings\x1a\x17.gooseai.ClientSettings\x12?\n\x0eUpdateUserInfo\x12\x1e.gooseai.UpdateUserInfoRequest\x1a\r.gooseai.User\x12V\n\x1a\x43reatePasswordChangeTicket\x12\x15.gooseai.EmptyRequest\x1a!.gooseai.UserPasswordChangeTicket\x12\x35\n\rDeleteAccount\x12\x15.gooseai.EmptyRequest\x1a\r.gooseai.User\x12=\n\x0c\x43reateCharge\x12\x1c.gooseai.CreateChargeRequest\x1a\x0f.gooseai.Charge\x12:\n\nGetCharges\x12\x1a.gooseai.GetChargesRequest\x1a\x10.gooseai.Charges\x12[\n\x16\x43reateAutoChargeIntent\x12&.gooseai.CreateAutoChargeIntentRequest\x1a\x19.gooseai.AutoChargeIntent\x12[\n\x16UpdateAutoChargeIntent\x12&.gooseai.CreateAutoChargeIntentRequest\x1a\x19.gooseai.AutoChargeIntent\x12O\n\x13GetAutoChargeIntent\x12\x1d.gooseai.GetAutoChargeRequest\x1a\x19.gooseai.AutoChargeIntentB:Z8github.com/stability-ai/api-interfaces/gooseai/dashboardb\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+ pool.add_serialized_file(descriptor_data)
151
12
 
152
13
  module Gooseai
153
14
  OrganizationMember = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gooseai.OrganizationMember").msgclass
data/lib/generation_pb.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: generation.proto
3
4
 
@@ -6,335 +7,11 @@ require 'google/protobuf'
6
7
  require 'google/protobuf/struct_pb'
7
8
  require 'tensors_pb'
8
9
 
9
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_file("generation.proto", :syntax => :proto3) do
11
- add_message "gooseai.Token" do
12
- proto3_optional :text, :string, 1
13
- optional :id, :uint32, 2
14
- end
15
- add_message "gooseai.Tokens" do
16
- repeated :tokens, :message, 1, "gooseai.Token"
17
- proto3_optional :tokenizer_id, :string, 2
18
- end
19
- add_message "gooseai.Artifact" do
20
- optional :id, :uint64, 1
21
- optional :type, :enum, 2, "gooseai.ArtifactType"
22
- optional :mime, :string, 3
23
- proto3_optional :magic, :string, 4
24
- optional :index, :uint32, 8
25
- optional :finish_reason, :enum, 9, "gooseai.FinishReason"
26
- optional :seed, :uint32, 10
27
- optional :uuid, :string, 12
28
- optional :size, :uint64, 13
29
- oneof :data do
30
- optional :binary, :bytes, 5
31
- optional :text, :string, 6
32
- optional :tokens, :message, 7, "gooseai.Tokens"
33
- optional :classifier, :message, 11, "gooseai.ClassifierParameters"
34
- optional :tensor, :message, 14, "tensors.Tensor"
35
- end
36
- end
37
- add_message "gooseai.PromptParameters" do
38
- proto3_optional :init, :bool, 1
39
- proto3_optional :weight, :float, 2
40
- end
41
- add_message "gooseai.Prompt" do
42
- proto3_optional :parameters, :message, 1, "gooseai.PromptParameters"
43
- oneof :prompt do
44
- optional :text, :string, 2
45
- optional :tokens, :message, 3, "gooseai.Tokens"
46
- optional :artifact, :message, 4, "gooseai.Artifact"
47
- end
48
- end
49
- add_message "gooseai.SamplerParameters" do
50
- proto3_optional :eta, :float, 1
51
- proto3_optional :sampling_steps, :uint64, 2
52
- proto3_optional :latent_channels, :uint64, 3
53
- proto3_optional :downsampling_factor, :uint64, 4
54
- proto3_optional :cfg_scale, :float, 5
55
- proto3_optional :init_noise_scale, :float, 6
56
- proto3_optional :step_noise_scale, :float, 7
57
- end
58
- add_message "gooseai.ConditionerParameters" do
59
- proto3_optional :vector_adjust_prior, :string, 1
60
- proto3_optional :conditioner, :message, 2, "gooseai.Model"
61
- end
62
- add_message "gooseai.ScheduleParameters" do
63
- proto3_optional :start, :float, 1
64
- proto3_optional :end, :float, 2
65
- proto3_optional :value, :float, 3
66
- end
67
- add_message "gooseai.StepParameter" do
68
- optional :scaled_step, :float, 1
69
- proto3_optional :sampler, :message, 2, "gooseai.SamplerParameters"
70
- proto3_optional :schedule, :message, 3, "gooseai.ScheduleParameters"
71
- proto3_optional :guidance, :message, 4, "gooseai.GuidanceParameters"
72
- end
73
- add_message "gooseai.Model" do
74
- optional :architecture, :enum, 1, "gooseai.ModelArchitecture"
75
- optional :publisher, :string, 2
76
- optional :dataset, :string, 3
77
- optional :version, :float, 4
78
- optional :semantic_version, :string, 5
79
- optional :alias, :string, 6
80
- end
81
- add_message "gooseai.CutoutParameters" do
82
- repeated :cutouts, :message, 1, "gooseai.CutoutParameters"
83
- proto3_optional :count, :uint32, 2
84
- proto3_optional :gray, :float, 3
85
- proto3_optional :blur, :float, 4
86
- proto3_optional :size_power, :float, 5
87
- end
88
- add_message "gooseai.GuidanceScheduleParameters" do
89
- optional :duration, :float, 1
90
- optional :value, :float, 2
91
- end
92
- add_message "gooseai.GuidanceInstanceParameters" do
93
- repeated :models, :message, 2, "gooseai.Model"
94
- proto3_optional :guidance_strength, :float, 3
95
- repeated :schedule, :message, 4, "gooseai.GuidanceScheduleParameters"
96
- proto3_optional :cutouts, :message, 5, "gooseai.CutoutParameters"
97
- proto3_optional :prompt, :message, 6, "gooseai.Prompt"
98
- end
99
- add_message "gooseai.GuidanceParameters" do
100
- optional :guidance_preset, :enum, 1, "gooseai.GuidancePreset"
101
- repeated :instances, :message, 2, "gooseai.GuidanceInstanceParameters"
102
- end
103
- add_message "gooseai.TransformType" do
104
- oneof :type do
105
- optional :diffusion, :enum, 1, "gooseai.DiffusionSampler"
106
- optional :upscaler, :enum, 2, "gooseai.Upscaler"
107
- end
108
- end
109
- add_message "gooseai.ImageParameters" do
110
- proto3_optional :height, :uint64, 1
111
- proto3_optional :width, :uint64, 2
112
- repeated :seed, :uint32, 3
113
- proto3_optional :samples, :uint64, 4
114
- proto3_optional :steps, :uint64, 5
115
- proto3_optional :transform, :message, 6, "gooseai.TransformType"
116
- repeated :parameters, :message, 7, "gooseai.StepParameter"
117
- proto3_optional :masked_area_init, :enum, 8, "gooseai.MaskedAreaInit"
118
- proto3_optional :weight_method, :enum, 9, "gooseai.WeightMethod"
119
- proto3_optional :quantize, :bool, 10
120
- end
121
- add_message "gooseai.ClassifierConcept" do
122
- optional :concept, :string, 1
123
- proto3_optional :threshold, :float, 2
124
- end
125
- add_message "gooseai.ClassifierCategory" do
126
- optional :name, :string, 1
127
- repeated :concepts, :message, 2, "gooseai.ClassifierConcept"
128
- proto3_optional :adjustment, :float, 3
129
- proto3_optional :action, :enum, 4, "gooseai.Action"
130
- proto3_optional :classifier_mode, :enum, 5, "gooseai.ClassifierMode"
131
- end
132
- add_message "gooseai.ClassifierParameters" do
133
- repeated :categories, :message, 1, "gooseai.ClassifierCategory"
134
- repeated :exceeds, :message, 2, "gooseai.ClassifierCategory"
135
- proto3_optional :realized_action, :enum, 3, "gooseai.Action"
136
- end
137
- add_message "gooseai.InterpolateParameters" do
138
- repeated :ratios, :float, 1
139
- proto3_optional :mode, :enum, 2, "gooseai.InterpolateMode"
140
- end
141
- add_message "gooseai.TransformBlend" do
142
- optional :amount, :float, 1
143
- optional :target, :message, 2, "gooseai.Artifact"
144
- end
145
- add_message "gooseai.TransformColorAdjust" do
146
- proto3_optional :brightness, :float, 1
147
- proto3_optional :contrast, :float, 2
148
- proto3_optional :hue, :float, 3
149
- proto3_optional :saturation, :float, 4
150
- proto3_optional :lightness, :float, 5
151
- end
152
- add_message "gooseai.TransformColorMatch" do
153
- optional :color_mode, :enum, 1, "gooseai.ColorMatchMode"
154
- optional :image, :message, 2, "gooseai.Artifact"
155
- end
156
- add_message "gooseai.TransformDepthCalc" do
157
- proto3_optional :blend_weight, :float, 1
158
- proto3_optional :blur_radius, :uint32, 2
159
- proto3_optional :reverse, :bool, 3
160
- end
161
- add_message "gooseai.TransformMatrix" do
162
- repeated :data, :float, 1
163
- end
164
- add_message "gooseai.TransformResample" do
165
- optional :border_mode, :enum, 1, "gooseai.BorderMode"
166
- optional :transform, :message, 2, "gooseai.TransformMatrix"
167
- proto3_optional :prev_transform, :message, 3, "gooseai.TransformMatrix"
168
- proto3_optional :depth_warp, :float, 4
169
- proto3_optional :export_mask, :bool, 5
170
- end
171
- add_message "gooseai.TransformParameters" do
172
- oneof :transform do
173
- optional :blend, :message, 1, "gooseai.TransformBlend"
174
- optional :color_adjust, :message, 2, "gooseai.TransformColorAdjust"
175
- optional :color_match, :message, 3, "gooseai.TransformColorMatch"
176
- optional :depth_calc, :message, 4, "gooseai.TransformDepthCalc"
177
- optional :resample, :message, 5, "gooseai.TransformResample"
178
- end
179
- end
180
- add_message "gooseai.AssetParameters" do
181
- optional :action, :enum, 1, "gooseai.AssetAction"
182
- optional :project_id, :string, 2
183
- optional :use, :enum, 3, "gooseai.AssetUse"
184
- end
185
- add_message "gooseai.AnswerMeta" do
186
- proto3_optional :gpu_id, :string, 1
187
- proto3_optional :cpu_id, :string, 2
188
- proto3_optional :node_id, :string, 3
189
- proto3_optional :engine_id, :string, 4
190
- end
191
- add_message "gooseai.Answer" do
192
- optional :answer_id, :string, 1
193
- optional :request_id, :string, 2
194
- optional :received, :uint64, 3
195
- optional :created, :uint64, 4
196
- proto3_optional :meta, :message, 6, "gooseai.AnswerMeta"
197
- repeated :artifacts, :message, 7, "gooseai.Artifact"
198
- end
199
- add_message "gooseai.Request" do
200
- optional :engine_id, :string, 1
201
- optional :request_id, :string, 2
202
- optional :requested_type, :enum, 3, "gooseai.ArtifactType"
203
- repeated :prompt, :message, 4, "gooseai.Prompt"
204
- proto3_optional :conditioner, :message, 6, "gooseai.ConditionerParameters"
205
- proto3_optional :extras, :message, 2047, "google.protobuf.Struct"
206
- oneof :params do
207
- optional :image, :message, 5, "gooseai.ImageParameters"
208
- optional :classifier, :message, 7, "gooseai.ClassifierParameters"
209
- optional :asset, :message, 8, "gooseai.AssetParameters"
210
- optional :interpolate, :message, 11, "gooseai.InterpolateParameters"
211
- optional :transform, :message, 12, "gooseai.TransformParameters"
212
- end
213
- end
214
- add_message "gooseai.OnStatus" do
215
- repeated :reason, :enum, 1, "gooseai.FinishReason"
216
- proto3_optional :target, :string, 2
217
- repeated :action, :enum, 3, "gooseai.StageAction"
218
- end
219
- add_message "gooseai.Stage" do
220
- optional :id, :string, 1
221
- optional :request, :message, 2, "gooseai.Request"
222
- repeated :on_status, :message, 3, "gooseai.OnStatus"
223
- end
224
- add_message "gooseai.ChainRequest" do
225
- optional :request_id, :string, 1
226
- repeated :stage, :message, 2, "gooseai.Stage"
227
- end
228
- add_enum "gooseai.FinishReason" do
229
- value :NULL, 0
230
- value :LENGTH, 1
231
- value :STOP, 2
232
- value :ERROR, 3
233
- value :FILTER, 4
234
- end
235
- add_enum "gooseai.ArtifactType" do
236
- value :ARTIFACT_NONE, 0
237
- value :ARTIFACT_IMAGE, 1
238
- value :ARTIFACT_VIDEO, 2
239
- value :ARTIFACT_TEXT, 3
240
- value :ARTIFACT_TOKENS, 4
241
- value :ARTIFACT_EMBEDDING, 5
242
- value :ARTIFACT_CLASSIFICATIONS, 6
243
- value :ARTIFACT_MASK, 7
244
- value :ARTIFACT_LATENT, 8
245
- value :ARTIFACT_TENSOR, 9
246
- value :ARTIFACT_DEPTH, 10
247
- end
248
- add_enum "gooseai.MaskedAreaInit" do
249
- value :MASKED_AREA_INIT_ZERO, 0
250
- value :MASKED_AREA_INIT_RANDOM, 1
251
- value :MASKED_AREA_INIT_ORIGINAL, 2
252
- end
253
- add_enum "gooseai.WeightMethod" do
254
- value :TEXT_ENCODER, 0
255
- value :CROSS_ATTENTION, 1
256
- end
257
- add_enum "gooseai.DiffusionSampler" do
258
- value :SAMPLER_DDIM, 0
259
- value :SAMPLER_DDPM, 1
260
- value :SAMPLER_K_EULER, 2
261
- value :SAMPLER_K_EULER_ANCESTRAL, 3
262
- value :SAMPLER_K_HEUN, 4
263
- value :SAMPLER_K_DPM_2, 5
264
- value :SAMPLER_K_DPM_2_ANCESTRAL, 6
265
- value :SAMPLER_K_LMS, 7
266
- value :SAMPLER_K_DPMPP_2S_ANCESTRAL, 8
267
- value :SAMPLER_K_DPMPP_2M, 9
268
- value :SAMPLER_K_DPMPP_SDE, 10
269
- end
270
- add_enum "gooseai.Upscaler" do
271
- value :UPSCALER_RGB, 0
272
- value :UPSCALER_GFPGAN, 1
273
- value :UPSCALER_ESRGAN, 2
274
- end
275
- add_enum "gooseai.GuidancePreset" do
276
- value :GUIDANCE_PRESET_NONE, 0
277
- value :GUIDANCE_PRESET_SIMPLE, 1
278
- value :GUIDANCE_PRESET_FAST_BLUE, 2
279
- value :GUIDANCE_PRESET_FAST_GREEN, 3
280
- value :GUIDANCE_PRESET_SLOW, 4
281
- value :GUIDANCE_PRESET_SLOWER, 5
282
- value :GUIDANCE_PRESET_SLOWEST, 6
283
- end
284
- add_enum "gooseai.ModelArchitecture" do
285
- value :MODEL_ARCHITECTURE_NONE, 0
286
- value :MODEL_ARCHITECTURE_CLIP_VIT, 1
287
- value :MODEL_ARCHITECTURE_CLIP_RESNET, 2
288
- value :MODEL_ARCHITECTURE_LDM, 3
289
- end
290
- add_enum "gooseai.Action" do
291
- value :ACTION_PASSTHROUGH, 0
292
- value :ACTION_REGENERATE_DUPLICATE, 1
293
- value :ACTION_REGENERATE, 2
294
- value :ACTION_OBFUSCATE_DUPLICATE, 3
295
- value :ACTION_OBFUSCATE, 4
296
- value :ACTION_DISCARD, 5
297
- end
298
- add_enum "gooseai.ClassifierMode" do
299
- value :CLSFR_MODE_ZEROSHOT, 0
300
- value :CLSFR_MODE_MULTICLASS, 1
301
- end
302
- add_enum "gooseai.InterpolateMode" do
303
- value :INTERPOLATE_LINEAR, 0
304
- value :INTERPOLATE_RIFE, 1
305
- value :INTERPOLATE_VAE_LINEAR, 2
306
- value :INTERPOLATE_VAE_SLERP, 3
307
- end
308
- add_enum "gooseai.BorderMode" do
309
- value :BORDER_REFLECT, 0
310
- value :BORDER_REPLICATE, 1
311
- value :BORDER_WRAP, 2
312
- value :BORDER_ZERO, 3
313
- end
314
- add_enum "gooseai.ColorMatchMode" do
315
- value :COLOR_MATCH_HSV, 0
316
- value :COLOR_MATCH_LAB, 1
317
- value :COLOR_MATCH_RGB, 2
318
- end
319
- add_enum "gooseai.AssetAction" do
320
- value :ASSET_PUT, 0
321
- value :ASSET_GET, 1
322
- value :ASSET_DELETE, 2
323
- end
324
- add_enum "gooseai.AssetUse" do
325
- value :ASSET_USE_UNDEFINED, 0
326
- value :ASSET_USE_INPUT, 1
327
- value :ASSET_USE_OUTPUT, 2
328
- value :ASSET_USE_INTERMEDIATE, 3
329
- value :ASSET_USE_PROJECT, 4
330
- end
331
- add_enum "gooseai.StageAction" do
332
- value :STAGE_ACTION_PASS, 0
333
- value :STAGE_ACTION_DISCARD, 1
334
- value :STAGE_ACTION_RETURN, 2
335
- end
336
- end
337
- end
10
+
11
+ descriptor_data = "\n\x10generation.proto\x12\x07gooseai\x1a\x1cgoogle/protobuf/struct.proto\x1a\rtensors.proto\"/\n\x05Token\x12\x11\n\x04text\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\n\n\x02id\x18\x02 \x01(\rB\x07\n\x05_text\"T\n\x06Tokens\x12\x1e\n\x06tokens\x18\x01 \x03(\x0b\x32\x0e.gooseai.Token\x12\x19\n\x0ctokenizer_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0f\n\r_tokenizer_id\"\xf3\x02\n\x08\x41rtifact\x12\n\n\x02id\x18\x01 \x01(\x04\x12#\n\x04type\x18\x02 \x01(\x0e\x32\x15.gooseai.ArtifactType\x12\x0c\n\x04mime\x18\x03 \x01(\t\x12\x12\n\x05magic\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x10\n\x06\x62inary\x18\x05 \x01(\x0cH\x00\x12\x0e\n\x04text\x18\x06 \x01(\tH\x00\x12!\n\x06tokens\x18\x07 \x01(\x0b\x32\x0f.gooseai.TokensH\x00\x12\x33\n\nclassifier\x18\x0b \x01(\x0b\x32\x1d.gooseai.ClassifierParametersH\x00\x12!\n\x06tensor\x18\x0e \x01(\x0b\x32\x0f.tensors.TensorH\x00\x12\r\n\x05index\x18\x08 \x01(\r\x12,\n\rfinish_reason\x18\t \x01(\x0e\x32\x15.gooseai.FinishReason\x12\x0c\n\x04seed\x18\n \x01(\r\x12\x0c\n\x04uuid\x18\x0c \x01(\t\x12\x0c\n\x04size\x18\r \x01(\x04\x42\x06\n\x04\x64\x61taB\x08\n\x06_magic\"N\n\x10PromptParameters\x12\x11\n\x04init\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x13\n\x06weight\x18\x02 \x01(\x02H\x01\x88\x01\x01\x42\x07\n\x05_initB\t\n\x07_weight\"\xaf\x01\n\x06Prompt\x12\x32\n\nparameters\x18\x01 \x01(\x0b\x32\x19.gooseai.PromptParametersH\x01\x88\x01\x01\x12\x0e\n\x04text\x18\x02 \x01(\tH\x00\x12!\n\x06tokens\x18\x03 \x01(\x0b\x32\x0f.gooseai.TokensH\x00\x12%\n\x08\x61rtifact\x18\x04 \x01(\x0b\x32\x11.gooseai.ArtifactH\x00\x42\x08\n\x06promptB\r\n\x0b_parameters\"\xd7\x02\n\x11SamplerParameters\x12\x10\n\x03\x65ta\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x1b\n\x0esampling_steps\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x1c\n\x0flatent_channels\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12 \n\x13\x64ownsampling_factor\x18\x04 \x01(\x04H\x03\x88\x01\x01\x12\x16\n\tcfg_scale\x18\x05 \x01(\x02H\x04\x88\x01\x01\x12\x1d\n\x10init_noise_scale\x18\x06 \x01(\x02H\x05\x88\x01\x01\x12\x1d\n\x10step_noise_scale\x18\x07 \x01(\x02H\x06\x88\x01\x01\x42\x06\n\x04_etaB\x11\n\x0f_sampling_stepsB\x12\n\x10_latent_channelsB\x16\n\x14_downsampling_factorB\x0c\n\n_cfg_scaleB\x13\n\x11_init_noise_scaleB\x13\n\x11_step_noise_scale\"\x8b\x01\n\x15\x43onditionerParameters\x12 \n\x13vector_adjust_prior\x18\x01 \x01(\tH\x00\x88\x01\x01\x12(\n\x0b\x63onditioner\x18\x02 \x01(\x0b\x32\x0e.gooseai.ModelH\x01\x88\x01\x01\x42\x16\n\x14_vector_adjust_priorB\x0e\n\x0c_conditioner\"j\n\x12ScheduleParameters\x12\x12\n\x05start\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x10\n\x03\x65nd\x18\x02 \x01(\x02H\x01\x88\x01\x01\x12\x12\n\x05value\x18\x03 \x01(\x02H\x02\x88\x01\x01\x42\x08\n\x06_startB\x06\n\x04_endB\x08\n\x06_value\"\xe4\x01\n\rStepParameter\x12\x13\n\x0bscaled_step\x18\x01 \x01(\x02\x12\x30\n\x07sampler\x18\x02 \x01(\x0b\x32\x1a.gooseai.SamplerParametersH\x00\x88\x01\x01\x12\x32\n\x08schedule\x18\x03 \x01(\x0b\x32\x1b.gooseai.ScheduleParametersH\x01\x88\x01\x01\x12\x32\n\x08guidance\x18\x04 \x01(\x0b\x32\x1b.gooseai.GuidanceParametersH\x02\x88\x01\x01\x42\n\n\x08_samplerB\x0b\n\t_scheduleB\x0b\n\t_guidance\"\x97\x01\n\x05Model\x12\x30\n\x0c\x61rchitecture\x18\x01 \x01(\x0e\x32\x1a.gooseai.ModelArchitecture\x12\x11\n\tpublisher\x18\x02 \x01(\t\x12\x0f\n\x07\x64\x61taset\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\x02\x12\x18\n\x10semantic_version\x18\x05 \x01(\t\x12\r\n\x05\x61lias\x18\x06 \x01(\t\"\xbc\x01\n\x10\x43utoutParameters\x12*\n\x07\x63utouts\x18\x01 \x03(\x0b\x32\x19.gooseai.CutoutParameters\x12\x12\n\x05\x63ount\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x11\n\x04gray\x18\x03 \x01(\x02H\x01\x88\x01\x01\x12\x11\n\x04\x62lur\x18\x04 \x01(\x02H\x02\x88\x01\x01\x12\x17\n\nsize_power\x18\x05 \x01(\x02H\x03\x88\x01\x01\x42\x08\n\x06_countB\x07\n\x05_grayB\x07\n\x05_blurB\r\n\x0b_size_power\"=\n\x1aGuidanceScheduleParameters\x12\x10\n\x08\x64uration\x18\x01 \x01(\x02\x12\r\n\x05value\x18\x02 \x01(\x02\"\x97\x02\n\x1aGuidanceInstanceParameters\x12\x1e\n\x06models\x18\x02 \x03(\x0b\x32\x0e.gooseai.Model\x12\x1e\n\x11guidance_strength\x18\x03 \x01(\x02H\x00\x88\x01\x01\x12\x35\n\x08schedule\x18\x04 \x03(\x0b\x32#.gooseai.GuidanceScheduleParameters\x12/\n\x07\x63utouts\x18\x05 \x01(\x0b\x32\x19.gooseai.CutoutParametersH\x01\x88\x01\x01\x12$\n\x06prompt\x18\x06 \x01(\x0b\x32\x0f.gooseai.PromptH\x02\x88\x01\x01\x42\x14\n\x12_guidance_strengthB\n\n\x08_cutoutsB\t\n\x07_prompt\"~\n\x12GuidanceParameters\x12\x30\n\x0fguidance_preset\x18\x01 \x01(\x0e\x32\x17.gooseai.GuidancePreset\x12\x36\n\tinstances\x18\x02 \x03(\x0b\x32#.gooseai.GuidanceInstanceParameters\"n\n\rTransformType\x12.\n\tdiffusion\x18\x01 \x01(\x0e\x32\x19.gooseai.DiffusionSamplerH\x00\x12%\n\x08upscaler\x18\x02 \x01(\x0e\x32\x11.gooseai.UpscalerH\x00\x42\x06\n\x04type\"\xbd\x03\n\x0fImageParameters\x12\x13\n\x06height\x18\x01 \x01(\x04H\x00\x88\x01\x01\x12\x12\n\x05width\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x0c\n\x04seed\x18\x03 \x03(\r\x12\x14\n\x07samples\x18\x04 \x01(\x04H\x02\x88\x01\x01\x12\x12\n\x05steps\x18\x05 \x01(\x04H\x03\x88\x01\x01\x12.\n\ttransform\x18\x06 \x01(\x0b\x32\x16.gooseai.TransformTypeH\x04\x88\x01\x01\x12*\n\nparameters\x18\x07 \x03(\x0b\x32\x16.gooseai.StepParameter\x12\x36\n\x10masked_area_init\x18\x08 \x01(\x0e\x32\x17.gooseai.MaskedAreaInitH\x05\x88\x01\x01\x12\x31\n\rweight_method\x18\t \x01(\x0e\x32\x15.gooseai.WeightMethodH\x06\x88\x01\x01\x12\x15\n\x08quantize\x18\n \x01(\x08H\x07\x88\x01\x01\x42\t\n\x07_heightB\x08\n\x06_widthB\n\n\x08_samplesB\x08\n\x06_stepsB\x0c\n\n_transformB\x13\n\x11_masked_area_initB\x10\n\x0e_weight_methodB\x0b\n\t_quantize\"J\n\x11\x43lassifierConcept\x12\x0f\n\x07\x63oncept\x18\x01 \x01(\t\x12\x16\n\tthreshold\x18\x02 \x01(\x02H\x00\x88\x01\x01\x42\x0c\n\n_threshold\"\xf4\x01\n\x12\x43lassifierCategory\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\x08\x63oncepts\x18\x02 \x03(\x0b\x32\x1a.gooseai.ClassifierConcept\x12\x17\n\nadjustment\x18\x03 \x01(\x02H\x00\x88\x01\x01\x12$\n\x06\x61\x63tion\x18\x04 \x01(\x0e\x32\x0f.gooseai.ActionH\x01\x88\x01\x01\x12\x35\n\x0f\x63lassifier_mode\x18\x05 \x01(\x0e\x32\x17.gooseai.ClassifierModeH\x02\x88\x01\x01\x42\r\n\x0b_adjustmentB\t\n\x07_actionB\x12\n\x10_classifier_mode\"\xb8\x01\n\x14\x43lassifierParameters\x12/\n\ncategories\x18\x01 \x03(\x0b\x32\x1b.gooseai.ClassifierCategory\x12,\n\x07\x65xceeds\x18\x02 \x03(\x0b\x32\x1b.gooseai.ClassifierCategory\x12-\n\x0frealized_action\x18\x03 \x01(\x0e\x32\x0f.gooseai.ActionH\x00\x88\x01\x01\x42\x12\n\x10_realized_action\"]\n\x15InterpolateParameters\x12\x0e\n\x06ratios\x18\x01 \x03(\x02\x12+\n\x04mode\x18\x02 \x01(\x0e\x32\x18.gooseai.InterpolateModeH\x00\x88\x01\x01\x42\x07\n\x05_mode\"C\n\x0eTransformBlend\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x02\x12!\n\x06target\x18\x02 \x01(\x0b\x32\x11.gooseai.Artifact\"\xca\x01\n\x14TransformColorAdjust\x12\x17\n\nbrightness\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x15\n\x08\x63ontrast\x18\x02 \x01(\x02H\x01\x88\x01\x01\x12\x10\n\x03hue\x18\x03 \x01(\x02H\x02\x88\x01\x01\x12\x17\n\nsaturation\x18\x04 \x01(\x02H\x03\x88\x01\x01\x12\x16\n\tlightness\x18\x05 \x01(\x02H\x04\x88\x01\x01\x42\r\n\x0b_brightnessB\x0b\n\t_contrastB\x06\n\x04_hueB\r\n\x0b_saturationB\x0c\n\n_lightness\"d\n\x13TransformColorMatch\x12+\n\ncolor_mode\x18\x01 \x01(\x0e\x32\x17.gooseai.ColorMatchMode\x12 \n\x05image\x18\x02 \x01(\x0b\x32\x11.gooseai.Artifact\"\x8c\x01\n\x12TransformDepthCalc\x12\x19\n\x0c\x62lend_weight\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x18\n\x0b\x62lur_radius\x18\x02 \x01(\rH\x01\x88\x01\x01\x12\x14\n\x07reverse\x18\x03 \x01(\x08H\x02\x88\x01\x01\x42\x0f\n\r_blend_weightB\x0e\n\x0c_blur_radiusB\n\n\x08_reverse\"#\n\x0fTransformMatrix\x12\x10\n\x04\x64\x61ta\x18\x01 \x03(\x02\x42\x02\x10\x01\"\x86\x02\n\x11TransformResample\x12(\n\x0b\x62order_mode\x18\x01 \x01(\x0e\x32\x13.gooseai.BorderMode\x12+\n\ttransform\x18\x02 \x01(\x0b\x32\x18.gooseai.TransformMatrix\x12\x35\n\x0eprev_transform\x18\x03 \x01(\x0b\x32\x18.gooseai.TransformMatrixH\x00\x88\x01\x01\x12\x17\n\ndepth_warp\x18\x04 \x01(\x02H\x01\x88\x01\x01\x12\x18\n\x0b\x65xport_mask\x18\x05 \x01(\x08H\x02\x88\x01\x01\x42\x11\n\x0f_prev_transformB\r\n\x0b_depth_warpB\x0e\n\x0c_export_mask\"\x9b\x02\n\x13TransformParameters\x12(\n\x05\x62lend\x18\x01 \x01(\x0b\x32\x17.gooseai.TransformBlendH\x00\x12\x35\n\x0c\x63olor_adjust\x18\x02 \x01(\x0b\x32\x1d.gooseai.TransformColorAdjustH\x00\x12\x33\n\x0b\x63olor_match\x18\x03 \x01(\x0b\x32\x1c.gooseai.TransformColorMatchH\x00\x12\x31\n\ndepth_calc\x18\x04 \x01(\x0b\x32\x1b.gooseai.TransformDepthCalcH\x00\x12.\n\x08resample\x18\x05 \x01(\x0b\x32\x1a.gooseai.TransformResampleH\x00\x42\x0b\n\ttransform\"k\n\x0f\x41ssetParameters\x12$\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x14.gooseai.AssetAction\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x1e\n\x03use\x18\x03 \x01(\x0e\x32\x11.gooseai.AssetUse\"\x94\x01\n\nAnswerMeta\x12\x13\n\x06gpu_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x63pu_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x14\n\x07node_id\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x16\n\tengine_id\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\t\n\x07_gpu_idB\t\n\x07_cpu_idB\n\n\x08_node_idB\x0c\n\n_engine_id\"\xa9\x01\n\x06\x41nswer\x12\x11\n\tanswer_id\x18\x01 \x01(\t\x12\x12\n\nrequest_id\x18\x02 \x01(\t\x12\x10\n\x08received\x18\x03 \x01(\x04\x12\x0f\n\x07\x63reated\x18\x04 \x01(\x04\x12&\n\x04meta\x18\x06 \x01(\x0b\x32\x13.gooseai.AnswerMetaH\x00\x88\x01\x01\x12$\n\tartifacts\x18\x07 \x03(\x0b\x32\x11.gooseai.ArtifactB\x07\n\x05_meta\"\x8f\x04\n\x07Request\x12\x11\n\tengine_id\x18\x01 \x01(\t\x12\x12\n\nrequest_id\x18\x02 \x01(\t\x12-\n\x0erequested_type\x18\x03 \x01(\x0e\x32\x15.gooseai.ArtifactType\x12\x1f\n\x06prompt\x18\x04 \x03(\x0b\x32\x0f.gooseai.Prompt\x12)\n\x05image\x18\x05 \x01(\x0b\x32\x18.gooseai.ImageParametersH\x00\x12\x33\n\nclassifier\x18\x07 \x01(\x0b\x32\x1d.gooseai.ClassifierParametersH\x00\x12)\n\x05\x61sset\x18\x08 \x01(\x0b\x32\x18.gooseai.AssetParametersH\x00\x12\x35\n\x0binterpolate\x18\x0b \x01(\x0b\x32\x1e.gooseai.InterpolateParametersH\x00\x12\x31\n\ttransform\x18\x0c \x01(\x0b\x32\x1c.gooseai.TransformParametersH\x00\x12\x38\n\x0b\x63onditioner\x18\x06 \x01(\x0b\x32\x1e.gooseai.ConditionerParametersH\x01\x88\x01\x01\x12-\n\x06\x65xtras\x18\xff\x0f \x01(\x0b\x32\x17.google.protobuf.StructH\x02\x88\x01\x01\x42\x08\n\x06paramsB\x0e\n\x0c_conditionerB\t\n\x07_extrasJ\x04\x08\t\x10\nJ\x04\x08\n\x10\x0b\"w\n\x08OnStatus\x12%\n\x06reason\x18\x01 \x03(\x0e\x32\x15.gooseai.FinishReason\x12\x13\n\x06target\x18\x02 \x01(\tH\x00\x88\x01\x01\x12$\n\x06\x61\x63tion\x18\x03 \x03(\x0e\x32\x14.gooseai.StageActionB\t\n\x07_target\"\\\n\x05Stage\x12\n\n\x02id\x18\x01 \x01(\t\x12!\n\x07request\x18\x02 \x01(\x0b\x32\x10.gooseai.Request\x12$\n\ton_status\x18\x03 \x03(\x0b\x32\x11.gooseai.OnStatus\"A\n\x0c\x43hainRequest\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x1d\n\x05stage\x18\x02 \x03(\x0b\x32\x0e.gooseai.Stage*E\n\x0c\x46inishReason\x12\x08\n\x04NULL\x10\x00\x12\n\n\x06LENGTH\x10\x01\x12\x08\n\x04STOP\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\n\n\x06\x46ILTER\x10\x04*\xf8\x01\n\x0c\x41rtifactType\x12\x11\n\rARTIFACT_NONE\x10\x00\x12\x12\n\x0e\x41RTIFACT_IMAGE\x10\x01\x12\x12\n\x0e\x41RTIFACT_VIDEO\x10\x02\x12\x11\n\rARTIFACT_TEXT\x10\x03\x12\x13\n\x0f\x41RTIFACT_TOKENS\x10\x04\x12\x16\n\x12\x41RTIFACT_EMBEDDING\x10\x05\x12\x1c\n\x18\x41RTIFACT_CLASSIFICATIONS\x10\x06\x12\x11\n\rARTIFACT_MASK\x10\x07\x12\x13\n\x0f\x41RTIFACT_LATENT\x10\x08\x12\x13\n\x0f\x41RTIFACT_TENSOR\x10\t\x12\x12\n\x0e\x41RTIFACT_DEPTH\x10\n*g\n\x0eMaskedAreaInit\x12\x19\n\x15MASKED_AREA_INIT_ZERO\x10\x00\x12\x1b\n\x17MASKED_AREA_INIT_RANDOM\x10\x01\x12\x1d\n\x19MASKED_AREA_INIT_ORIGINAL\x10\x02*5\n\x0cWeightMethod\x12\x10\n\x0cTEXT_ENCODER\x10\x00\x12\x13\n\x0f\x43ROSS_ATTENTION\x10\x01*\x98\x02\n\x10\x44iffusionSampler\x12\x10\n\x0cSAMPLER_DDIM\x10\x00\x12\x10\n\x0cSAMPLER_DDPM\x10\x01\x12\x13\n\x0fSAMPLER_K_EULER\x10\x02\x12\x1d\n\x19SAMPLER_K_EULER_ANCESTRAL\x10\x03\x12\x12\n\x0eSAMPLER_K_HEUN\x10\x04\x12\x13\n\x0fSAMPLER_K_DPM_2\x10\x05\x12\x1d\n\x19SAMPLER_K_DPM_2_ANCESTRAL\x10\x06\x12\x11\n\rSAMPLER_K_LMS\x10\x07\x12 \n\x1cSAMPLER_K_DPMPP_2S_ANCESTRAL\x10\x08\x12\x16\n\x12SAMPLER_K_DPMPP_2M\x10\t\x12\x17\n\x13SAMPLER_K_DPMPP_SDE\x10\n*F\n\x08Upscaler\x12\x10\n\x0cUPSCALER_RGB\x10\x00\x12\x13\n\x0fUPSCALER_GFPGAN\x10\x01\x12\x13\n\x0fUPSCALER_ESRGAN\x10\x02*\xd8\x01\n\x0eGuidancePreset\x12\x18\n\x14GUIDANCE_PRESET_NONE\x10\x00\x12\x1a\n\x16GUIDANCE_PRESET_SIMPLE\x10\x01\x12\x1d\n\x19GUIDANCE_PRESET_FAST_BLUE\x10\x02\x12\x1e\n\x1aGUIDANCE_PRESET_FAST_GREEN\x10\x03\x12\x18\n\x14GUIDANCE_PRESET_SLOW\x10\x04\x12\x1a\n\x16GUIDANCE_PRESET_SLOWER\x10\x05\x12\x1b\n\x17GUIDANCE_PRESET_SLOWEST\x10\x06*\x91\x01\n\x11ModelArchitecture\x12\x1b\n\x17MODEL_ARCHITECTURE_NONE\x10\x00\x12\x1f\n\x1bMODEL_ARCHITECTURE_CLIP_VIT\x10\x01\x12\"\n\x1eMODEL_ARCHITECTURE_CLIP_RESNET\x10\x02\x12\x1a\n\x16MODEL_ARCHITECTURE_LDM\x10\x03*\xa2\x01\n\x06\x41\x63tion\x12\x16\n\x12\x41\x43TION_PASSTHROUGH\x10\x00\x12\x1f\n\x1b\x41\x43TION_REGENERATE_DUPLICATE\x10\x01\x12\x15\n\x11\x41\x43TION_REGENERATE\x10\x02\x12\x1e\n\x1a\x41\x43TION_OBFUSCATE_DUPLICATE\x10\x03\x12\x14\n\x10\x41\x43TION_OBFUSCATE\x10\x04\x12\x12\n\x0e\x41\x43TION_DISCARD\x10\x05*D\n\x0e\x43lassifierMode\x12\x17\n\x13\x43LSFR_MODE_ZEROSHOT\x10\x00\x12\x19\n\x15\x43LSFR_MODE_MULTICLASS\x10\x01*v\n\x0fInterpolateMode\x12\x16\n\x12INTERPOLATE_LINEAR\x10\x00\x12\x14\n\x10INTERPOLATE_RIFE\x10\x01\x12\x1a\n\x16INTERPOLATE_VAE_LINEAR\x10\x02\x12\x19\n\x15INTERPOLATE_VAE_SLERP\x10\x03*X\n\nBorderMode\x12\x12\n\x0e\x42ORDER_REFLECT\x10\x00\x12\x14\n\x10\x42ORDER_REPLICATE\x10\x01\x12\x0f\n\x0b\x42ORDER_WRAP\x10\x02\x12\x0f\n\x0b\x42ORDER_ZERO\x10\x03*O\n\x0e\x43olorMatchMode\x12\x13\n\x0f\x43OLOR_MATCH_HSV\x10\x00\x12\x13\n\x0f\x43OLOR_MATCH_LAB\x10\x01\x12\x13\n\x0f\x43OLOR_MATCH_RGB\x10\x02*=\n\x0b\x41ssetAction\x12\r\n\tASSET_PUT\x10\x00\x12\r\n\tASSET_GET\x10\x01\x12\x10\n\x0c\x41SSET_DELETE\x10\x02*\x81\x01\n\x08\x41ssetUse\x12\x17\n\x13\x41SSET_USE_UNDEFINED\x10\x00\x12\x13\n\x0f\x41SSET_USE_INPUT\x10\x01\x12\x14\n\x10\x41SSET_USE_OUTPUT\x10\x02\x12\x1a\n\x16\x41SSET_USE_INTERMEDIATE\x10\x03\x12\x15\n\x11\x41SSET_USE_PROJECT\x10\x04*W\n\x0bStageAction\x12\x15\n\x11STAGE_ACTION_PASS\x10\x00\x12\x18\n\x14STAGE_ACTION_DISCARD\x10\x01\x12\x17\n\x13STAGE_ACTION_RETURN\x10\x02\x32\x83\x01\n\x11GenerationService\x12\x31\n\x08Generate\x12\x10.gooseai.Request\x1a\x0f.gooseai.Answer\"\x00\x30\x01\x12;\n\rChainGenerate\x12\x15.gooseai.ChainRequest\x1a\x0f.gooseai.Answer\"\x00\x30\x01\x42;Z9github.com/stability-ai/api-interfaces/gooseai/generationb\x06proto3"
12
+
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+ pool.add_serialized_file(descriptor_data)
338
15
 
339
16
  module Gooseai
340
17
  Token = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gooseai.Token").msgclass
@@ -28,7 +28,7 @@ module StabilitySDK
28
28
  when :ARTIFACT_CLASSIFICATIONS
29
29
  ext = "pb.json"
30
30
  filename = "#{filename_base}.#{ext}"
31
- contents = artifact.classifier.to_json
31
+ contents = artifact.to_json
32
32
  else
33
33
  logger.warn "not implemented for ArtifactType #{artifact.type}"
34
34
  end
@@ -1,3 +1,3 @@
1
1
  module StabilitySDK
2
- VERSION = "0.3.5"
2
+ VERSION = "0.4.0"
3
3
  end
data/lib/tensors_pb.rb CHANGED
@@ -1,58 +1,14 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: tensors.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("tensors.proto", :syntax => :proto3) do
8
- add_message "tensors.Tensor" do
9
- optional :dtype, :enum, 1, "tensors.Dtype"
10
- repeated :shape, :int64, 2
11
- optional :data, :bytes, 3
12
- proto3_optional :attr_type, :enum, 4, "tensors.AttributeType"
13
- end
14
- add_message "tensors.Attribute" do
15
- optional :name, :string, 1
16
- oneof :value do
17
- optional :module, :message, 3, "tensors.Module"
18
- optional :tensor, :message, 4, "tensors.Tensor"
19
- optional :string, :string, 5
20
- optional :int64, :int64, 6
21
- optional :float, :float, 7
22
- optional :bool, :bool, 8
23
- end
24
- end
25
- add_message "tensors.Module" do
26
- optional :name, :string, 1
27
- repeated :names, :string, 2
28
- repeated :attributes, :message, 3, "tensors.Attribute"
29
- end
30
- add_enum "tensors.Dtype" do
31
- value :DT_INVALID, 0
32
- value :DT_FLOAT32, 1
33
- value :DT_FLOAT64, 2
34
- value :DT_FLOAT16, 3
35
- value :DT_BFLOAT16, 4
36
- value :DT_COMPLEX32, 5
37
- value :DT_COMPLEX64, 6
38
- value :DT_COMPLEX128, 7
39
- value :DT_UINT8, 8
40
- value :DT_INT8, 9
41
- value :DT_INT16, 10
42
- value :DT_INT32, 11
43
- value :DT_INT64, 12
44
- value :DT_BOOL, 13
45
- value :DT_QUINT8, 14
46
- value :DT_QINT8, 15
47
- value :DT_QINT32, 16
48
- value :DT_QUINT4_2, 17
49
- end
50
- add_enum "tensors.AttributeType" do
51
- value :AT_PARAMETER, 0
52
- value :AT_BUFFER, 1
53
- end
54
- end
55
- end
7
+
8
+ descriptor_data = "\n\rtensors.proto\x12\x07tensors\"\x82\x01\n\x06Tensor\x12\x1d\n\x05\x64type\x18\x01 \x01(\x0e\x32\x0e.tensors.Dtype\x12\r\n\x05shape\x18\x02 \x03(\x03\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12.\n\tattr_type\x18\x04 \x01(\x0e\x32\x16.tensors.AttributeTypeH\x00\x88\x01\x01\x42\x0c\n\n_attr_type\"\xac\x01\n\tAttribute\x12\x0c\n\x04name\x18\x01 \x01(\t\x12!\n\x06module\x18\x03 \x01(\x0b\x32\x0f.tensors.ModuleH\x00\x12!\n\x06tensor\x18\x04 \x01(\x0b\x32\x0f.tensors.TensorH\x00\x12\x10\n\x06string\x18\x05 \x01(\tH\x00\x12\x0f\n\x05int64\x18\x06 \x01(\x03H\x00\x12\x0f\n\x05\x66loat\x18\x07 \x01(\x02H\x00\x12\x0e\n\x04\x62ool\x18\x08 \x01(\x08H\x00\x42\x07\n\x05value\"M\n\x06Module\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05names\x18\x02 \x03(\t\x12&\n\nattributes\x18\x03 \x03(\x0b\x32\x12.tensors.Attribute*\x9e\x02\n\x05\x44type\x12\x0e\n\nDT_INVALID\x10\x00\x12\x0e\n\nDT_FLOAT32\x10\x01\x12\x0e\n\nDT_FLOAT64\x10\x02\x12\x0e\n\nDT_FLOAT16\x10\x03\x12\x0f\n\x0b\x44T_BFLOAT16\x10\x04\x12\x10\n\x0c\x44T_COMPLEX32\x10\x05\x12\x10\n\x0c\x44T_COMPLEX64\x10\x06\x12\x11\n\rDT_COMPLEX128\x10\x07\x12\x0c\n\x08\x44T_UINT8\x10\x08\x12\x0b\n\x07\x44T_INT8\x10\t\x12\x0c\n\x08\x44T_INT16\x10\n\x12\x0c\n\x08\x44T_INT32\x10\x0b\x12\x0c\n\x08\x44T_INT64\x10\x0c\x12\x0b\n\x07\x44T_BOOL\x10\r\x12\r\n\tDT_QUINT8\x10\x0e\x12\x0c\n\x08\x44T_QINT8\x10\x0f\x12\r\n\tDT_QINT32\x10\x10\x12\x0f\n\x0b\x44T_QUINT4_2\x10\x11*0\n\rAttributeType\x12\x10\n\x0c\x41T_PARAMETER\x10\x00\x12\r\n\tAT_BUFFER\x10\x01\x42)Z\'github.com/coreweave/tensorizer/tensorsb\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+ pool.add_serialized_file(descriptor_data)
56
12
 
57
13
  module Tensors
58
14
  Tensor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("tensors.Tensor").msgclass
@@ -30,5 +30,6 @@ Gem::Specification.new do |spec|
30
30
  spec.add_dependency "mime-types", ">= 3.0.0"
31
31
  spec.add_dependency "fastimage", "~> 2.2", ">= 2.2.6"
32
32
  spec.add_dependency "thor", ">= 1.2.1"
33
+ spec.add_dependency "google-protobuf", ">= 4.0.0"
33
34
  spec.add_development_dependency "grpc-tools"
34
35
  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.3.5
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosei Moriyama
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-13 00:00:00.000000000 Z
11
+ date: 2024-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc
@@ -72,6 +72,20 @@ dependencies:
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
74
  version: 1.2.1
75
+ - !ruby/object:Gem::Dependency
76
+ name: google-protobuf
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: 4.0.0
82
+ type: :runtime
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: 4.0.0
75
89
  - !ruby/object:Gem::Dependency
76
90
  name: grpc-tools
77
91
  requirement: !ruby/object:Gem::Requirement