Class: RubyLLM::Agents::ImageUpscaler
- Inherits:
-
Object
- Object
- RubyLLM::Agents::ImageUpscaler
- Extended by:
- DSL
- Includes:
- Execution
- Defined in:
- lib/ruby_llm/agents/image/upscaler.rb,
lib/ruby_llm/agents/image/upscaler/dsl.rb,
lib/ruby_llm/agents/image/upscaler/execution.rb
Overview
Image upscaler for resolution enhancement
Increases the resolution of images using AI upscaling models. Supports 2x, 4x, and 8x upscaling with optional face enhancement.
Defined Under Namespace
Instance Attribute Summary collapse
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#tenant_id ⇒ Object
readonly
Returns the value of attribute tenant_id.
Class Method Summary collapse
-
.call(image:, **options) ⇒ ImageUpscaleResult
Execute image upscaling.
-
.inherited(subclass) ⇒ Object
Ensure subclasses inherit DSL settings.
Instance Method Summary collapse
-
#call ⇒ ImageUpscaleResult
Execute the image upscaling.
-
#initialize(image:, **options) ⇒ ImageUpscaler
constructor
Initialize a new image upscaler instance.
Methods included from Execution
Constructor Details
#initialize(image:, **options) ⇒ ImageUpscaler
Initialize a new image upscaler instance
67 68 69 70 71 |
# File 'lib/ruby_llm/agents/image/upscaler.rb', line 67 def initialize(image:, **) @image = image @options = @tenant_id = nil end |
Instance Attribute Details
#image ⇒ Object (readonly)
Returns the value of attribute image.
56 57 58 |
# File 'lib/ruby_llm/agents/image/upscaler.rb', line 56 def image @image end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
56 57 58 |
# File 'lib/ruby_llm/agents/image/upscaler.rb', line 56 def @options end |
#tenant_id ⇒ Object (readonly)
Returns the value of attribute tenant_id.
56 57 58 |
# File 'lib/ruby_llm/agents/image/upscaler.rb', line 56 def tenant_id @tenant_id end |
Class Method Details
.call(image:, **options) ⇒ ImageUpscaleResult
Execute image upscaling
39 40 41 |
# File 'lib/ruby_llm/agents/image/upscaler.rb', line 39 def call(image:, **) new(image: image, **).call end |
.inherited(subclass) ⇒ Object
Ensure subclasses inherit DSL settings
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/ruby_llm/agents/image/upscaler.rb', line 44 def inherited(subclass) super subclass.instance_variable_set(:@model, @model) subclass.instance_variable_set(:@scale, @scale) subclass.instance_variable_set(:@face_enhance, @face_enhance) subclass.instance_variable_set(:@denoise_strength, @denoise_strength) subclass.instance_variable_set(:@version, @version) subclass.instance_variable_set(:@description, @description) subclass.instance_variable_set(:@cache_ttl, @cache_ttl) end |
Instance Method Details
#call ⇒ ImageUpscaleResult
Execute the image upscaling
76 77 78 |
# File 'lib/ruby_llm/agents/image/upscaler.rb', line 76 def call execute end |