Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
justjake committed Dec 30, 2022
1 parent 0bb630a commit 7b34f1d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 306 deletions.
12 changes: 6 additions & 6 deletions Gauss.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
C161F21B293E6394007F518C /* PromptComposer.swift in Sources */ = {isa = PBXBuildFile; fileRef = C161F21A293E6394007F518C /* PromptComposer.swift */; };
C161F21D293E96A5007F518C /* ResultsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C161F21C293E96A5007F518C /* ResultsView.swift */; };
C161F21F29404AF8007F518C /* DraggableZoomable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C161F21E29404AF8007F518C /* DraggableZoomable.swift */; };
C161F23C29469628007F518C /* JobQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = C161F23B29469628007F518C /* JobQueue.swift */; };
C161F23C29469628007F518C /* ObservableTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = C161F23B29469628007F518C /* ObservableTask.swift */; };
C1825334293BFBFB0038E152 /* StableDiffusion in Frameworks */ = {isa = PBXBuildFile; productRef = C1825333293BFBFB0038E152 /* StableDiffusion */; };
C1825336293BFE1A0038E152 /* ProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1825335293BFE1A0038E152 /* ProgressView.swift */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -68,8 +68,8 @@
C10A46A8293BB0C9005CEE6D /* PromptView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromptView.swift; sourceTree = "<group>"; };
C10A46AA293BC512005CEE6D /* ResultView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResultView.swift; sourceTree = "<group>"; };
C10A46AE293BD460005CEE6D /* GaussKernel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GaussKernel.swift; sourceTree = "<group>"; };
C146989A295EB57A0025DE55 /* sd1.4 */ = {isa = PBXFileReference; lastKnownFileType = file; name = sd1.4; path = "compiled-models/sd1.4"; sourceTree = SOURCE_ROOT; };
C146989C295EB5A10025DE55 /* sd1.5 */ = {isa = PBXFileReference; lastKnownFileType = file; name = sd1.5; path = "compiled-models/sd1.5"; sourceTree = SOURCE_ROOT; };
C146989A295EB57A0025DE55 /* sd1.4 */ = {isa = PBXFileReference; lastKnownFileType = folder; name = sd1.4; path = "compiled-models/sd1.4"; sourceTree = SOURCE_ROOT; };
C146989C295EB5A10025DE55 /* sd1.5 */ = {isa = PBXFileReference; lastKnownFileType = folder; name = sd1.5; path = "compiled-models/sd1.5"; sourceTree = SOURCE_ROOT; };
C146989E295EB5AA0025DE55 /* sd2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = sd2; path = "compiled-models/sd2"; sourceTree = SOURCE_ROOT; };
C161F210293C31DF007F518C /* KernelStatusView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KernelStatusView.swift; sourceTree = "<group>"; };
C161F212293C945F007F518C /* AddPromptButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddPromptButton.swift; sourceTree = "<group>"; };
Expand All @@ -78,7 +78,7 @@
C161F21A293E6394007F518C /* PromptComposer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromptComposer.swift; sourceTree = "<group>"; };
C161F21C293E96A5007F518C /* ResultsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResultsView.swift; sourceTree = "<group>"; };
C161F21E29404AF8007F518C /* DraggableZoomable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DraggableZoomable.swift; sourceTree = "<group>"; };
C161F23B29469628007F518C /* JobQueue.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JobQueue.swift; sourceTree = "<group>"; };
C161F23B29469628007F518C /* ObservableTask.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ObservableTask.swift; sourceTree = "<group>"; };
C1825335293BFE1A0038E152 /* ProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -136,7 +136,7 @@
C10A467A293B190F005CEE6D /* GaussApp.swift */,
C10A467C293B190F005CEE6D /* GaussDocument.swift */,
C10A46AE293BD460005CEE6D /* GaussKernel.swift */,
C161F23B29469628007F518C /* JobQueue.swift */,
C161F23B29469628007F518C /* ObservableTask.swift */,
C10A467E293B190F005CEE6D /* ContentView.swift */,
C161F21A293E6394007F518C /* PromptComposer.swift */,
C161F210293C31DF007F518C /* KernelStatusView.swift */,
Expand Down Expand Up @@ -336,7 +336,7 @@
C161F21D293E96A5007F518C /* ResultsView.swift in Sources */,
C10A46A9293BB0C9005CEE6D /* PromptView.swift in Sources */,
C161F211293C31DF007F518C /* KernelStatusView.swift in Sources */,
C161F23C29469628007F518C /* JobQueue.swift in Sources */,
C161F23C29469628007F518C /* ObservableTask.swift in Sources */,
C10A467D293B190F005CEE6D /* GaussDocument.swift in Sources */,
C10A46AB293BC512005CEE6D /* ResultView.swift in Sources */,
C10A467B293B190F005CEE6D /* GaussApp.swift in Sources */,
Expand Down
22 changes: 0 additions & 22 deletions Gauss/GaussKernel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,36 +58,14 @@ class PreloadModelJob: ObservableTask<StableDiffusionPipeline, Never> {
}

struct GaussKernelResources {
let sourceCodeRoot = "/Users/jitl/src/gauss/compiled-models"

var sourceCodeURL: URL {
URL(filePath: sourceCodeRoot, directoryHint: .isDirectory)
}

func fromSourceCode(modelName: String) -> URL {
return sourceCodeURL.appending(components: modelName, "Resources")
}

var sd2Sources: URL {
return fromSourceCode(modelName: "sd2-base")
}

var sd2Production: URL {
return Bundle.main.url(forResource: "sd2", withExtension: nil)!
}

var sd14Sources: URL {
return fromSourceCode(modelName: "sd1.4")
}

var sd14Production: URL {
return Bundle.main.url(forResource: "sd1.4", withExtension: nil)!
}

var sd15Sources: URL {
return fromSourceCode(modelName: "sd1.5")
}

var sd15Production: URL {
return Bundle.main.url(forResource: "sd1.5", withExtension: nil)!
}
Expand Down
Loading

0 comments on commit 7b34f1d

Please sign in to comment.