Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3d76f0e
Merge pull request #1504 from LykosAI/main
mohnjiles Dec 29, 2025
22c0aa0
Fix updating appimage on Linux via self-created bash script
NeuralFault Dec 31, 2025
4c4a10f
Enhance Linux AppImage update process with error handling and user fe…
NeuralFault Dec 31, 2025
84f5085
Refactor AppImage update script execution to improve environment vari…
NeuralFault Dec 31, 2025
33cea37
Merge pull request #1506 from NeuralFault/linux-update-fix
mohnjiles Jan 3, 2026
c421649
Add default launch options for ZLUDA stability and update default cro…
NeuralFault Jan 9, 2026
1c447e3
Refactor ComfyZluda class to streamline launch options and improve st…
NeuralFault Jan 16, 2026
69858c3
Restored directives that got removed accidentally during build debugg…
NeuralFault Jan 16, 2026
f8a8dab
Merge branch 'LykosAI:main' into CUI-Zluda-launch-fix
NeuralFault Jan 16, 2026
52acb7d
Refactored launch option logic and positioning.
NeuralFault Jan 16, 2026
37f2895
Merge branch 'CUI-Zluda-launch-fix' of https://github.com/NeuralFault…
NeuralFault Jan 16, 2026
0e3c7a3
Remove duplicate using directives in ComfyZluda.cs
NeuralFault Jan 16, 2026
a6e052d
Restored using directive for StabilityMatrix.Core.Extensions
NeuralFault Jan 16, 2026
1bcbc0e
Update PreviewImageUri to use new CDN link for AiToolkit
NeuralFault Jan 16, 2026
3a1e9b4
Merge branch 'CUI-Zluda-launch-fix' of https://github.com/NeuralFault…
NeuralFault Jan 16, 2026
895b247
Merge pull request #1521 from NeuralFault/CUI-Zluda-launch-fix
mohnjiles Jan 16, 2026
965ad7a
Corrected gfx110X Windows ROCm nightly index. Added Win-ROCm EnVars
NeuralFault Jan 19, 2026
4516c34
Merge pull request #1524 from NeuralFault/ComfyUI-WinROCm-update
mohnjiles Jan 19, 2026
fa2c569
Add TiledVAEDecode backend integration (ComfyNodeBuilder + ComfyClient)
Domica Jan 19, 2026
e7c56f4
Add TiledVAEDecode backend integration (ComfyNodeBuilder + ComfyClient)
Domica Jan 17, 2026
0161e3e
Add WAN workflow integration for TiledVAE
Domica Jan 17, 2026
c5482d4
Cleanup: remove unused files, debug code, and workflow noise
Domica Jan 17, 2026
1cbb0ba
Format ComfyNodeBuilder with csharpier
Domica Jan 20, 2026
baa0c37
Fix: unify temporal tiling toggle and align UI with backend
Domica Jan 20, 2026
47642bd
chore: update TiledVAE settings and adjust logging level
Domica Jan 20, 2026
a567d99
Apply suggestion from @ionite34
Domica Jan 20, 2026
2600b4e
chore: remove leftover WAN workflow json (unused and out of scope)
Domica Jan 20, 2026
ce0861c
fix: sync WAN viewmodel and ComfyClient after cleanup
Domica Jan 20, 2026
4bd67c9
Update TiledVAEModule.cs
Domica Jan 21, 2026
989db8f
Update InferenceWanTextToVideoViewModel.cs
Domica Jan 21, 2026
ec8f8b5
Update TiledVAEModule.cs
Domica Jan 21, 2026
e25a344
Create buildexe.yml
Domica Jan 21, 2026
4d0de2d
Update TiledVAEModule.cs
Domica Jan 21, 2026
53465f8
Update InferenceSettingsViewModel.cs
Domica Jan 21, 2026
b9fbcf1
Update Settings.cs
Domica Jan 21, 2026
94d7299
Update TiledVAECard.axaml
Domica Jan 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/buildexe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build Stability Matrix (Windows)

