pub struct ImageParams {Show 13 fields
pub prompt: String,
pub negative_prompt: Option<String>,
pub init_image_url: Option<String>,
pub mask_url: Option<String>,
pub ref_image_url: Option<String>,
pub denoise: Option<f32>,
pub cfg_scale: Option<f32>,
pub sampling_method: Option<String>,
pub width: u32,
pub height: u32,
pub steps: u32,
pub seed: Option<u64>,
pub ext: String,
}Fields§
§prompt: String§negative_prompt: Option<String>Negative prompt — what the model should steer AWAY from.
Optional: when None, sd-cli is invoked without
--negative-prompt. Wire-format key: negativePrompt.
init_image_url: Option<String>HTTPS URL to a base image for image-to-image generation.
When set, the worker downloads the bytes to a local tempfile
and invokes sd-cli --init-img <path>. Required for any
task profile that declares the initImage capability.
mask_url: Option<String>HTTPS URL to a black/white inpaint mask (white = the region the
model may repaint). When set alongside init_image_url, the
worker downloads it and invokes sd-cli --mask <path> so only
the masked region changes. Wire-format key: maskUrl.
ref_image_url: Option<String>HTTPS URL to a reference image for instruction-edit models
(e.g. Qwen-Image-Edit / Flux Kontext). When set, the worker
downloads it and invokes sd-cli -r <path> (reference mode)
instead of the --init-img/--strength/--mask img2img path:
the model regenerates the whole image from the reference per the
instruction prompt; per-region clipping happens in the studio
composite. Wire-format key: refImageUrl.
denoise: Option<f32>Denoise / noise-strength for i2i (0.0 = keep init image
unchanged, 1.0 = full re-noise). Maps to sd-cli --strength.
cfg_scale: Option<f32>Classifier-free guidance scale. Per-job override; falls back
to ModelSource.cliDefaults.cfgScale when None.
sampling_method: Option<String>Sampler choice (euler, euler_a, dpm++2m, …). Per-job
override; falls back to ModelSource.cliDefaults.samplingMethod.
width: u32§height: u32§steps: u32§seed: Option<u64>§ext: StringTrait Implementations§
Source§impl Clone for ImageParams
impl Clone for ImageParams
Source§fn clone(&self) -> ImageParams
fn clone(&self) -> ImageParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ImageParams
impl Debug for ImageParams
Source§impl Default for ImageParams
impl Default for ImageParams
Source§fn default() -> ImageParams
fn default() -> ImageParams
Source§impl<'de> Deserialize<'de> for ImageParams
impl<'de> Deserialize<'de> for ImageParams
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 ImageParams
impl RefUnwindSafe for ImageParams
impl Send for ImageParams
impl Sync for ImageParams
impl Unpin for ImageParams
impl UnsafeUnpin for ImageParams
impl UnwindSafe for ImageParams
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.