Module: StableDiffusionRuby::Dispatcher
- Defined in:
- lib/stable_diffusion_ruby/dispatcher.rb
Constant Summary collapse
- VALID_BACKENDS =
%i[modal python].freeze
Class Method Summary collapse
-
.backend_for(command, params, backend: nil) ⇒ Object
Returns the appropriate backend for a given command and params.
Class Method Details
.backend_for(command, params, backend: nil) ⇒ Object
Returns the appropriate backend for a given command and params.
12 13 14 15 16 17 18 19 |
# File 'lib/stable_diffusion_ruby/dispatcher.rb', line 12 def self.backend_for(command, params, backend: nil) if backend validate_backend!(backend) build_backend(backend, command, params) else auto_select_backend(command, params) end end |