File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33All in one, batteries-included software to easily generate and upscale AI art using [ Stable Diffusion] ( https://github.com/CompVis/stable-diffusion ) .
44
55![ Image] ( https://i.imgur.com/EyjdVXj.png )
6+ ![ Image] ( https://i.imgur.com/kB3mL6e.png )
67
78## Requirements / Info
89
Original file line number Diff line number Diff line change @@ -62,7 +62,13 @@ public static void GenerateFromPrompt(GeneratorConfig config)
6262
6363 private static void Run ( GeneratorConfig config )
6464 {
65- Directory . Delete ( WorkingDirectory + "\\ stable-diffusion\\ outputs\\ txt2img-samples" , true ) ;
65+ var samplesDir = WorkingDirectory + "\\ stable-diffusion\\ outputs\\ txt2img-samples" ;
66+ if ( Directory . Exists ( samplesDir ) )
67+ {
68+ Directory . Delete ( samplesDir , true ) ;
69+ }
70+
71+ var path = DateTimeOffset . Now . ToUnixTimeSeconds ( ) . ToString ( ) ;
6672
6773 config . GenerateButton . Invoke ( new MethodInvoker ( delegate ( )
6874 {
@@ -89,7 +95,8 @@ private static void Run(GeneratorConfig config)
8995 var prompt = config . Prompt ;
9096 var converted = string . Join ( "_" , prompt . Split ( ' ' ) ) ;
9197
92- var images = Directory . GetFiles ( WorkingDirectory + @"\stable-diffusion\outputs\txt2img-samples\" + converted , "*.png" ) ;
98+ var dir = Directory . GetDirectories ( WorkingDirectory + @"\stable-diffusion\outputs\txt2img-samples\" ) [ 0 ] ;
99+ var images = Directory . GetFiles ( dir , "*.png" ) ;
93100
94101 config . GenerateButton . Invoke ( new MethodInvoker ( delegate ( )
95102 {
You can’t perform that action at this time.
0 commit comments