automatic1111 0.1.1 → 0.1.2
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 +4 -4
- data/README.md +2 -1
- data/lib/automatic1111/configurable.rb +6 -2
- data/lib/automatic1111/connection.rb +1 -0
- data/lib/automatic1111/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da6e8e072ce73cd690e52055b50c50d3f1f9f7d98c83739096274bff64dc9aca
|
|
4
|
+
data.tar.gz: 701b00689274d734d33a11bcf90ca98132df7d47610815a2edf0286e38e95685
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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)
|
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.
|
|
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-
|
|
11
|
+
date: 2023-03-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|