runapi-flux-2 0.3.2 → 0.4.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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 99834bc6758a3602727fb1efc7d061b7224be8658a46010b943a97b273975370
|
|
4
|
+
data.tar.gz: 842305b481a3f709ebbe1df7c25f093a2e3b21d2ac636d3a4d2ee356c085b871
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 286a0a28006ce4be9fd7b4b84fb331243bd0817e95f07ce6660cd3442942fc3dcac6f47b95eb5c6928361385cbec66eba6adf57808ab5b3f335589ca3ae4d601
|
|
7
|
+
data.tar.gz: c949374b12127680a9f68a92405fdc6f42797546c6b0ead17e149c3c37b448fc094d1d88d7405b07cbbb416c0740200b1ab3acdf39c4fdf58f9f249d69500753
|
|
@@ -32,7 +32,6 @@ module RunApi
|
|
|
32
32
|
# @return [RunApi::Flux2::Types::TextToImageResponse] task creation result with id
|
|
33
33
|
def create(options: nil, **params)
|
|
34
34
|
params = compact_params(params)
|
|
35
|
-
validate_contract!(CONTRACT["text-to-image"], params)
|
|
36
35
|
request(:post, ENDPOINT, body: params, options: options)
|
|
37
36
|
end
|
|
38
37
|
|
data/lib/runapi/flux_2.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: runapi-flux-2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- RunAPI
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.6.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.
|
|
25
|
+
version: 0.6.0
|
|
26
26
|
description: The Flux 2 Ruby SDK is the language-specific package for Flux 2 on RunAPI.
|
|
27
27
|
Use this package for image generation, image editing, and creative production workflows
|
|
28
28
|
when your application needs request bodies, task status lookup, and consistent RunAPI
|
|
@@ -39,7 +39,6 @@ files:
|
|
|
39
39
|
- lib/runapi-flux_2.rb
|
|
40
40
|
- lib/runapi/flux_2.rb
|
|
41
41
|
- lib/runapi/flux_2/client.rb
|
|
42
|
-
- lib/runapi/flux_2/contract_gen.rb
|
|
43
42
|
- lib/runapi/flux_2/resources/remix_image.rb
|
|
44
43
|
- lib/runapi/flux_2/resources/text_to_image.rb
|
|
45
44
|
- lib/runapi/flux_2/types.rb
|
|
@@ -67,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
67
66
|
- !ruby/object:Gem::Version
|
|
68
67
|
version: '0'
|
|
69
68
|
requirements: []
|
|
70
|
-
rubygems_version: 4.0.
|
|
69
|
+
rubygems_version: 4.0.10
|
|
71
70
|
specification_version: 4
|
|
72
71
|
summary: Flux 2 API Ruby SDK for RunAPI
|
|
73
72
|
test_files: []
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module RunApi
|
|
4
|
-
module Flux2
|
|
5
|
-
CONTRACT = {
|
|
6
|
-
"remix-image" => {
|
|
7
|
-
"models" => ["flux-2-flex-remix-image", "flux-2-max-remix-image", "flux-2-pro-remix-image"],
|
|
8
|
-
"fields_by_model" => {
|
|
9
|
-
"flux-2-flex-remix-image" => {
|
|
10
|
-
"aspect_ratio" => {
|
|
11
|
-
"enum" => ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3", "auto"]
|
|
12
|
-
},
|
|
13
|
-
"model" => {
|
|
14
|
-
"required" => true
|
|
15
|
-
},
|
|
16
|
-
"output_resolution" => {
|
|
17
|
-
"enum" => ["1k", "2k"]
|
|
18
|
-
},
|
|
19
|
-
"prompt" => {
|
|
20
|
-
"required" => true,
|
|
21
|
-
"min" => 3,
|
|
22
|
-
"max" => 5000,
|
|
23
|
-
"length" => true
|
|
24
|
-
},
|
|
25
|
-
"source_image_urls" => {
|
|
26
|
-
"required" => true,
|
|
27
|
-
"min_items" => 1,
|
|
28
|
-
"max_items" => 8
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"flux-2-max-remix-image" => {
|
|
32
|
-
"aspect_ratio" => {
|
|
33
|
-
"enum" => ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3"],
|
|
34
|
-
"required" => true
|
|
35
|
-
},
|
|
36
|
-
"model" => {
|
|
37
|
-
"required" => true
|
|
38
|
-
},
|
|
39
|
-
"output_count" => {
|
|
40
|
-
"enum" => [1],
|
|
41
|
-
"type" => "integer"
|
|
42
|
-
},
|
|
43
|
-
"output_resolution" => {
|
|
44
|
-
"enum" => ["1k"]
|
|
45
|
-
},
|
|
46
|
-
"prompt" => {
|
|
47
|
-
"required" => true,
|
|
48
|
-
"min" => 3,
|
|
49
|
-
"max" => 5000,
|
|
50
|
-
"length" => true
|
|
51
|
-
},
|
|
52
|
-
"source_image_urls" => {
|
|
53
|
-
"required" => true,
|
|
54
|
-
"min_items" => 1,
|
|
55
|
-
"max_items" => 1
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"flux-2-pro-remix-image" => {
|
|
59
|
-
"aspect_ratio" => {
|
|
60
|
-
"enum" => ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3", "auto"]
|
|
61
|
-
},
|
|
62
|
-
"model" => {
|
|
63
|
-
"required" => true
|
|
64
|
-
},
|
|
65
|
-
"output_resolution" => {
|
|
66
|
-
"enum" => ["1k", "2k"]
|
|
67
|
-
},
|
|
68
|
-
"prompt" => {
|
|
69
|
-
"required" => true,
|
|
70
|
-
"min" => 3,
|
|
71
|
-
"max" => 5000,
|
|
72
|
-
"length" => true
|
|
73
|
-
},
|
|
74
|
-
"source_image_urls" => {
|
|
75
|
-
"required" => true,
|
|
76
|
-
"min_items" => 1,
|
|
77
|
-
"max_items" => 8
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"rules" => [{
|
|
82
|
-
"when" => {
|
|
83
|
-
"model" => "flux-2-flex-remix-image"
|
|
84
|
-
},
|
|
85
|
-
"forbidden" => ["output_count"]
|
|
86
|
-
}, {
|
|
87
|
-
"when" => {
|
|
88
|
-
"model" => "flux-2-max-remix-image"
|
|
89
|
-
},
|
|
90
|
-
"forbidden" => ["enable_safety_checker"]
|
|
91
|
-
}, {
|
|
92
|
-
"when" => {
|
|
93
|
-
"model" => "flux-2-pro-remix-image"
|
|
94
|
-
},
|
|
95
|
-
"forbidden" => ["output_count"]
|
|
96
|
-
}]
|
|
97
|
-
},
|
|
98
|
-
"text-to-image" => {
|
|
99
|
-
"models" => ["flux-2-flex-text-to-image", "flux-2-max-text-to-image", "flux-2-pro-text-to-image"],
|
|
100
|
-
"fields_by_model" => {
|
|
101
|
-
"flux-2-flex-text-to-image" => {
|
|
102
|
-
"aspect_ratio" => {
|
|
103
|
-
"enum" => ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3"]
|
|
104
|
-
},
|
|
105
|
-
"model" => {
|
|
106
|
-
"required" => true
|
|
107
|
-
},
|
|
108
|
-
"output_resolution" => {
|
|
109
|
-
"enum" => ["1k", "2k"]
|
|
110
|
-
},
|
|
111
|
-
"prompt" => {
|
|
112
|
-
"required" => true,
|
|
113
|
-
"min" => 3,
|
|
114
|
-
"max" => 5000,
|
|
115
|
-
"length" => true
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"flux-2-max-text-to-image" => {
|
|
119
|
-
"aspect_ratio" => {
|
|
120
|
-
"enum" => ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3"],
|
|
121
|
-
"required" => true
|
|
122
|
-
},
|
|
123
|
-
"model" => {
|
|
124
|
-
"required" => true
|
|
125
|
-
},
|
|
126
|
-
"output_count" => {
|
|
127
|
-
"enum" => [1],
|
|
128
|
-
"type" => "integer"
|
|
129
|
-
},
|
|
130
|
-
"output_resolution" => {
|
|
131
|
-
"enum" => ["1k"]
|
|
132
|
-
},
|
|
133
|
-
"prompt" => {
|
|
134
|
-
"required" => true,
|
|
135
|
-
"min" => 3,
|
|
136
|
-
"max" => 5000,
|
|
137
|
-
"length" => true
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"flux-2-pro-text-to-image" => {
|
|
141
|
-
"aspect_ratio" => {
|
|
142
|
-
"enum" => ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3"]
|
|
143
|
-
},
|
|
144
|
-
"model" => {
|
|
145
|
-
"required" => true
|
|
146
|
-
},
|
|
147
|
-
"output_resolution" => {
|
|
148
|
-
"enum" => ["1k", "2k"]
|
|
149
|
-
},
|
|
150
|
-
"prompt" => {
|
|
151
|
-
"required" => true,
|
|
152
|
-
"min" => 3,
|
|
153
|
-
"max" => 5000,
|
|
154
|
-
"length" => true
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
"rules" => [{
|
|
159
|
-
"when" => {
|
|
160
|
-
"model" => "flux-2-flex-text-to-image"
|
|
161
|
-
},
|
|
162
|
-
"forbidden" => ["output_count"]
|
|
163
|
-
}, {
|
|
164
|
-
"when" => {
|
|
165
|
-
"model" => "flux-2-max-text-to-image"
|
|
166
|
-
},
|
|
167
|
-
"forbidden" => ["enable_safety_checker"]
|
|
168
|
-
}, {
|
|
169
|
-
"when" => {
|
|
170
|
-
"model" => "flux-2-pro-text-to-image"
|
|
171
|
-
},
|
|
172
|
-
"forbidden" => ["output_count"]
|
|
173
|
-
}]
|
|
174
|
-
}
|
|
175
|
-
}.freeze
|
|
176
|
-
end
|
|
177
|
-
end
|