Browse Source

Merge branch 'dev' into fix-lykos-auth

pull/629/head
Ionite 7 months ago committed by GitHub
parent
commit
0273d8dd3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 20
      StabilityMatrix.Core/Models/Settings/Settings.cs

4
CHANGELOG.md

@ -5,6 +5,10 @@ All notable changes to Stability Matrix will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html).
## v2.10.1
### Fixed
- Fixed package launch not working when environment variable `SETUPTOOLS_USE_DISTUTILS` is set due to conflict with a default environment variable. User environment variables will now correctly override any default environment variables.
## v2.10.0 ## v2.10.0
### Added ### Added
- Added Reference-Only mode for Inference ControlNet, used for guiding the sampler with an image without a pretrained model. Part of the latent and attention layers will be connected to the reference image, similar to Image to Image or Inpainting. - Added Reference-Only mode for Inference ControlNet, used for guiding the sampler with an image without a pretrained model. Part of the latent and attention layers will be connected to the reference image, similar to Image to Image or Inpainting.

20
StabilityMatrix.Core/Models/Settings/Settings.cs

@ -118,10 +118,22 @@ public class Settings
public Dictionary<string, string>? UserEnvironmentVariables { get; set; } public Dictionary<string, string>? UserEnvironmentVariables { get; set; }
[JsonIgnore] [JsonIgnore]
public IReadOnlyDictionary<string, string> EnvironmentVariables => public IReadOnlyDictionary<string, string> EnvironmentVariables
DefaultEnvironmentVariables {
.Concat(UserEnvironmentVariables ?? []) get
.ToDictionary(x => x.Key, x => x.Value); {
if (UserEnvironmentVariables is null || UserEnvironmentVariables.Count == 0)
{
return DefaultEnvironmentVariables;
}
return DefaultEnvironmentVariables
.Concat(UserEnvironmentVariables)
.GroupBy(pair => pair.Key)
// User variables override default variables with the same key
.ToDictionary(grouping => grouping.Key, grouping => grouping.Last().Value);
}
}
public HashSet<string>? InstalledModelHashes { get; set; } = new(); public HashSet<string>? InstalledModelHashes { get; set; } = new();

Loading…
Cancel
Save