ImageToImageRequestBodyArgs

Struct ImageToImageRequestBodyArgs 

Source
pub struct ImageToImageRequestBodyArgs { /* private fields */ }
Expand description

Implementations§

Source§

impl ImageToImageRequestBodyArgs

Source

pub fn text_prompts<VALUE: Into<TextPrompts>>( &mut self, value: VALUE, ) -> &mut Self

Source

pub fn init_image<VALUE: Into<InitImage>>(&mut self, value: VALUE) -> &mut Self

Source

pub fn init_image_mode<VALUE: Into<InitImageMode>>( &mut self, value: VALUE, ) -> &mut Self

Whether to use image_strength or step_schedule_* to control how much influence the init_image has on the result.

Source

pub fn image_strength<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self

How much influence the init_image has on the diffusion process. Values close to 1 will yield images very similar to the init_image while values close to 0 will yield images wildly different than the init_image. The behavior of this is meant to mirror DreamStudio’s "Image Strength" slider.

This parameter is just an alternate way to set step_schedule_start, which is done via the calculation 1 - image_strength. For example, passing in an Image Strength of 35% (0.35) would result in a step_schedule_start of 0.65.\n“

Source

pub fn step_schedule_start<VALUE: Into<f64>>( &mut self, value: VALUE, ) -> &mut Self

Skips a proportion of the start of the diffusion steps, allowing the init_image to influence the final generated image. Lower values will result in more influence from the init_image, while higher values will result in more influence from the diffusion steps. (e.g. a value of 0 would simply return you the init_image, where a value of 1 would return you a completely different image.)

Source

pub fn step_schedule_end<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self

Skips a proportion of the end of the diffusion steps, allowing the init_image to influence the final generated image. Lower values will result in more influence from the init_image, while higher values will result in more influence from the diffusion steps.

Source

pub fn cfg_scale<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self

How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt)

Source

pub fn clip_guidance_preset<VALUE: Into<ClipGuidancePreset>>( &mut self, value: VALUE, ) -> &mut Self

Source

pub fn sampler<VALUE: Into<Sampler>>(&mut self, value: VALUE) -> &mut Self

Which sampler to use for the diffusion process. If this value is omitted we’ll automatically select an appropriate sampler for you.

Source

pub fn samples<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self

Number of images to generate

Source

pub fn seed<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self

Random noise seed (omit this option or use 0 for a random seed)

Source

pub fn steps<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self

Number of diffusion steps to run

Source

pub fn style_preset<VALUE: Into<StylePreset>>( &mut self, value: VALUE, ) -> &mut Self

Pass in a style preset to guide the image model towards a particular style.

This list of style presets is subject to change.

Source

pub fn extras<VALUE: Into<Value>>(&mut self, value: VALUE) -> &mut Self

Extra parameters passed to the engine.

These parameters are used for in-development or experimental features and may change without warning, so please use with caution.

Source

pub fn build(&self) -> Result<ImageToImageRequestBody, StabilityAIError>

Builds a new ImageToImageRequestBody.

§Errors

If a required field has not been initialized.

Trait Implementations§

Source§

impl Clone for ImageToImageRequestBodyArgs

Source§

fn clone(&self) -> ImageToImageRequestBodyArgs

Returns a duplicate 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 ImageToImageRequestBodyArgs

Source§

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

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

impl Default for ImageToImageRequestBodyArgs

Source§

fn default() -> Self

Returns the “default value” for a type. 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
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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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> ToOwned for T
where T: Clone,

Source§

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

Source§

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

Source§

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.
Source§

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

Source§

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

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

fn try_into<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<U, <U as TryFrom<T>>::Error>> + 'async_trait>>
where T: 'async_trait,

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> ErasedDestructor for T
where T: 'static,