kohya-ss / kohya-ss/sd-scripts
Correct FLUX layer specification for down_lr_weight, mid_lr_weight, up_lr_weight network args?
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.2k
- Avg merge
- 11m
- Merged PRs (30d)
- 2
Description
FLUX's layer structure is huge and confusing. I'd like to be able to isolate which layers I'm training (which on SDXL allows me to train style-only LoRAs more quickly that are smaller and experience far less content bleed). But it's not clear to me how these arguments are supposed to work with Flux layers. When I use the block weights node in comfy, the full FLUX block specification looks something like this:
```
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0
```
I know some of these are double layers and some are single layers. Are some of them considered UP, MID, and DOWN? How many of each are there? Or is it correct to specify all layers for both up and down, like this:
```
... --network_args "down_lr_weight=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0 up_lr_weight=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0"
```
Contributor guide
No contributing guide indexed for this repository
Research direction
No file, test, or entry point is named. Start by tracing how down_lr_weight, mid_lr_weight, and up_lr_weight are parsed and mapped for FLUX layers, then compare that mapping with the block-weight specification shown here. Done means the layer groups and argument usage are unambiguous and covered by an appropriate regression test.
Written by the indexing model from the issue text.
Assessment
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100