-
Notifications
You must be signed in to change notification settings - Fork 0
07. Layer Adjustments
Warning
This feature is experimental and not fully implemented.
As noted in the project's README.md, the layer_adjust optimization mode is a planned feature. While the configuration options are described here for informational purposes, they are not guaranteed to be functional.
The layer_adjustments component in optimization_guide.yaml allows for fine-tuning specific layers, primarily affecting color, contrast, and detail. These parameters are typically applied after a model is loaded, modifying its weights directly before generation.
When optimization_mode: layer_adjust is selected in config.yaml, the optimizer will tune these parameters based on the image scores.
These parameters correspond to those used in tools like SuperMerger.
-
Detail Adjustments: Applied multiplicatively to specific input/output blocks.
-
detail1: (IN Blocks - Detail/Noise) Affects early processing stages. Positive values decrease initial detail; negative values increase it. Recommended range:[-6, 6]. -
detail2: (OUT Blocks - Detail/Noise) Affects the final output layers. Positive values decrease output detail; negative values increase it. Recommended range:[-6, 6].
-
-
Combined Adjustments: Applied additively to the
model.diffusion_model.out.2layer weights/biases.-
detail3: (OUT2 Blocks - Detail/Noise) Further detail adjustment at a late stage. Recommended range:[-6, 6]. -
contrast: Influences overall contrast and detail. Recommended range:[-10, 10]. -
brightness: Affects overall brightness (Negative=Darker, Positive=Brighter). Recommended range:[-10, 10]. -
col1: Color balance (Negative=Cyan-ish, Positive=Red-ish). Recommended range:[-10, 10]. -
col2: Color balance (Negative=Magenta-ish, Positive=Green-ish). Recommended range:[-10, 10]. -
col3: Color balance (Negative=Yellow-ish, Positive=Blue-ish). Recommended range:[-10, 10].
-
components:
- name: layer_adjustments
strategy: all # Optimize all defined parameters individually
# Or use 'select'/'group' if you only want to optimize specific ones
# strategy: select
# keys: [detail1, contrast, brightness]You can set custom bounds for these parameters using the custom_bounds section in optimization_guide.yaml, targeting the parameter names (e.g., detail1: [-3, 3]).