stability_sdk 0.2.3 → 0.2.5

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: 355759d5ba4bcb0ba3b688e85cc87651303710b7f79be7c63233b87f55c76696
4
- data.tar.gz: 6f216e291a32250132cc07ba6c9083eefa2927332c3fefefef19971f412d80c8
3
+ metadata.gz: 452e6a45ca110b36eb3d6fafa4201a1be7ad4b6e0b6f677fe37f6a66fc8f5749
4
+ data.tar.gz: 1b73ee6ab82c18f63e786d71b2eee472e0db32572c4444ef5b3d5ac92003e3e7
5
5
  SHA512:
6
- metadata.gz: 8f36ca048b79f3f79723427b7613bba2af9cb2f992796a7354b2b74a0c76ff6c72419aabf9c5dd0f64d8ee32b240fb1795e8a7c55d2b67e2b7f0f380c46ca4ab
7
- data.tar.gz: 4b1ddbfc50e40a39b201082a606a9d6960b6b93b6233fa031d7e2dfc961f8d31abca1a6b180aab84727ef4c04b43692233776dba84f0750e54c63128eb5e1515
6
+ metadata.gz: 481f539dc5bc36e67ebb3d1a1ec759280e4ed8ef0b02c49f0dfc3d7ce657db7b295e26d28f69bf7a24a5f410cc74ac62e083b2eaed78b6db2a19853150f8cc47
7
+ data.tar.gz: b9cfebe4973e2919eec0ffa24aa3b23d6326d46e017be05250bcba6d12ea3a2e539014eed9ef172bb6b0fa1415ffd48823813413b49de6f73b4ac3b5acbb1781
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stability_sdk (0.2.3)
4
+ stability_sdk (0.2.5)
5
5
  grpc (>= 1.0.0)
6
6
  mime-types (>= 3.0.0)
7
7
 
data/README.md CHANGED
@@ -19,8 +19,7 @@ Or install it yourself as:
19
19
  $ gem install stability_sdk
20
20
 
21
21
  ## Usage
22
-
23
- First you need to create a [DreamStudio](https://beta.dreamstudio.ai/home)'s account and get an API Key of it.
22
+ First, you need to create a [DreamStudio](https://beta.dreamstudio.ai/home)'s account and get an API Key of it.
24
23
 
25
24
  - Access [DreamStudio](https://beta.dreamstudio.ai/dream) and create an account if you have not had it
26
25
  - Go to the [membership page](https://beta.dreamstudio.ai/membership)
@@ -72,7 +71,7 @@ This sample code saves a generated image as `result.png`.
72
71
  ```ruby
73
72
  require "stability_sdk"
74
73
 
75
- client = StabilitySDK::Client.new(api_key: "YOUR_API_KEY")
74
+ client = StabilitySDK::Client.new(api_key: "YOUR_API_KEY", timeout: 600)
76
75
 
77
76
  prompt = "your prompot here"
78
77
  options = {}
@@ -1,6 +1,5 @@
1
1
  require "grpc"
2
2
  require "generation_services_pb"
3
- require "pry"
4
3
 
5
4
  module StabilitySDK
6
5
  class Client
@@ -43,7 +42,7 @@ module StabilitySDK
43
42
  def generate(prompt, options, &block)
44
43
  width = options.has_key?(:width) ? options[:width].to_i : DEFAULT_IMAGE_WIDTH
45
44
  height = options.has_key?(:height) ? options[:height].to_i : DEFAULT_IMAGE_HEIGHT
46
- samples = options.has_key?(:num_samples) ? [:num_samples].to_i : DEFAULT_SAMPLE_SIZE
45
+ samples = options.has_key?(:num_samples) ? options[:num_samples].to_i : DEFAULT_SAMPLE_SIZE
47
46
  steps = options.has_key?(:steps) ? options[:steps].to_i : DEFAULT_STEPS
48
47
  seed = options.has_key?(:seed) ? [options[:seed].to_i] : [rand(4294967295)]
49
48
  transform = Gooseai::TransformType.new(
@@ -1,3 +1,3 @@
1
1
  module StabilitySDK
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stability_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosei Moriyama