Skip to content

Commit 963aa0e

Browse files
committed
Merge pull request LykosAI#911 from ionite34/fix-face-detailer-extension-install
Handle pip installs in manifests & add subpack as required for FaceDetailer stuff (cherry picked from commit 9dc2657) # Conflicts: # CHANGELOG.md
1 parent 5f6d792 commit 963aa0e

File tree

5 files changed

+126
-17
lines changed

5 files changed

+126
-17
lines changed

CHANGELOG.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,87 @@ All notable changes to Stability Matrix will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html).
77

8+
<<<<<<< HEAD
9+
=======
10+
## v2.13.0-pre.1
11+
### Added
12+
- Added new package - [CogVideo](https://github.com/THUDM/CogVideo) - many thanks to @NullDev for the contribution!
13+
- Added file sizes to the Checkpoint Manager tab
14+
- Added more formatting options for Inference output filenames - thanks to @yansigit!
15+
Added the Discrete Model Sampling addon for Inference samplers, allows selecting different sampling methods, such as v_prediction, lcm, or x0, and optionally adjusts the model’s noise reduction strategy with the zero-shot noise ratio (ZSNR) toggle.
16+
### Changed
17+
- Improved Packages Page grid layout to dynamically stretch to fill available space
18+
### Fixed
19+
- Fixed a typo in the Japanese translation - thanks to @mattyatea!
20+
- Fixed missing package thumbnails due to moved or inaccessible urls
21+
- Fixed an issue with ComfyUI-Impact-Subpack not being installed when using FaceDetailer in Inference
22+
### Supporters
23+
#### Visionaries
24+
- Huge thank you to our incredible Visionary-tier Patreon supporter, **Waterclouds**! Your unwavering support is very much appreciated!
25+
26+
## v2.13.0-dev.3
27+
### Added
28+
- Added support for SD3.5 in Inference
29+
- Added CLIP_G to HuggingFace model browser
30+
- Added search bar to the Installed Workflows tab
31+
- Added "Search with Google" and "Search with ChatGPT" to the package console output & install progress console output context menus
32+
- Added "Date Created" and "Date Last Modified" sorting options to the Checkpoints tab
33+
### Changed
34+
- Text Encoder / CLIP selection in Inference is now enabled via the cogwheel ⚙️ button next to the model selector
35+
- Added more base model types to the CivitAI Model Browser & Checkpoint Manager
36+
- Model browser base model types are now loaded dynamically from CivitAI, reducing the need for updates to add new types
37+
- Updated Civitai model descriptions to properly render the interactive elements
38+
- Updated Russian translations thanks to @vanja-san
39+
- Updated Simplified Chinese translations thanks to @QL-boy
40+
- (Internal) Updated to Avalonia 11.2.0
41+
### Fixed
42+
- Fixed some instances of Civitai model browser not loading new results
43+
- Fixed "Unsupported Torch Version: Cuda" errors when installing a1111
44+
- Fixed crash when clicking "Remind me Later" on the update dialog
45+
- Fixed some cases of crashing when GitHub API rate limits are exceeded
46+
- Fixed Git missing from env vars when running SwarmUI
47+
### Supporters
48+
#### Visionaries
49+
- Big shoutout to our amazing Visionary-tier Patreon supporter, **Waterclouds**! We are very grateful for your continued support!
50+
51+
## v2.13.0-dev.2
52+
### Added
53+
- Added new package - [SimpleSDXL](https://github.com/metercai/SimpleSDXL) - many thanks to @NullDev for the contribution!
54+
- Added new package - [FluxGym](https://github.com/cocktailpeanut/fluxgym) - many thanks to @NullDev for the contribution!
55+
- Added a new "Extension Packs" section to the extension manager, allowing you to create packs for easier installation of multiple extensions at once
56+
- Added "Search by Creator" command to Civitai browser context menu
57+
- Added Beta scheduler to the scheduler selector in Inference
58+
- Added zipping of log files and "Show Log in Explorer" button on exceptions dialog for easier support
59+
- Added max concurrent downloads option & download queueing for most downloads
60+
### Changed
61+
- (Internal) Updated to Avalonia 11.1.4
62+
- Adjusted the Branch/Release toggle during package install flow to be a little more obvious
63+
- Updated the Dock library used for Inference - fixes some weirdness with resizing / rearranging panels
64+
### Fixed
65+
- Fixed ComfyUI NF4 extension not installing properly when prompted in Inference
66+
- Fixed [#932](https://github.com/LykosAI/StabilityMatrix/issues/932), [#935](https://github.com/LykosAI/StabilityMatrix/issues/935), [#939](https://github.com/LykosAI/StabilityMatrix/issues/939) - InvokeAI failing to update
67+
- Fixed repeated nested folders being created in `Models/StableDiffusion` when using Forge in Symlink mode in certain conditions. Existing folders will be repaired to their original structure on launch.
68+
- Fixed minimize button not working on macOS
69+
- Fixed InvokeAI model sharing spamming the console with "This may take awhile" in certain conditions
70+
- Fixed text alignment issues in the Downloads tab for certain long names / progress infos
71+
### Supporters
72+
#### Visionaries
73+
- A big thank you to our amazing Visionary-tier Patreon supporter, **Waterclouds**! Your continued support is invaluable!
74+
75+
## v2.13.0-dev.1
76+
### Added
77+
- Added the ability to change the Models directory separately from the rest of the Data directory. This can be set in `Settings > Select new Models Folder`
78+
- Added "Copy" menu to the Inference gallery context menu, allowing you to copy the image or the seed (other params coming soon™️)
79+
- Added InvokeAI model sharing option
80+
### Supporters
81+
#### Visionaries
82+
- A heartfelt thank you to our incredible Visionary-tier Patreon supporter, **Waterclouds**! Your ongoing support means a lot to us, and we’re grateful to have you with us on this journey!
83+
84+
## v2.12.5
85+
### Fixed
86+
- Fixed an issue with ComfyUI-Impact-Subpack not being installed when using FaceDetailer in Inference
87+
88+
>>>>>>> 9dc26575 (Merge pull request #911 from ionite34/fix-face-detailer-extension-install)
889
## v2.12.4
990
### Added
1091
- Added new package - [CogVideo](https://github.com/THUDM/CogVideo) - many thanks to @NullDev for the contribution!

StabilityMatrix.Core/Models/Api/Comfy/Nodes/ComfyNodeBuilder.cs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,11 @@ public record LayeredDiffusionDecodeRgba : ComfyTypedNodeBase<ImageNodeConnectio
551551

552552
[TypedNodeOptions(
553553
Name = "UltralyticsDetectorProvider",
554-
RequiredExtensions = ["https://github.com/ltdrdata/ComfyUI-Impact-Pack"]
554+
RequiredExtensions =
555+
[
556+
"https://github.com/ltdrdata/ComfyUI-Impact-Pack",
557+
"https://github.com/ltdrdata/ComfyUI-Impact-Subpack"
558+
]
555559
)]
556560
public record UltralyticsDetectorProvider
557561
: ComfyTypedNodeBase<BboxDetectorNodeConnection, SegmDetectorNodeConnection>
@@ -561,7 +565,11 @@ public record UltralyticsDetectorProvider
561565

562566
[TypedNodeOptions(
563567
Name = "SAMLoader",
564-
RequiredExtensions = ["https://github.com/ltdrdata/ComfyUI-Impact-Pack"]
568+
RequiredExtensions =
569+
[
570+
"https://github.com/ltdrdata/ComfyUI-Impact-Pack",
571+
"https://github.com/ltdrdata/ComfyUI-Impact-Subpack"
572+
]
565573
)]
566574
public record SamLoader : ComfyTypedNodeBase<SamModelNodeConnection>
567575
{
@@ -575,7 +583,11 @@ public record SamLoader : ComfyTypedNodeBase<SamModelNodeConnection>
575583

576584
[TypedNodeOptions(
577585
Name = "FaceDetailer",
578-
RequiredExtensions = ["https://github.com/ltdrdata/ComfyUI-Impact-Pack"]
586+
RequiredExtensions =
587+
[
588+
"https://github.com/ltdrdata/ComfyUI-Impact-Pack",
589+
"https://github.com/ltdrdata/ComfyUI-Impact-Subpack"
590+
]
579591
)]
580592
public record FaceDetailer : ComfyTypedNodeBase<ImageNodeConnection>
581593
{

StabilityMatrix.Core/Models/Packages/ComfyUI.cs

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -499,16 +499,6 @@ public override async Task<IEnumerable<PackageExtension>> GetManifestExtensionsA
499499
.DownloadService.GetContentAsync(manifest.Uri.ToString(), cancellationToken)
500500
.ConfigureAwait(false);
501501

502-
// nf4 hack
503-
var nf4Extension = new PackageExtension
504-
{
505-
Author = "comfyanonymous",
506-
Files = [new Uri("https://github.com/comfyanonymous/ComfyUI_bitsandbytes_NF4")],
507-
Reference = new Uri("https://github.com/comfyanonymous/ComfyUI_bitsandbytes_NF4"),
508-
Title = "ComfyUI_bitsandbytes_NF4",
509-
InstallType = "git-clone"
510-
};
511-
512502
// Parse json
513503
var jsonManifest = JsonSerializer.Deserialize<ComfyExtensionManifest>(
514504
content,
@@ -519,13 +509,12 @@ public override async Task<IEnumerable<PackageExtension>> GetManifestExtensionsA
519509
return [];
520510

521511
var extensions = jsonManifest.GetPackageExtensions().ToList();
522-
extensions.Add(nf4Extension);
523512
return extensions;
524513
}
525514
catch (Exception e)
526515
{
527516
Logger.Error(e, "Failed to get package extensions");
528-
return Enumerable.Empty<PackageExtension>();
517+
return [];
529518
}
530519
}
531520

@@ -551,7 +540,13 @@ await base.UpdateExtensionAsync(
551540

552541
var installedDirs = installedExtension.Paths.OfType<DirectoryPath>().Where(dir => dir.Exists);
553542

554-
await PostInstallAsync(installedPackage, installedDirs, progress, cancellationToken)
543+
await PostInstallAsync(
544+
installedPackage,
545+
installedDirs,
546+
installedExtension.Definition!,
547+
progress,
548+
cancellationToken
549+
)
555550
.ConfigureAwait(false);
556551
}
557552

@@ -583,7 +578,7 @@ await base.InstallExtensionAsync(
583578
.Select(path => cloneRoot.JoinDir(path!))
584579
.Where(dir => dir.Exists);
585580

586-
await PostInstallAsync(installedPackage, installedDirs, progress, cancellationToken)
581+
await PostInstallAsync(installedPackage, installedDirs, extension, progress, cancellationToken)
587582
.ConfigureAwait(false);
588583
}
589584

@@ -593,10 +588,26 @@ await PostInstallAsync(installedPackage, installedDirs, progress, cancellationTo
593588
private async Task PostInstallAsync(
594589
InstalledPackage installedPackage,
595590
IEnumerable<DirectoryPath> installedDirs,
591+
PackageExtension extension,
596592
IProgress<ProgressReport>? progress = null,
597593
CancellationToken cancellationToken = default
598594
)
599595
{
596+
// do pip installs
597+
if (extension.Pip != null)
598+
{
599+
await using var venvRunner = await package
600+
.SetupVenvPure(installedPackage.FullPath!)
601+
.ConfigureAwait(false);
602+
603+
var pipArgs = new PipInstallArgs();
604+
pipArgs = extension.Pip.Aggregate(pipArgs, (current, pip) => current.AddArg(pip));
605+
606+
await venvRunner
607+
.PipInstall(pipArgs, progress?.AsProcessOutputHandler())
608+
.ConfigureAwait(false);
609+
}
610+
600611
foreach (var installedDir in installedDirs)
601612
{
602613
cancellationToken.ThrowIfCancellationRequested();

StabilityMatrix.Core/Models/Packages/Extensions/ComfyExtensionManifest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public IEnumerable<PackageExtension> GetPackageExtensions()
1616
Title = x.Title,
1717
Reference = x.Reference,
1818
Files = x.Files,
19+
Pip = x.Pip,
1920
Description = x.Description,
2021
InstallType = x.InstallType
2122
}
@@ -32,6 +33,8 @@ public record ManifestEntry
3233

3334
public required IEnumerable<Uri> Files { get; init; }
3435

36+
public IEnumerable<string>? Pip { get; init; }
37+
3538
public string? Description { get; init; }
3639

3740
public string? InstallType { get; init; }

StabilityMatrix.Core/Models/Packages/Extensions/PackageExtension.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ public record PackageExtension
1010

1111
public required IEnumerable<Uri> Files { get; init; }
1212

13+
public IEnumerable<string>? Pip { get; init; }
14+
1315
public string? Description { get; init; }
1416

1517
public string? InstallType { get; init; }

0 commit comments

Comments
 (0)