tulpa-prompter 0.1.3 → 0.1.4

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: b58b45e75671724997df06cf5917b1b69eb85a59255b8cddce2527fe57145d4c
4
- data.tar.gz: d3fa86d31649a3b42ec8633f8872f2fee40a807b83bd6a6d0c64492028d24444
3
+ metadata.gz: 867ab87efc3a3655fae1be03b6f5b9e953a9edfaf2566ac191c2bc3b52d773c9
4
+ data.tar.gz: ce8697e0098318da3245ebf5486475bb7187f9574aa0b9ea50b448c48c20b0d0
5
5
  SHA512:
6
- metadata.gz: 3d4bccbae1911b6b0d9f693f597aa7a5b420344648342113f3973918b29b1f336d00c367fc499e21ae93a6c610a25288278059124ef796ecbb1cec53c01f32ba
7
- data.tar.gz: 319423004646c27388ed2502c67ff95d6effba4813dadcf4b8f8172416e60df33ce72bb042956d07f26a731f22359385dd97e38e766b62b9faa243356d904997
6
+ metadata.gz: 5274be0e1de701e0f5528ae45b82d238fb9b93f09685d4763d58c3b9b346d1b2fe6575c0167ed3c22734271ab1bcb425495224422eba2aefa73a0125c2e2ff09
7
+ data.tar.gz: 886511a804ddae7eb83f2d6308a2b18d4e7f09ad469dca74d144cf13dc9d3cd5d8e7207bb04800ed1f8a2208d7fe9e30bbea98e3e63c7a55f35742143db02a61
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tulpa-prompter (0.1.2)
4
+ tulpa-prompter (0.1.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -26,7 +26,8 @@ json_string = TulpaPrompter.call(
26
26
  prefix: "portrait of ",
27
27
  suffix: " by greg rutkowski",
28
28
  interval: 15,
29
- shuffle: false
29
+ shuffle: false,
30
+ format: :deforum_colab # default
30
31
  )
31
32
  ```
32
33
 
@@ -4,8 +4,8 @@ module TulpaPrompter
4
4
  class Error < StandardError; end
5
5
 
6
6
  def self.call(options)
7
- options[:format] ||= {}
8
- options[:format][:frame] ||= 'integer'
7
+ options[:format] ||= :deforum_colab
8
+ options[:format] = parse_format_options(options[:format]) if options[:format].is_a?(Symbol)
9
9
 
10
10
  options[:interval] ||= 15
11
11
  options[:interval] = options[:interval].to_i
@@ -13,7 +13,7 @@ module TulpaPrompter
13
13
 
14
14
  prompts = options[:lines].map.with_index do |line, index|
15
15
  frame = index * options[:interval]
16
- frame = "\"#{frame}\"" if options[:format][:frame] == 'string'
16
+ frame = "\"#{frame}\"" if options[:format][:frame] == :string
17
17
 
18
18
  prompt = line.strip
19
19
  prompt = options[:prefix].to_s + prompt + options[:suffix].to_s
@@ -30,4 +30,18 @@ module TulpaPrompter
30
30
 
31
31
  output
32
32
  end
33
+
34
+ def self.parse_format_options(format)
35
+ format_options = {}
36
+
37
+ case format
38
+ when :deforum_webui
39
+ format_options[:frame] = :string
40
+ else
41
+ format_options[:assign] = "animation_prompts"
42
+ format_options[:frame] = :integer
43
+ end
44
+
45
+ format_options
46
+ end
33
47
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TulpaPrompter
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tulpa-prompter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dreaming Tulpa
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
11
  date: 2022-10-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description:
13
+ description:
14
14
  email:
15
15
  - hey@dreamingtulpa.com
16
16
  executables: []
@@ -33,7 +33,7 @@ metadata:
33
33
  homepage_uri: https://github.com/dreamingtulpa/tulpa_prompter
34
34
  source_code_uri: https://github.com/dreamingtulpa/tulpa_prompter
35
35
  changelog_uri: https://github.com/dreamingtulpa/tulpa_prompter/blob/master/CHANGELOG.md
36
- post_install_message:
36
+ post_install_message:
37
37
  rdoc_options: []
38
38
  require_paths:
39
39
  - lib
@@ -48,8 +48,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  - !ruby/object:Gem::Version
49
49
  version: '0'
50
50
  requirements: []
51
- rubygems_version: 3.0.3.1
52
- signing_key:
51
+ rubygems_version: 3.3.7
52
+ signing_key:
53
53
  specification_version: 4
54
54
  summary: CLI tool to build animation prompts for AI notebooks like Deforum Stable
55
55
  Diffusion