Struct sal_e_api::Img2ImgParams

source ·
pub struct Img2ImgParams {
    pub user_params: Img2ImgRequest,
    pub defaults: Option<Img2ImgRequest>,
}
Expand description

A struct representing the parameters for image generation in the Stable Diffusion WebUI API.

Fields§

§user_params: Img2ImgRequest

The parameters provided by the user.

§defaults: Option<Img2ImgRequest>

The default parameters.

Trait Implementations§

source§

impl Clone for Img2ImgParams

source§

fn clone(&self) -> Img2ImgParams

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 Img2ImgParams

source§

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

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

impl Default for Img2ImgParams

source§

fn default() -> Img2ImgParams

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

impl<'de> Deserialize<'de> for Img2ImgParams

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 Img2ImgParams

source§

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

Converts to this type from the input type.
source§

impl GenParams for Img2ImgParams

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 PartialEq for Img2ImgParams

source§

fn eq(&self, other: &Img2ImgParams) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Img2ImgParams

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
source§

impl StructuralPartialEq for Img2ImgParams

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>,