pub struct InpaintInput {
pub guidance_scale: Option<f64>,
pub image_url: String,
pub mask_url: String,
pub model_name: String,
pub negative_prompt: Option<String>,
pub num_inference_steps: Option<i64>,
pub prompt: String,
pub seed: Option<i64>,
}Fields§
§guidance_scale: Option<f64>The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you.
image_url: StringInput image for img2img or inpaint mode/// Input image for img2img or inpaint mode/// “https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png”
mask_url: StringInput mask for inpaint mode. Black areas will be preserved, white areas will be inpainted./// Input mask for inpaint mode. Black areas will be preserved, white areas will be inpainted./// “https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png”
model_name: StringURL or HuggingFace ID of the base model to generate the image./// URL or HuggingFace ID of the base model to generate the image./// “diffusers/stable-diffusion-xl-1.0-inpainting-0.1” “stabilityai/stable-diffusion-xl-base-1.0” “runwayml/stable-diffusion-v1-5” “SG161222/Realistic_Vision_V2.0”
negative_prompt: Option<String>The negative prompt to use. Use it to address details that you don’t want in the image. This could be colors, objects, scenery and even the small details (e.g. moustache, blurry, low resolution)./// The negative prompt to use. Use it to address details that you don’t want in the image. This could be colors, objects, scenery and even the small details (e.g. moustache, blurry, low resolution)./// “cartoon, painting, illustration, (worst quality, low quality, normal quality:2)” “nsfw, cartoon, (epicnegative:0.9)”
num_inference_steps: Option<i64>Increasing the amount of steps tells Stable Diffusion that it should take more steps to generate your final result which can increase the amount of detail in your image.
prompt: StringThe prompt to use for generating the image. Be as descriptive as possible for best results./// The prompt to use for generating the image. Be as descriptive as possible for best results./// “a photo of a cat”
seed: Option<i64>The same seed and the same prompt given to the same version of Stable Diffusion will output the same image every time./// The same seed and the same prompt given to the same version of Stable Diffusion will output the same image every time./// 1234
Trait Implementations§
Source§impl Debug for InpaintInput
impl Debug for InpaintInput
Source§impl Default for InpaintInput
impl Default for InpaintInput
Source§fn default() -> InpaintInput
fn default() -> InpaintInput
Source§impl<'de> Deserialize<'de> for InpaintInput
impl<'de> Deserialize<'de> for InpaintInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for InpaintInput
impl RefUnwindSafe for InpaintInput
impl Send for InpaintInput
impl Sync for InpaintInput
impl Unpin for InpaintInput
impl UnwindSafe for InpaintInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().