pub struct Output {
pub name: String,
pub directory: PathBuf,
}Expand description
The output structure.
Fields§
§name: StringThe name of the output.
directory: PathBufThe directory to save the output to.
Implementations§
Source§impl Output
impl Output
Sourcepub fn new(name: impl Into<String>, directory: impl Into<PathBuf>) -> Self
pub fn new(name: impl Into<String>, directory: impl Into<PathBuf>) -> Self
Create a new output structure.
Examples found in repository?
examples/train-lora.rs (line 10)
3fn main() {
4 let kohya_ss = std::env::var("KOHYA_SS_PATH").expect("KOHYA_SS_PATH not set");
5 let environment = Environment::new().with_kohya_ss(kohya_ss);
6
7 let prompt = Prompt::new("bacana", "white dog");
8 let image_data_set = ImageDataSet::from_dir("examples/training/lora/bacana/images");
9 let data_set = TrainingDataSet::new(image_data_set);
10 let output = Output::new("{prompt.instance}({prompt.class})d{network.dimension}a{network.alpha}", "examples/training/lora/bacana/output");
11 let parameters = Parameters::new(prompt, data_set, output);
12
13 Trainer::new()
14 .with_environment(environment)
15 .start(¶meters);
16}Trait Implementations§
Source§impl<'de> Deserialize<'de> for Output
impl<'de> Deserialize<'de> for Output
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
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
Mutably borrows from an owned value. Read more