stable_diffusion_trainer/trainer/output/
mod.rs

1//! Trainer's output.
2
3use std::path::PathBuf;
4
5use crate::prelude::*;
6
7/// The output structure.
8#[derive(Debug, Serialize, Deserialize)]
9pub struct Output {
10    /// The name of the output.
11    pub name: String,
12    /// The directory to save the output to.
13    pub directory: PathBuf
14}
15
16impl Output {
17    /// Create a new output structure.
18    pub fn new(name: impl Into<String>, directory: impl Into<PathBuf>) -> Self {
19        let name = name.into();
20        let directory = directory.into();
21        Output { name, directory }
22    }
23}