Struct sal_e_api::ComfyParams

source ·
pub struct ComfyParams {
Show 13 fields pub prompt: Option<Prompt>, pub seed: Option<i64>, pub steps: Option<u32>, pub count: u32, pub cfg: Option<f32>, pub width: Option<u32>, pub height: Option<u32>, pub prompt_text: Option<String>, pub negative_prompt_text: Option<String>, pub denoising: Option<f32>, pub sampler: Option<String>, pub batch_size: Option<u32>, pub image: Option<Vec<u8>>,
}
Expand description

A struct representing the parameters for ComfyUI image generation.

Fields§

§prompt: Option<Prompt>

The ComfyUI prompt to use for generation.

§seed: Option<i64>

The random seed to use for generation.

§steps: Option<u32>

The number of steps to take for generation.

§count: u32

The number of images to generate.

§cfg: Option<f32>

The CFG scale to use for generation.

§width: Option<u32>

The image width to use for generation.

§height: Option<u32>

The image height to use for generation.

§prompt_text: Option<String>

The prompt text to use for generation.

§negative_prompt_text: Option<String>

The negative prompt text to use for generation.

§denoising: Option<f32>

The denoising strength to use for generation.

§sampler: Option<String>

The sampler to use for generation.

§batch_size: Option<u32>

The batch size to use for generation.

§image: Option<Vec<u8>>

The image to use for generation.

Implementations§

source§

impl ComfyParams

source

pub fn apply_to(&self, prompt: &Prompt) -> Prompt

Applies the parameters to the provided prompt.

§Arguments
  • prompt - The prompt to apply the parameters to.
§Returns

The prompt with the parameters applied.

source

pub fn apply(&self) -> Option<Prompt>

Applies the parameters to the current prompt.

§Returns

The prompt with the parameters applied.

Trait Implementations§

source§

impl Clone for ComfyParams

source§

fn clone(&self) -> ComfyParams

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ComfyParams

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ComfyParams

source§

fn default() -> ComfyParams

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for ComfyParams

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<&dyn GenParams> for ComfyParams

source§

fn from(params: &dyn GenParams) -> Self

Converts to this type from the input type.
source§

impl GenParams for ComfyParams

source§

fn seed(&self) -> Option<i64>

Gets the seed.
source§

fn set_seed(&mut self, seed: i64)

Sets the seed.
source§

fn steps(&self) -> Option<u32>

Gets the number of steps.
source§

fn set_steps(&mut self, steps: u32)

Sets the number of steps.
source§

fn count(&self) -> Option<u32>

Gets the number of images to generate.
source§

fn set_count(&mut self, count: u32)

Sets the number of images to generate.
source§

fn cfg(&self) -> Option<f32>

Gets the CFG scale.
source§

fn set_cfg(&mut self, cfg: f32)

Sets the CFG scale.
source§

fn width(&self) -> Option<u32>

Gets the image width.
source§

fn set_width(&mut self, width: u32)

Sets the image width.
source§

fn height(&self) -> Option<u32>

Gets the image height.
source§

fn set_height(&mut self, height: u32)

Sets the image height.
source§

fn prompt(&self) -> Option<String>

Gets the prompt.
source§

fn set_prompt(&mut self, prompt: String)

Sets the prompt.
source§

fn negative_prompt(&self) -> Option<String>

Gets the negative prompt.
source§

fn set_negative_prompt(&mut self, negative_prompt: String)

Sets the negative prompt.
source§

fn denoising(&self) -> Option<f32>

Gets the denoising strength.
source§

fn set_denoising(&mut self, denoising: f32)

Sets the denoising strength.
source§

fn sampler(&self) -> Option<String>

Gets the sampler.
source§

fn set_sampler(&mut self, sampler: String)

Sets the sampler.
source§

fn batch_size(&self) -> Option<u32>

Gets the batch size.
source§

fn set_batch_size(&mut self, batch_size: u32)

Sets the batch size.
source§

fn image(&self) -> Option<Vec<u8>>

Gets the image.
source§

fn set_image(&mut self, image: Option<Vec<u8>>)

Sets the image.
source§

impl Serialize for ComfyParams

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AsAny for T
where T: Any,

§

fn as_any(&self) -> &(dyn Any + 'static)

Get a reference to dyn Any.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,