diff --git a/nodes.py b/nodes.py index 9eb1d64..ece8d3e 100644 --- a/nodes.py +++ b/nodes.py @@ -1860,7 +1860,9 @@ class WanVideoScheduler: #WIP if start_idx > 0 and 0 <= start_idx < len(sigmas_np): ax.axvline(start_idx, color='green', linestyle='--', linewidth=2, label='start_step split') if (end_idx != -1 and 0 <= end_idx < len(sigmas_np)) or (start_idx > 0 and 0 <= start_idx < len(sigmas_np)): - ax.legend() + handles, labels = ax.get_legend_handles_labels() + if labels: + ax.legend() if start_idx < end_idx and 0 <= start_idx < len(sigmas_np) and 0 < end_idx < len(sigmas_np): ax.axvspan(start_idx, end_idx, color='lightblue', alpha=0.1, label='Sampled Range') plt.tight_layout()