kohya-ss / kohya-ss/sd-scripts

'timestep_sampling=flux_shift' can offer quality improvements, but barely mentioned in docs

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

Description

So I just discovered this Flux (SD3 branch) parameter:
```
--timestep_sampling flux_shift
```
Previously I'd been using
```
--timestep_sampling shift
```
due to:
1) The README.md having `--timestep_sampling shift` in the example training command
2) The extensive diagrams showing the effect of changing the `discrete_flow_shift` value and the effect of different `sigmoid` values - none of which apply to the `--timestep_sampling flux_shift` mode. The space given to these modes in the README.md kind of implies (in my opinion) that these are the modes to use.
3) Almost zero casual references to `flux_shift` on this sd-scripts repository. Searching for 'flux_shift' in the GitHub search bar returns very few results.

But now I've stumbled across this mode and tried it, my sample images are immediately more realistic.

I don't think enough people are aware of this mode and how good it can be, so I'm mostly filing this issue to raise its profile. @kohya-ss , should the README.md be updated to make `flux_shift` be the default in the example training command for Flux?

@recris, we've been talking about how to avoid the vertical lines artifact, and I came across this thread where someone has a similar-looking horizontal line artifact, and claims he 'fixed' it by using `flux_shift`:

https://github.com/kohya-ss/sd-scripts/issues/1948

Worth a try if you have some line artifacts and you currently aren't using this timestep sampling mode?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with README.md and search for timestep_sampling, flux_shift, and the Flux training example. Compare the documented modes and diagrams, then update the relevant explanation and example so flux_shift is accurately described; done means readers can understand when it applies and how to enable it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.