/ src / model / params / txt2img.rs
txt2img.rs
 1  #[derive(Debug)]
 2  pub struct TextToImageParams {
 3      pub prompt: String,
 4      pub negative_prompt: Option<String>,
 5      pub width: u32,
 6      pub height: u32,
 7      pub steps: usize,
 8      pub guidance_scale: f32,
 9      pub seed: Option<u64>,
10  }
11  
12  impl Default for TextToImageParams {
13      fn default() -> Self {
14          Self {
15              prompt: String::new(),
16              negative_prompt: None,
17              width: 1024,
18              height: 1024,
19              steps: 40,
20              guidance_scale: 7.5,
21              seed: None,
22          }
23      }
24  }