You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: Remove self-inflicted nullable guarding on IRocmPackageHelper
- Change IRocmPackageHelper parameter from nullable with default null to
non-nullable in ComfyUI, InvokeAI, and Reforge constructors
- Remove null-throw guard blocks in ComfyUI.InstallPackage,
InvokeAI.InstallPackage, and Reforge.InstallPackage — PackageFactory
always injects a non-null instance, making these unreachable
- Remove dead null-return guards in ComfyUI.EmitWindowsRocmLaunchNotice
and ComfyUI.GetEnvVars
- Collapse InvokeAI null-throw pattern (?? throw) on torch install call
to a direct rocmPackageHelper method call
- Remove nullHelperMessage parameter and ?? throw expression from ComfyUI.RunWindowsRocmPackageCommandAsync and all four call sites
- Update BaseGitPackage.HasWindowsRocmSupport and GetWindowsRocmCompatibility signatures to non-nullable; remove dead
null branch from the compatibility check condition
- Remove null guards, ?? new Dictionary<>(), and ?? [] fallbacks from InvokeAiWindowsRocmProfile and ReforgeWindowsRocmProfile static methods
- Add IRocmPackageHelper parameter to ComfyZluda and forward to ComfyUI base constructor to satisfy the now-required parameter; ZLUDA does not use it
// This is an internal guard for a wiring/configuration failure.
426
-
// It can only trigger when Windows ROCm support was detected, but this ComfyUI instance was created
427
-
// without the shared ROCm helper (for example via a manual construction path that omitted the dependency).
428
-
if(rocmPackageHelperisnull)
429
-
{
430
-
thrownewInvalidOperationException(
431
-
"Windows ROCm installation encountered an internal configuration error [rocmPackageHelper is null]. Please restart Stability Matrix and try again. If the issue persists, please report it to Stability Matrix."
Copy file name to clipboardExpand all lines: StabilityMatrix.Core/Models/Packages/InvokeAI.cs
+2-7Lines changed: 2 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ public class InvokeAI(
29
29
IPrerequisiteHelperprerequisiteHelper,
30
30
IPyInstallationManagerpyInstallationManager,
31
31
IPipWheelServicepipWheelService,
32
-
IRocmPackageHelper?rocmPackageHelper=null
32
+
IRocmPackageHelperrocmPackageHelper
33
33
)
34
34
:BaseGitPackage(
35
35
githubApi,
@@ -296,12 +296,7 @@ public override async Task InstallPackage(
296
296
newProgressReport(-1f,"Installing Windows ROCm torch...",isIndeterminate:true)
297
297
);
298
298
299
-
await(
300
-
rocmPackageHelper
301
-
??thrownewInvalidOperationException(
302
-
"Windows ROCm installation encountered an internal configuration error [rocmPackageHelper is null]. Please restart Stability Matrix and try again. If the issue persists, please report it to Stability Matrix."
Copy file name to clipboardExpand all lines: StabilityMatrix.Core/Models/Packages/Reforge.cs
+1-8Lines changed: 1 addition & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ public class Reforge(
20
20
IPrerequisiteHelperprerequisiteHelper,
21
21
IPyInstallationManagerpyInstallationManager,
22
22
IPipWheelServicepipWheelService,
23
-
IRocmPackageHelper?rocmPackageHelper=null
23
+
IRocmPackageHelperrocmPackageHelper
24
24
)
25
25
:SDWebForge(
26
26
githubApi,
@@ -124,13 +124,6 @@ await base.InstallPackage(
124
124
)
125
125
.ConfigureAwait(false);
126
126
127
-
if(rocmPackageHelperisnull)
128
-
{
129
-
thrownewInvalidOperationException(
130
-
"Windows ROCm installation encountered an internal configuration error [rocmPackageHelper is null]. Please restart Stability Matrix and try again. If the issue persists, please report it to Stability Matrix."
0 commit comments