automatic1111 0.1.1 → 0.1.2

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: 9a8c1b57810fbb72e37672ce301f69562f46e9f4464b3ed581c590d0953f817d
4
- data.tar.gz: 5be97962003ad08c0298fd475561ae8020da3fcf59d35fbbaadf5b2bda6a732f
3
+ metadata.gz: da6e8e072ce73cd690e52055b50c50d3f1f9f7d98c83739096274bff64dc9aca
4
+ data.tar.gz: 701b00689274d734d33a11bcf90ca98132df7d47610815a2edf0286e38e95685
5
5
  SHA512:
6
- metadata.gz: 38a68f00f0c8673f458ad17d16ab55c300b3b33c56401d2b2a4b270fea8fb7a74e02dcc7e3b12c666a63a25c54f8483c861ca9759e39fbc9c809960d614979a9
7
- data.tar.gz: 0031e4b51cee3bda637662d454ab37321fa79f8bfbbd2987c7dffce35d36c743e3632dac9bcf839fe7501a71014baaa972add34c574335d259b6a7b174a587d1
6
+ metadata.gz: eba6a96c47e0996021431a0fd01651a5e72e525a0bc8d3a20011ecf5ba0a5bdcc438c4cad45ba04b275b6d8d8f381e6fe8f2f2fa9997da2c11c82d8cb633796d
7
+ data.tar.gz: 2ada977842ff633c1e864c5050a8f43852885f827f5ae0a9b8f4e1b9607c40319822e0e9abca775505ca30db3b79994619e55464c2b1cb9330905119fdd7737c
data/README.md CHANGED
@@ -22,7 +22,8 @@ https://xxxxxx.gradio.live')
22
22
  client.post('/login', params: { username: 'username', password: 'password' }, headers: { 'Content-Type' => 'application/x-www-form-urlencoded' })
23
23
 
24
24
  # Call endpoint
25
- client.post('/sdapi/v1/txt2img', params: { prompt: 'test' })
25
+ resp = client.post('/sdapi/v1/txt2img', params: { prompt: 'test', sampler_name: 'DPM++ SDE Karras', steps: 20, enable_hr: true, hr_upscaler: 'Latent', denoising_strength: 0.7, width: 512, height: 768 })
26
+ resp['images']
26
27
  ```
27
28
 
28
29
  ## Development
@@ -2,13 +2,13 @@
2
2
 
3
3
  module Automatic1111
4
4
  module Configurable
5
- attr_accessor :api_endpoint_url, :cookie
5
+ attr_accessor :api_endpoint_url, :cookie, :read_timeout
6
6
 
7
7
  class << self
8
8
  # List of configurable keys for {Datatrans::Client}
9
9
  # @return [Array] of option keys
10
10
  def keys
11
- @keys ||= %i[api_endpoint_url cookie]
11
+ @keys ||= %i[api_endpoint_url cookie read_timeout]
12
12
  end
13
13
  end
14
14
 
@@ -17,6 +17,10 @@ module Automatic1111
17
17
  yield self
18
18
  end
19
19
 
20
+ def read_timeout
21
+ @read_timeout ||= 60
22
+ end
23
+
20
24
  private
21
25
 
22
26
  def options
@@ -50,6 +50,7 @@ module Automatic1111
50
50
  connection = Faraday.new(url: api_endpoint_url) do |conn|
51
51
  conn.request :retry
52
52
  conn.adapter :net_http
53
+ conn.options.read_timeout = read_timeout
53
54
  end
54
55
 
55
56
  # @last_response = connection.send(method, Addressable::URI.parse(path.to_s).normalize.to_s, data)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Automatic1111
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: automatic1111
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dreaming Tulpa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-24 00:00:00.000000000 Z
11
+ date: 2023-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday