stable_diffusion_trainer/network/
mod.rs1use crate::prelude::*;
4
5#[derive(Debug, Serialize, Deserialize)]
7pub struct Network {
8 pub dimension: usize,
10 pub alpha: f32
12}
13
14impl Default for Network {
15 fn default() -> Self {
16 Network {
17 dimension: 8,
18 alpha: 1.0
19 }
20 }
21}
22
23impl Network {
24 pub fn new() -> Self {
26 Default::default()
27 }
28
29 pub fn with_dimension(mut self, dimension: usize) -> Self {
31 self.dimension = dimension;
32 self
33 }
34
35 pub fn with_alpha(mut self, alpha: f32) -> Self {
37 self.alpha = alpha;
38 self
39 }
40}