kohya-ss / kohya-ss/sd-scripts

use train_network.py to training lora how to get the remaining completion time in real time

Open
#1,066 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.2k
Forks
1.2k
Avg merge
11m
Merged PRs (30d)
2

Description

when i use nodejs to run this script :
```
// Import the 'exec' function from the 'child_process' module
const { exec } = require('child_process');

// Execute the shell command and capture the stdout
exec('sh train.sh', { maxBuffer: 1024 * 10000 }, (error, stdout, stderr) => {
if (error) {
console.error(`Error executing the script: ${error}`);
return;
}

// Log any errors captured in stderr
console.log('Error stderr:', stderr);

// Log the stdout (script output) in real-time
console.log('Script output:', stdout);

// Clear the 'scriptProcess' variable if necessary
scriptProcess = null;
});
```
I only can get the all output and stdout in this callback for completion this training, how to get the progress in real time ?

Contributor guide

No contributing guide indexed for this repository

Research direction

Review train.sh and train_network.py, then inspect how Node.js child_process.exec handles output while the command is running. Determine whether the training script exposes progress or timing information before completion. Done means documenting a real-time progress approach and explaining how remaining time can be obtained, if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, python
Domain
cli, machine-learning
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.