pub struct Txt2ImgRequest {Show 41 fields
pub enable_hr: Option<bool>,
pub denoising_strength: Option<f64>,
pub firstphase_width: Option<u32>,
pub firstphase_height: Option<u32>,
pub hr_scale: Option<f64>,
pub hr_upscaler: Option<String>,
pub hr_second_pass_steps: Option<u32>,
pub hr_resize_x: Option<u32>,
pub hr_resize_y: Option<u32>,
pub prompt: Option<String>,
pub styles: Option<Vec<String>>,
pub seed: Option<i64>,
pub subseed: Option<i64>,
pub subseed_strength: Option<u32>,
pub seed_resize_from_h: Option<i32>,
pub seed_resize_from_w: Option<i32>,
pub sampler_name: Option<String>,
pub batch_size: Option<u32>,
pub n_iter: Option<u32>,
pub steps: Option<u32>,
pub cfg_scale: Option<f64>,
pub width: Option<u32>,
pub height: Option<u32>,
pub restore_faces: Option<bool>,
pub tiling: Option<bool>,
pub do_not_save_samples: Option<bool>,
pub do_not_save_grid: Option<bool>,
pub negative_prompt: Option<String>,
pub eta: Option<u32>,
pub s_churn: Option<f64>,
pub s_tmax: Option<f64>,
pub s_tmin: Option<f64>,
pub s_noise: Option<f64>,
pub override_settings: Option<HashMap<String, Value>>,
pub override_settings_restore_afterwards: Option<bool>,
pub script_args: Option<Vec<Value>>,
pub sampler_index: Option<String>,
pub script_name: Option<String>,
pub send_images: Option<bool>,
pub save_images: Option<bool>,
pub alwayson_scripts: Option<HashMap<String, Value>>,
}Expand description
Struct representing a text to image request.
Fields§
§enable_hr: Option<bool>Whether to enable high resolution mode.
denoising_strength: Option<f64>Strength of denoising applied to the image.
firstphase_width: Option<u32>Width of the image in the first phase.
firstphase_height: Option<u32>Height of the image in the first phase.
hr_scale: Option<f64>Scale factor for high resolution mode.
hr_upscaler: Option<String>Upscaler used in high resolution mode.
hr_second_pass_steps: Option<u32>Number of steps in the second pass of high resolution mode.
hr_resize_x: Option<u32>Width of the image after resizing in high resolution mode.
hr_resize_y: Option<u32>Height of the image after resizing in high resolution mode.
prompt: Option<String>Text prompt for generating the image.
styles: Option<Vec<String>>List of style prompts for generating the image.
seed: Option<i64>Seed for generating the image.
subseed: Option<i64>Subseed for generating the image.
subseed_strength: Option<u32>Strength of subseed.
seed_resize_from_h: Option<i32>Height of the seed image.
seed_resize_from_w: Option<i32>Width of the seed image.
sampler_name: Option<String>Name of the sampler.
batch_size: Option<u32>Batch size used in generating images.
n_iter: Option<u32>Number of images to generate per batch.
steps: Option<u32>Number of steps.
cfg_scale: Option<f64>CFG scale factor.
width: Option<u32>Width of the generated image.
height: Option<u32>Height of the generated image.
restore_faces: Option<bool>Whether to restore faces in the generated image.
tiling: Option<bool>Whether to use tiling mode in the generated image.
do_not_save_samples: Option<bool>Whether to save samples when generating multiple images.
do_not_save_grid: Option<bool>Whether to save the grid when generating multiple images.
negative_prompt: Option<String>Negative text prompt.
eta: Option<u32>Eta value.
s_churn: Option<f64>Churn value.
s_tmax: Option<f64>Maximum temperature value.
s_tmin: Option<f64>Minimum temperature value.
s_noise: Option<f64>Noise value.
override_settings: Option<HashMap<String, Value>>Settings to override when generating the image.
override_settings_restore_afterwards: Option<bool>Whether to restore the settings after generating the image.
script_args: Option<Vec<Value>>Arguments for the script.
sampler_index: Option<String>Index of the sampler.
script_name: Option<String>Name of the script.
send_images: Option<bool>Whether to send the generated images.
save_images: Option<bool>Whether to send the generated images.
alwayson_scripts: Option<HashMap<String, Value>>Scripts to always run.
Implementations§
Source§impl Txt2ImgRequest
impl Txt2ImgRequest
Sourcepub fn with_prompt(&mut self, prompt: String) -> &mut Self
pub fn with_prompt(&mut self, prompt: String) -> &mut Self
Sourcepub fn with_styles(&mut self, styles: Vec<String>) -> &mut Self
pub fn with_styles(&mut self, styles: Vec<String>) -> &mut Self
Sourcepub fn with_style(&mut self, style: String) -> &mut Self
pub fn with_style(&mut self, style: String) -> &mut Self
Sourcepub fn with_subseed(&mut self, subseed: i64) -> &mut Self
pub fn with_subseed(&mut self, subseed: i64) -> &mut Self
Sourcepub fn with_subseed_strength(&mut self, subseed_strength: u32) -> &mut Self
pub fn with_subseed_strength(&mut self, subseed_strength: u32) -> &mut Self
Sourcepub fn with_sampler_name(&mut self, sampler_name: String) -> &mut Self
pub fn with_sampler_name(&mut self, sampler_name: String) -> &mut Self
Sourcepub fn with_batch_size(&mut self, batch_size: u32) -> &mut Self
pub fn with_batch_size(&mut self, batch_size: u32) -> &mut Self
Sourcepub fn with_n_iter(&mut self, n_iter: u32) -> &mut Self
pub fn with_n_iter(&mut self, n_iter: u32) -> &mut Self
Sourcepub fn with_steps(&mut self, steps: u32) -> &mut Self
pub fn with_steps(&mut self, steps: u32) -> &mut Self
Sourcepub fn with_cfg_scale(&mut self, cfg_scale: f64) -> &mut Self
pub fn with_cfg_scale(&mut self, cfg_scale: f64) -> &mut Self
Sourcepub fn with_width(&mut self, width: u32) -> &mut Self
pub fn with_width(&mut self, width: u32) -> &mut Self
Sourcepub fn with_height(&mut self, height: u32) -> &mut Self
pub fn with_height(&mut self, height: u32) -> &mut Self
Sourcepub fn with_restore_faces(&mut self, restore_faces: bool) -> &mut Self
pub fn with_restore_faces(&mut self, restore_faces: bool) -> &mut Self
Sourcepub fn with_tiling(&mut self, tiling: bool) -> &mut Self
pub fn with_tiling(&mut self, tiling: bool) -> &mut Self
Sourcepub fn with_negative_prompt(&mut self, negative_prompt: String) -> &mut Self
pub fn with_negative_prompt(&mut self, negative_prompt: String) -> &mut Self
Trait Implementations§
Source§impl Clone for Txt2ImgRequest
impl Clone for Txt2ImgRequest
Source§fn clone(&self) -> Txt2ImgRequest
fn clone(&self) -> Txt2ImgRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more