on:
push:
branches: [ "clean-main" ]
pull_request:
branches: [ "clean-main" ]
workflow_dispatch:

jobs:
build-windows:
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup .NET SDK 9.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

- name: Restore Avalonia project
run: dotnet restore StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj

- name: Restore Tests project
run: dotnet restore StabilityMatrix.Tests/StabilityMatrix.Tests.csproj

- name: Build Avalonia project
run: dotnet build StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj -c Release --no-restore --no-cache

- name: Build Tests project
run: dotnet build StabilityMatrix.Tests/StabilityMatrix.Tests.csproj -c Release --no-restore

- name: Run Tests
run: dotnet test StabilityMatrix.Tests/StabilityMatrix.Tests.csproj -c Release --no-build

- name: Publish Avalonia app (win10-x64)
run: dotnet publish StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ./publish/win10-x64

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: StabilityMatrix-win10-x64
path: ./publish/win10-x64/*
compression-level: 6
retention-days: 14
59 changes: 40 additions & 19 deletions StabilityMatrix.Avalonia/Controls/Inference/TiledVAECard.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:vmInference="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Inference"
x:DataType="vmInference:TiledVAECardViewModel">

<Design.PreviewWith>
<controls:TiledVAECard />
</Design.PreviewWith>

<Style Selector="controls|TiledVAECard">
<!-- Set Defaults -->
<Setter Property="Template">
<ControlTemplate>
<controls:Card x:Name="PART_Card">

<controls:Card.Styles>
<Style Selector="ui|NumberBox">
<Setter Property="Margin" Value="12,0,0,0" />
Expand All @@ -25,8 +26,10 @@
<Setter Property="SpinButtonPlacementMode" Value="Inline" />
</Style>
</controls:Card.Styles>

<StackPanel Spacing="8">
<!-- Tile Size -->

<!-- Tile Size -->
<Grid ColumnDefinitions="Auto,*">
<TextBlock
Grid.Column="0"
Expand All @@ -37,7 +40,7 @@
Value="{Binding TileSize, Mode=TwoWay}" />
</Grid>

<!-- Overlap -->
<!-- Overlap -->
<Grid ColumnDefinitions="Auto,*">
<TextBlock
Grid.Column="0"
Expand All @@ -48,29 +51,47 @@
Value="{Binding Overlap, Mode=TwoWay}" />
</Grid>

<!-- Temporal Size (for Video VAEs) -->
<!-- Enable Temporal Tiling -->
<Grid ColumnDefinitions="Auto,*">
<TextBlock
Grid.Column="0"
VerticalAlignment="Center"
Text="Temporal Size" />
<ui:NumberBox
Text="Enable Temporal Tiling" />
<ToggleSwitch
Grid.Column="1"
Value="{Binding TemporalSize, Mode=TwoWay}" />
IsChecked="{Binding UseCustomTemporalTiling}" />
</Grid>

<!-- Temporal Overlap (for Video VAEs) -->
<Grid ColumnDefinitions="Auto,*">
<TextBlock
Grid.Column="0"
VerticalAlignment="Center"
Text="Temporal Overlap" />
<ui:NumberBox
Grid.Column="1"
Value="{Binding TemporalOverlap, Mode=TwoWay}"
SmallChange="4"
LargeChange="16" />
</Grid>

<!-- Temporal Controls (Visible only when enabled) -->
<StackPanel IsVisible="{Binding UseCustomTemporalTiling}" Spacing="8">

<!-- Temporal Size -->
<Grid ColumnDefinitions="Auto,*">
<TextBlock
Grid.Column="0"
VerticalAlignment="Center"
Text="Temporal Size" />
<ui:NumberBox
Grid.Column="1"
Value="{Binding TemporalSize, Mode=TwoWay}" />
</Grid>

<!-- Temporal Overlap -->
<Grid ColumnDefinitions="Auto,*">
<TextBlock
Grid.Column="0"
VerticalAlignment="Center"
Text="Temporal Overlap" />
<ui:NumberBox
Grid.Column="1"
Value="{Binding TemporalOverlap, Mode=TwoWay}"
SmallChange="4"
LargeChange="16" />
</Grid>

</StackPanel>

</StackPanel>
</controls:Card>
</ControlTemplate>
Expand Down
62 changes: 62 additions & 0 deletions StabilityMatrix.Avalonia/ViewModels/Dialogs/UpdateViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,68 @@ await updateHelper.DownloadUpdate(
);
}

// Handle Linux AppImage update
if (Compat.IsLinux && Environment.GetEnvironmentVariable("APPIMAGE") is { } appImage)
{
try
{
var updateScriptPath = UpdateHelper.UpdateFolder.JoinFile("update_script.sh").FullPath;
var newAppImage = UpdateHelper.ExecutablePath.FullPath;

var scriptContent = """
#!/bin/bash
set -e

# Wait for the process to exit
while kill -0 "$PID" 2>/dev/null; do
sleep 0.5
done

# Move the new AppImage over the old one
mv -f "$NEW_APPIMAGE" "$OLD_APPIMAGE"
chmod +x "$OLD_APPIMAGE"

# Launch the new AppImage detached
"$OLD_APPIMAGE" > /dev/null 2>&1 &
disown
""";
await File.WriteAllTextAsync(updateScriptPath, scriptContent);

File.SetUnixFileMode(
updateScriptPath,
UnixFileMode.UserRead | UnixFileMode.UserWrite | UnixFileMode.UserExecute
);

var startInfo = new System.Diagnostics.ProcessStartInfo
{
FileName = "/usr/bin/env",
Arguments = $"bash \"{updateScriptPath}\"",
UseShellExecute = false,
CreateNoWindow = true,
};

startInfo.EnvironmentVariables["PID"] = Environment.ProcessId.ToString();
startInfo.EnvironmentVariables["NEW_APPIMAGE"] = newAppImage;
startInfo.EnvironmentVariables["OLD_APPIMAGE"] = appImage;

System.Diagnostics.Process.Start(startInfo);

App.Shutdown();
return;
}
catch (Exception ex)
{
logger.LogError(ex, "Failed to execute AppImage update script");

var dialog = DialogHelper.CreateMarkdownDialog(
"AppImage update script failed. \nCould not replace old AppImage with new version. Please check directory permissions. \nFalling back to standard update process. User intervention required: \nAfter program closes, \nplease move the new AppImage extracted in the '.StabilityMatrixUpdate' hidden directory to the old AppImage overwriting it. \n\nClose this dialog to continue with standard update process.",
Resources.Label_UnexpectedErrorOccurred
);

await dialog.ShowAsync();
}
}

// Set current version for update messages
settingsManager.Transaction(
s => s.UpdatingFromVersion = Compat.AppVersion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ RunningPackageService runningPackageService

BatchSizeCardViewModel = vmFactory.Get<BatchSizeCardViewModel>();

VideoOutputSettingsCardViewModel = vmFactory.Get<VideoOutputSettingsCardViewModel>(
vm => vm.Fps = 16.0d
VideoOutputSettingsCardViewModel = vmFactory.Get<VideoOutputSettingsCardViewModel>(vm =>
vm.Fps = 16.0d
);

StackCardViewModel = vmFactory.Get<StackCardViewModel>();
Expand All @@ -94,7 +94,7 @@ protected override void BuildPrompt(BuildPromptEventArgs args)
builder.Connections.Seed = args.SeedOverride switch
{
{ } seed => Convert.ToUInt64(seed),
_ => Convert.ToUInt64(SeedCardViewModel.Seed)
_ => Convert.ToUInt64(SeedCardViewModel.Seed),
};

// Load models
Expand All @@ -115,7 +115,6 @@ protected override void BuildPrompt(BuildPromptEventArgs args)

SamplerCardViewModel.ApplyStep(args);

// Animated webp output
VideoOutputSettingsCardViewModel.ApplyStep(args);
}

Expand Down Expand Up @@ -165,13 +164,13 @@ CancellationToken cancellationToken
OutputNodeNames = buildPromptArgs.Builder.Connections.OutputNodeNames.ToArray(),
Parameters = SaveStateToParameters(new GenerationParameters()) with
{
Seed = Convert.ToUInt64(seed)
Seed = Convert.ToUInt64(seed),
},
Project = inferenceProject,
FilesToTransfer = buildPromptArgs.FilesToTransfer,
BatchIndex = i,
// Only clear output images on the first batch
ClearOutputImages = i == 0
ClearOutputImages = i == 0,
};

batchArgs.Add(generationArgs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
using StabilityMatrix.Avalonia.ViewModels.Base;
using StabilityMatrix.Core.Attributes;
using StabilityMatrix.Core.Models.Api.Comfy.Nodes;
using NLog;

namespace StabilityMatrix.Avalonia.ViewModels.Inference.Modules;

[ManagedService]
[RegisterTransient<TiledVAEModule>]
public class TiledVAEModule : ModuleBase
{
private static readonly Logger logger = LogManager.GetCurrentClassLogger();

public TiledVAEModule(IServiceManager<ViewModelBase> vmFactory)
: base(vmFactory)
{
Expand All @@ -22,7 +25,6 @@ protected override void OnApplyStep(ModuleApplyStepEventArgs e)
{
var card = GetCard<TiledVAECardViewModel>();

// Register a pre-output action that replaces standard VAE decode with tiled decode
e.PreOutputActions.Add(args =>
{
var builder = args.Builder;
Expand All @@ -34,22 +36,26 @@ protected override void OnApplyStep(ModuleApplyStepEventArgs e)
var latent = builder.Connections.Primary.AsT0;
var vae = builder.Connections.GetDefaultVAE();

// Use tiled VAE decode instead of standard decode
var tiledDecode = builder.Nodes.AddTypedNode(
logger.Debug("TiledVAE: Injecting TiledVAEDecode");
logger.Debug("UseCustomTemporalTiling value at runtime: {value}", card.UseCustomTemporalTiling);

var node = builder.Nodes.AddTypedNode(
new ComfyNodeBuilder.TiledVAEDecode
{
Name = builder.Nodes.GetUniqueName("TiledVAEDecode"),
Samples = latent,
Vae = vae,
TileSize = card.TileSize,
Overlap = card.Overlap,
TemporalSize = card.TemporalSize,
TemporalOverlap = card.TemporalOverlap

// Temporal tiling (WAN requires temporal tiling)
TemporalSize = card.UseCustomTemporalTiling ? card.TemporalSize : 64,
TemporalOverlap = card.UseCustomTemporalTiling ? card.TemporalOverlap : 8,
}
);

// Update primary connection to the decoded image
builder.Connections.Primary = tiledDecode.Output;
builder.Connections.Primary = node.Output;
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,32 @@ public partial class TiledVAECardViewModel : LoadableViewModelBase
{
public const string ModuleKey = "TiledVAE";

// Spatial tile size (valid for Wan)
[ObservableProperty]
[NotifyDataErrorInfo]
[Required]
[Range(64, 4096)]
private int tileSize = 512;

// Spatial overlap
[ObservableProperty]
[NotifyDataErrorInfo]
[Required]
[Range(0, 4096)]
private int overlap = 64;

// Toggle: Use custom temporal tiling settings
[ObservableProperty]
private bool useCustomTemporalTiling = false;

// Temporal tile size (must be >= 8)
[ObservableProperty]
[NotifyDataErrorInfo]
[Required]
[Range(8, 4096)]
private int temporalSize = 64;

// Temporal overlap (must be >= 4)
[ObservableProperty]
[NotifyDataErrorInfo]
[Required]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ ISettingsManager settingsManager
settings => settings.InferenceDimensionStepChange,
true
);

FavoriteDimensions
.ToObservableChangeSet()
.Throttle(TimeSpan.FromMilliseconds(50))
Expand Down
Loading