Merge Selector:
The LoRAMergeSelector is a specialized node designed to apply a specific merge configuration derived from the results of an AutoTuner process. Its primary function is to enable users to select and apply a ranked configuration from a set of AutoTuner results, allowing for precise control over the merging of LoRA (Low-Rank Adaptation) models. This node is particularly beneficial for users who wish to fine-tune the integration of multiple LoRA models by selecting the most suitable configuration based on predefined criteria. By connecting the TUNER_DATA from a LoRA AutoTuner node and setting the selection index, users can effortlessly apply the desired configuration, ensuring optimal performance and compatibility of the merged models. The LoRAMergeSelector thus serves as a crucial tool for AI artists and developers looking to enhance their model's capabilities through strategic merging of LoRA configurations.
Merge Selector Input Parameters:
architecture_preset
The architecture_preset parameter determines the architectural configuration to be used during the merge process. It can be set to "auto" for automatic detection or specified manually to match the architecture of the models being merged. This parameter ensures that the merge process is compatible with the underlying model architecture, thereby optimizing performance and accuracy. The default value is "auto".
auto_strength_floor
The auto_strength_floor parameter sets a minimum threshold for the strength of the LoRA models being merged. This ensures that only models with a strength above this threshold are considered, preventing weak models from affecting the overall merge quality. The default value is -1.0, which effectively disables this threshold.
evaluator
The evaluator parameter allows for the integration of an external evaluation function to assess the quality of the merge. This function can return a score or detailed analysis, guiding the selection of the best merge configuration. If not provided, the default evaluation process is used.
record_dataset
The record_dataset parameter controls whether the dataset used during the merge process is recorded. This can be useful for auditing and analysis purposes. The default setting is "disabled".
cache_patches
The cache_patches parameter determines whether intermediate patches are cached during the merge process. Enabling this can improve performance by reducing redundant computations. The default setting is "enabled".
diff_cache_mode
The diff_cache_mode parameter specifies the caching strategy for differences computed during the merge. It can be set to "enabled" or "disabled", with the default being "disabled".
diff_cache_ram_pct
The diff_cache_ram_pct parameter sets the percentage of RAM allocated for caching differences during the merge process. This helps manage memory usage, especially when dealing with large models. The default value is 0.5.
vram_budget
The vram_budget parameter specifies the amount of VRAM allocated for the merge process. This helps in managing GPU resources effectively, ensuring that the merge process does not exceed available VRAM. The default value is 0.0, indicating no specific budget.
scoring_speed
The scoring_speed parameter determines the speed at which the scoring process is conducted. It can be set to "full" for comprehensive scoring or adjusted for faster, less detailed evaluations. The default setting is "full".
scoring_formula
The scoring_formula parameter specifies the formula used to calculate the score during the evaluation process. This influences the selection of the best merge configuration. The default formula is "v2".
output_mode
The output_mode parameter defines the format of the output generated by the merge process. It can be set to "merge" to produce a merged model or adjusted for other output types. The default setting is "merge".
decision_smoothing
The decision_smoothing parameter applies smoothing to the decision-making process during the merge, helping to stabilize the selection of configurations. The default value is 0.25.
smooth_slerp_gate
The smooth_slerp_gate parameter determines whether smooth spherical linear interpolation (slerp) is applied during the merge. This can enhance the blending of models. The default setting is False.
memory_mode
The memory_mode parameter controls the memory management strategy during the merge process. It can be set to "enabled" or "disabled", with the default being "disabled".
selection
The selection parameter specifies the index of the configuration to be applied from the AutoTuner results. This allows users to choose the most suitable configuration based on their requirements. The default value is 1.
Merge Selector Output Parameters:
merged_model
The merged_model output parameter provides the resulting model after the merge process. This model incorporates the selected LoRA configurations, offering enhanced capabilities and performance.
analysis_report
The analysis_report output parameter delivers a detailed report of the merge process, including the configurations applied and the rationale behind their selection. This report aids users in understanding the merge outcomes and the effectiveness of the chosen configurations.
Merge Selector Usage Tips:
- To achieve optimal results, ensure that the
architecture_presetmatches the architecture of the models being merged, or set it to "auto" for automatic detection. - Utilize the
selectionparameter to experiment with different configurations from the AutoTuner results, allowing you to find the best fit for your specific needs.
Merge Selector Common Errors and Solutions:
"No LoRAs in stack."
- Explanation: This error occurs when there are no LoRA models available in the stack for merging.
- Solution: Ensure that the LoRA stack is populated with valid models before initiating the merge process.
"External evaluator failed."
- Explanation: This error indicates that the external evaluation function encountered an issue during execution.
- Solution: Verify the configuration of the evaluator, ensuring that the module path and callable name are correctly specified and accessible.
"Invalid score returned by evaluator."
- Explanation: This error arises when the evaluator returns a score that is not a valid float.
- Solution: Check the evaluator's implementation to ensure it returns a valid float score, and handle any exceptions that may occur during evaluation.
