@@ -245,61 +245,6 @@ void HandleExit(int i)
245245 VenvRunner . RunDetached ( args . TrimEnd ( ) , HandleConsoleOutput , HandleExit ) ;
246246 }
247247
248- public override Task SetupModelFolders ( DirectoryPath installDirectory )
249- {
250- var configJsonPath = installDirectory + "config.json" ;
251- var exists = File . Exists ( configJsonPath ) ;
252- JsonObject ? configRoot ;
253- if ( exists )
254- {
255- var configJson = File . ReadAllText ( configJsonPath ) ;
256- try
257- {
258- configRoot = JsonSerializer . Deserialize < JsonObject > ( configJson ) ?? new JsonObject ( ) ;
259- }
260- catch ( JsonException )
261- {
262- configRoot = new JsonObject ( ) ;
263- }
264- }
265- else
266- {
267- configRoot = new JsonObject ( ) ;
268- }
269-
270- configRoot [ "ckpt_dir" ] = Path . Combine ( SettingsManager . ModelsDirectory , "StableDiffusion" ) ;
271- configRoot [ "diffusers_dir" ] = Path . Combine ( SettingsManager . ModelsDirectory , "Diffusers" ) ;
272- configRoot [ "vae_dir" ] = Path . Combine ( SettingsManager . ModelsDirectory , "VAE" ) ;
273- configRoot [ "lora_dir" ] = Path . Combine ( SettingsManager . ModelsDirectory , "Lora" ) ;
274- configRoot [ "lyco_dir" ] = Path . Combine ( SettingsManager . ModelsDirectory , "LyCORIS" ) ;
275- configRoot [ "embeddings_dir" ] = Path . Combine ( SettingsManager . ModelsDirectory , "TextualInversion" ) ;
276- configRoot [ "hypernetwork_dir" ] = Path . Combine ( SettingsManager . ModelsDirectory , "Hypernetwork" ) ;
277- configRoot [ "codeformer_models_path" ] = Path . Combine ( SettingsManager . ModelsDirectory , "Codeformer" ) ;
278- configRoot [ "gfpgan_models_path" ] = Path . Combine ( SettingsManager . ModelsDirectory , "GFPGAN" ) ;
279- configRoot [ "bsrgan_models_path" ] = Path . Combine ( SettingsManager . ModelsDirectory , "BSRGAN" ) ;
280- configRoot [ "esrgan_models_path" ] = Path . Combine ( SettingsManager . ModelsDirectory , "ESRGAN" ) ;
281- configRoot [ "realesrgan_models_path" ] = Path . Combine ( SettingsManager . ModelsDirectory , "RealESRGAN" ) ;
282- configRoot [ "scunet_models_path" ] = Path . Combine ( SettingsManager . ModelsDirectory , "ScuNET" ) ;
283- configRoot [ "swinir_models_path" ] = Path . Combine ( SettingsManager . ModelsDirectory , "SwinIR" ) ;
284- configRoot [ "ldsr_models_path" ] = Path . Combine ( SettingsManager . ModelsDirectory , "LDSR" ) ;
285- configRoot [ "clip_models_path" ] = Path . Combine ( SettingsManager . ModelsDirectory , "CLIP" ) ;
286- configRoot [ "control_net_models_path" ] = Path . Combine ( SettingsManager . ModelsDirectory , "ControlNet" ) ;
287-
288- var configJsonStr = JsonSerializer . Serialize ( configRoot , new JsonSerializerOptions
289- {
290- WriteIndented = true
291- } ) ;
292- File . WriteAllText ( configJsonPath , configJsonStr ) ;
293-
294- return Task . CompletedTask ;
295- }
296-
297- public override Task UpdateModelFolders ( DirectoryPath installDirectory ) =>
298- SetupModelFolders ( installDirectory ) ;
299-
300- public override Task RemoveModelFolderLinks ( DirectoryPath installDirectory ) =>
301- Task . CompletedTask ;
302-
303248 public override async Task < string > Update ( InstalledPackage installedPackage ,
304249 IProgress < ProgressReport > ? progress = null , bool includePrerelease = false )
305250 {
0 commit comments