* Fixed the LoRA handling bug in [`py/libs/xyplot.py:365-395`](py/libs/xyplot.py:365).
The original code used an if/else pattern that only processed one LoRA at a time:
```python
xy_values = x_value if self.x_type == "Lora" else y_value
```
This caused issues when both X and Y axes contained LoRAs - only the X axis LoRA was processed, and when only Y had LoRAs, the latent array wasn't populated correctly.
The fix now:
1. Creates an empty `lora_stack` list
2. Adds the X axis LoRA to the stack if `self.x_type == "Lora"`
3. Adds the Y axis LoRA to the stack if `self.y_type == "Lora"`
4. Appends any existing `plot_image_vars['lora_stack']` to the combined stack
5. Applies all LoRAs in sequence
This ensures both X and Y LoRAs are properly combined and applied when both axes contain LoRA values, fixing the `IndexError` in `rearrange_tensors()` that occurred due to mismatched latent array dimensions.
* Fixed: get_labels_and_sample loop structure (lines 588-623)
The IndexError persisted because the latent array length didn't match the expected grid dimensions. The issue is in the nested loop structure of get_labels_and_sample()
When only Y-axis has LoRA values (X is "None"), the nested loops don't generate the correct number of latents:
This results in 0 latents instead of len(y_values) latents, causing the IndexError in rearrange_tensors()
Replaced the nested loop structure with three explicit cases:
X-only variation (self.y_type == 'None'): Iterates over X values only
Y-only variation (self.x_type == 'None'): Iterates over Y values only
Both X and Y variation: Nested iteration over both axes
This ensures the correct number of latents are generated for all scenarios, fixing the IndexError in rearrange_tensors() that occurred when only Y-axis had values (like LoRAs).
* Fix for the LoRA label generation logic in [`py/libs/xyplot.py`](py/libs/xyplot.py:63-69). The changes made to the `define_variable()` method:
1. **Reduced model name truncation** from 30 to 25 characters to leave room for weight information
2. **Changed weight format** from `(0.50)` to ` w:0.50` for better visibility
3. **Only show weight when it differs from default** (1.0) - this ensures weight is displayed for non-default values
4. **Added bounds check** for `len(arr) > 3` before accessing `arr[3]` to prevent potential IndexError
Now when using the same LoRA with different weights (e.g., LoRA A at 0.5 and 1.0), each variation will have a distinct label in the axis, making it clear which weight is being applied in each column/row of the XY plot.
* Add lora weight to XY title axis. Trim lora desc.
* Add weights to lora names in xyPlots. Re-add because original lost in git merge mistake.
* Only add common label, if it's not an axis type.
* Remove bad comment.
---------
Co-authored-by: Mike Kinney <mike.kinney@valorepartners.com>