Skip to content

Commit 107a7ad

Browse files
committed
minor corrections
1 parent 62e25ed commit 107a7ad

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Core/Settings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ public class MetadataSection : AutoConfiguration
321321
[ConfigComment("If true, image metadata will include a list of models with their hashes.\nThis is useful for services like civitai to automatically link models.\nThis will cause extra time to be taken when new hashes need to be loaded.")]
322322
public bool ImageMetadataIncludeModelHash = true;
323323

324-
[ConfigComment("How many kilobytes of blank spacer to include in model headers.\nThis allows for future expansion of metadata without rewriting the entire model file.\nDefaults to 64 KB.\nThe average header length of a standard model is already between several hundred kilobytes to a few megabytes,\nso 64 KiB is not a major increase in space but is enough to fit major metadata changes including eg adding a small jpeg thumbnail.")]
324+
[ConfigComment("How many kilobytes of blank spacer to include in model headers.\nThis allows for future expansion of metadata without rewriting the entire model file.\nDefaults to 64 KiB.\nThe average header length of a standard model is already between several hundred kilobytes to a few megabytes,\nso 64 KiB is not a major increase in space but is enough to fit major metadata changes including eg adding a small jpeg thumbnail.")]
325325
public int ModelMetadataSpacerKilobytes = 64;
326326
}
327327

src/WebAPI/ModelsAPI.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -654,12 +654,12 @@ public static async Task<JObject> DoModelDownloadWS(Session session, WebSocket w
654654
{
655655
File.WriteAllText($"{handler.DownloadFolderPath}/{name}.swarm.json", metadata);
656656
}
657+
using (ManyReadOneWriteLock.WriteClaim claim = Program.RefreshLock.LockWrite())
658+
{
659+
handler.Refresh();
660+
}
657661
if (Program.ServerSettings.Paths.DownloaderAlwaysResave)
658662
{
659-
using (ManyReadOneWriteLock.WriteClaim claim = Program.RefreshLock.LockWrite())
660-
{
661-
handler.Refresh();
662-
}
663663
if (handler.Models.TryGetValue($"{name}.safetensors", out T2IModel model))
664664
{
665665
model.ResaveModel();

0 commit comments

Comments
 (0)