Skip to content

Commit 09cc5ba

Browse files
authored
Merge pull request LykosAI#1043 from ionite34/fix-loras-and-recommended
Fix Extra Networks card duplicating Loras and updated RecommendedModels to use v2 endpoint
2 parents 446be68 + 07822f0 commit 09cc5ba

46 files changed

Lines changed: 367 additions & 257 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
1313
- Added Prompt Amplifier to Inference - click the magic wand 🪄 in the prompt editor to expand and enrich your ideas. Tailor the vibe with the ‘Feel’ selector and watch as your generations come to life with extra detail, coherence, and flair!
1414
### Changed
1515
- Updated install for kohya_ss to support RTX 5000-series GPUs
16+
- (pre.2 re-release) Merged Inference GGUF workflows into the UNet model loader option (no longer need to choose GGUF separately)
1617
### Fixed
1718
- Fixed Inference ControlNet Preprocessors using incorrect resolution and increased maximum of smallest dimension to 16384
1819
- Fixed Triton/Sage install option showing for incompatible GPUs
1920
- Fixed errors from invalid pip specifiers in requirements files
2021
- Fixed package images sometimes showing as blank due to concurrent image caching. Requests to same image resources are now de-duplicated
22+
- (pre.2 re-release) Fixed Inference Extra Networks card not allowing for more than one model at a time
2123
### Supporters
2224
#### Visionaries
2325
- Big shout-out to our Visionary-tier patrons: Waterclouds, Corey T, bluepopsicle, and Bob S! Your steadfast support keeps Stability Matrix moving forward, and we couldn’t do it without you. 🚀 Thank you!

StabilityMatrix.Avalonia/App.axaml.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,16 @@ internal static IServiceCollection ConfigureServices()
660660
new TokenAuthHeaderHandler(serviceProvider.GetRequiredService<LykosAuthTokenProvider>())
661661
);
662662

663+
services
664+
.AddRefitClient<IRecommendedModelsApi>(defaultRefitSettings)
665+
.ConfigureHttpClient(c =>
666+
{
667+
c.BaseAddress = new Uri(LykosAuthApiBaseUrl);
668+
c.Timeout = TimeSpan.FromHours(1);
669+
})
670+
.ConfigurePrimaryHttpMessageHandler(() => new HttpClientHandler { AllowAutoRedirect = false })
671+
.AddPolicyHandler(retryPolicy);
672+
663673
services
664674
.AddRefitClient<IPromptGenApi>(defaultRefitSettings)
665675
.ConfigureHttpClient(c =>

StabilityMatrix.Avalonia/DesignData/DesignData.cs

Lines changed: 61 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -459,45 +459,71 @@ public static void Initialize()
459459
public static RecommendedModelsViewModel RecommendedModelsViewModel =>
460460
DialogFactory.Get<RecommendedModelsViewModel>(vm =>
461461
{
462-
vm.Sd15Models = new ObservableCollectionExtended<RecommendedModelItemViewModel>()
463-
{
464-
new()
465-
{
466-
ModelVersion = new CivitModelVersion
462+
// Populate the single RecommendedModels collection for design time
463+
vm.RecommendedModels.AddRange(
464+
[
465+
new RecommendedModelItemViewModel
467466
{
468-
Name = "BB95 Furry Mix",
469-
Description = "A furry mix of BB95",
470-
Stats = new CivitModelStats { Rating = 3.5, RatingCount = 24 },
471-
Images =
472-
[
473-
new CivitImage
474-
{
475-
Url =
476-
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/78fd2a0a-42b6-42b0-9815-81cb11bb3d05/00009-2423234823.jpeg"
477-
}
478-
],
467+
CivitModel = new CivitModel { Name = "BB95 Furry Mix", Id = 1 }, // Added Id for clarity
468+
ModelVersion = new CivitModelVersion
469+
{
470+
Id = 101, // Added Id for clarity
471+
Name = "v1.0", // Example version name
472+
BaseModel = "SD 1.5", // Example base model
473+
Stats = new CivitModelStats { Rating = 4.5, RatingCount = 124 },
474+
Files = [new CivitFile { Type = CivitFileType.Model }], // Example file
475+
Images =
476+
[
477+
new CivitImage
478+
{
479+
Type = "image", // Ensure type is set
480+
Url =
481+
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/78fd2a0a-42b6-42b0-9815-81cb11bb3d05/00009-2423234823.jpeg"
482+
}
483+
],
484+
},
485+
Author = "by bb95"
479486
},
480-
Author = "bb95"
481-
},
482-
new()
483-
{
484-
ModelVersion = new CivitModelVersion
487+
new RecommendedModelItemViewModel
485488
{
486-
Name = "BB95 Furry Mix",
487-
Description = "A furry mix of BB95",
488-
Stats = new CivitModelStats { Rating = 3.5, RatingCount = 24 },
489-
Images =
490-
[
491-
new CivitImage
492-
{
493-
Url =
494-
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/78fd2a0a-42b6-42b0-9815-81cb11bb3d05/00009-2423234823.jpeg"
495-
}
496-
],
489+
CivitModel = new CivitModel { Name = "DreamShaper XL", Id = 2 },
490+
ModelVersion = new CivitModelVersion
491+
{
492+
Id = 201,
493+
Name = "v2.1 Turbo",
494+
BaseModel = "SDXL 1.0",
495+
Stats = new CivitModelStats { Rating = 4.8, RatingCount = 589 },
496+
Files = [new CivitFile { Type = CivitFileType.Model, IsPrimary = true }],
497+
Images =
498+
[
499+
new CivitImage
500+
{
501+
Type = "image",
502+
// Placeholder - replace with an actual relevant image URL if possible
503+
Url =
504+
"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/0cf3e133-4dde-458b-8a70-7451a3361472/width=450/00016-3919014893.jpeg"
505+
}
506+
],
507+
},
508+
Author = "by Lykon"
497509
},
498-
Author = "bb95"
499-
}
500-
};
510+
new RecommendedModelItemViewModel
511+
{
512+
CivitModel = new CivitModel { Name = "Another Model SD1.5", Id = 3 },
513+
ModelVersion = new CivitModelVersion
514+
{
515+
Id = 301,
516+
Name = "Final",
517+
BaseModel = "SD 1.5",
518+
Stats = new CivitModelStats { Rating = 4.2, RatingCount = 99 },
519+
Files = [new CivitFile { Type = CivitFileType.Model }],
520+
Images = [new CivitImage { Type = "image", Url = Assets.NoImage.ToString() }], // Use placeholder
521+
},
522+
Author = "by Creator3"
523+
}
524+
// Add more items as needed for design-time preview
525+
]
526+
);
501527
});
502528
public static OutputsPageViewModel OutputsPageViewModel
503529
{

0 commit comments

Comments
 (0)