pub struct ImageToImageRequestBodyArgs { /* private fields */ }Expand description
Builder for ImageToImageRequestBody.
Implementations§
Source§impl ImageToImageRequestBodyArgs
impl ImageToImageRequestBodyArgs
pub fn text_prompts<VALUE: Into<TextPrompts>>( &mut self, value: VALUE, ) -> &mut Self
pub fn init_image<VALUE: Into<InitImage>>(&mut self, value: VALUE) -> &mut Self
Sourcepub fn init_image_mode<VALUE: Into<InitImageMode>>(
&mut self,
value: VALUE,
) -> &mut Self
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.
Sourcepub fn image_strength<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
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“
Sourcepub fn step_schedule_start<VALUE: Into<f64>>(
&mut self,
value: VALUE,
) -> &mut Self
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.)
Sourcepub fn step_schedule_end<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
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.
Sourcepub fn cfg_scale<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self
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)
pub fn clip_guidance_preset<VALUE: Into<ClipGuidancePreset>>( &mut self, value: VALUE, ) -> &mut Self
Sourcepub fn sampler<VALUE: Into<Sampler>>(&mut self, value: VALUE) -> &mut Self
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.
Sourcepub fn samples<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self
pub fn samples<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self
Number of images to generate
Sourcepub fn seed<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
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)
Sourcepub fn steps<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
pub fn steps<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
Number of diffusion steps to run
Sourcepub fn style_preset<VALUE: Into<StylePreset>>(
&mut self,
value: VALUE,
) -> &mut Self
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.
Sourcepub fn extras<VALUE: Into<Value>>(&mut self, value: VALUE) -> &mut Self
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.
Sourcepub fn build(&self) -> Result<ImageToImageRequestBody, StabilityAIError>
pub fn build(&self) -> Result<ImageToImageRequestBody, StabilityAIError>
Trait Implementations§
Source§impl Clone for ImageToImageRequestBodyArgs
impl Clone for ImageToImageRequestBodyArgs
Source§fn clone(&self) -> ImageToImageRequestBodyArgs
fn clone(&self) -> ImageToImageRequestBodyArgs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more