26 Commits
Author SHA1 Message Date
御坂桜 450b1ce4ce Add Anima and Krea2 diffusion model support (#1033) 2026-09-07 12:51:49 +08:00
Z-nonymous 8ba21d0b44 XY plot issue with XY Inputs Lora (#976)
* 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.
2026-03-31 15:11:24 +08:00
Mr-Quin 58e9d594cd add controlnet input to xyplot (#877) 2025-10-02 15:31:15 +08:00
Mike KinneyandMike Kinney 1d8db7510b Update XY Plot Labels (#792)
* 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>
2025-06-01 13:15:55 +08:00
Mike Kinney 7fbd03bda7 Merge branch 'main' into bugfix-xyplot-optional-lora 2025-05-14 07:20:08 -07:00
Mike Kinney 9cc2ac02da Use previously generated model/clip for next loaded lora 2025-05-14 06:27:36 -07:00
Mike Kinney 5d8f0a3b0a Update clip and model when adding loras 2025-05-13 16:49:49 -07:00
Mike Kinney ce62fc73da Add core XYPlot Footer 2025-05-13 06:35:45 -07:00
yolain 39fa6ef37a Changes in document structure 2025-01-26 18:12:06 +08:00
yolain 3a8fcbbcb9 Fix lora not used in xyplot simple when plotting positive prompt #613 2025-01-14 12:47:02 +08:00
yolain 2461869aae Fix xyplot checkpoint bug #565 2024-12-04 16:38:35 +08:00
yolain e4b331cd93 Fix a1111_prompt_style not working and use your current device when generating noise #505 2024-11-04 11:10:19 +08:00
yolain 5c278e8d56 Add easy XYInputs: FluxGuidance 2024-10-11 13:37:21 +08:00
yolain 944051f210 Add display trigger word on easy XYInputs: Lora #424 2024-10-11 12:18:30 +08:00
yolain e754b97b99 Fix easyKSampler and xyplot can not use flux model 2024-10-10 20:50:28 +08:00
yolain 8a272004dd Fix basic xyplot lora load error #257 2024-07-16 17:35:53 +08:00
yolain 2c97cf1bff Fix bug with sampler&schduler for xy inputs #240 2024-07-05 18:07:41 +08:00
yolain 1171a299b3 Fix checkpoints and loras do not work together in xyplot ADV #227 2024-06-28 18:26:07 +08:00
yolain ed7d5846f7 adding some creadit in the code 2024-06-05 14:19:07 +08:00
yolain d95772147f 💖Upgrade to v1.1.8 2024-05-25 11:47:51 +08:00
yolain 84307b95aa fix:lora not use different checkpoint model when optional_lora_stack in xyplot #113 2024-04-02 13:22:54 +08:00
yolain c0ca3c7e95 fix:layerDiffuse xyplot bug 2024-03-25 01:34:20 +08:00
yolain 500eb6d358 fix:layerDiffuse in xyplot error 2024-03-08 20:22:54 +08:00
BigUncleHomePC 72c3761d09 Fix AttributeError of 'easyXYPlot' object 2024-03-05 00:39:54 +08:00
yolain f9d01ff53b Upgrade to v1.0.9 2024-03-02 17:48:02 +08:00
yolain e31e8ecb62 fix:the search box of easy styleSelector is modified to be case-insensitive 2024-02-25 17:49:03 +08:00