This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# supply the root of your image archive folder as a parameter (or edit this file and hard-code $archiveroot) | |
param([String]$archiveroot="$env:TEMP") | |
Add-Type -AssemblyName 'System.Windows.Forms' | |
Add-Type -AssemblyName 'System.Drawing.Common' | |
$path = dir -recurse "$($archiveroot)\*.*" | Get-random | % {$_.FullName} | |
write-host $path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Using exiftool (see https://exiftool.org/) to add the prompt to a Bing Image Creator download. | |
.DESCRIPTION | |
Use like | |
& '.\OneDrive\Pictures\aigen\prompt.ps1' "minimalist style corporate flower logo. simple, clean, uncluttered, modern, elegant" | |
or |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[System.IO.Directory]::GetFiles((Get-Location), "?????-*.png") | | |
Group-Object -Property {[System.DateTime]::Parse([System.IO.File]::GetCreationTime($_).ToShortDateString())} | | |
Sort-Object -Property {[System.DateTime]::Parse($_.Name)} | % { | |
$names = $_.Group | Sort-Object -Property {[System.IO.File]::GetCreationTime($_)} | |
[PSCustomObject]@{ | |
Key = $_.Name | |
Value = $names | |
} | |
} | % { | |
Write-Output ($_.Key.Split())[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.IO | |
let dumpParams f = | |
let bytes = File.ReadAllBytes f | |
// printfn "%A bytes" bytes.Length | |
let rec readchunk index = | |
// printfn "readchunk %A" index | |
if index < bytes.Length then | |
let field = [| bytes[index+3]; bytes[index+2]; bytes[index+1]; bytes[index] |] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All the test images are run with the default Automatic1111 web ui parameters (with the exception of RNG which is kept as the original state of CPU) - Steps: 20, Sampler: Euler a, CFG scale: 7, ENSD: 31337, RNG: CPU; and assume the appropriate VAE for each model. | |
The voodoo prompt script (using the bad_prompt_version2 embedding): | |
--prompt "best quality, (masterpiece:1.3), illustration, absurdres, low sun, sunset glow, medium shot, (beautiful detailed girl), long brown hair and blue eyes, green dress, open jacket" --negative_prompt "cropped, simple background, missing hand, amputee, extra hands, cripple, mutated limbs, loli, lolicon, menu, ui, ux, user interface, mismatched eyes, malformed breasts, (bad_prompt_version2:0.8), (upskirt:1.5), (legwear:1.5), (hat:1.8)" --width 440 --height 592 --seed 1812824062 | |
--prompt "best quality, (masterpiece:1.3), illustration, absurdres, low sun, sunset glow, medium shot, (beautiful detailed girl), long brown hair and blue eyes, green dress, open jacket, (white belt)" --ne |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// do any required customizations here | |
var altcoverSettings = new AltCover.Cake.CoverageSettings { | |
PreparationPhase = new TestPrepareOptions(), | |
CollectionPhase = new TestCollectOptions(), | |
Options = new TestOptions() | |
}; | |
var testSettings = new DotNetCoreTestSettings { | |
Configuration = configuration, | |
NoBuild = true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DotNet.test | |
(fun to' -> | |
(to' | |
.WithCommon(withWorkingDirectoryVM "_DotnetTest") | |
.WithAltCoverGetVersion() | |
.WithAltCoverImportModule()) | |
.WithAltCoverOptions | |
pp1 | |
cc0 | |
ForceTrue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let paramsToEnvironment (o: DotNet.Options) = | |
o.CustomParams | |
|> Option.map (fun x -> let bits = x.Split ("/p:", StringSplitOptions.RemoveEmptyEntries) | |
bits | |
|> Array.fold (fun (o2: DotNet.Options) flag -> let line = flag.TrimEnd([| ' '; '"' |]) | |
let split = if line.Contains "=\"" | |
then "=\"" | |
else "=" | |
let parts = line.Split (split, StringSplitOptions.RemoveEmptyEntries) | |
{ o2 with Environment = o2.Environment |> Map.add parts[0] parts[1] }) o) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.Collections.Generic | |
open System.IO | |
let words = File.ReadAllLines(@".\brit-a-z.txt") | |
|> Array.filter (fun x -> x.IndexOf('\'') < 0) | |
let nines = words | |
|> Array.filter (fun x -> x.StartsWith("a")) | |
|> Array.filter (fun x -> x.Length = 9) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.IO | |
let words = File.ReadAllLines(@".\brit-a-z.txt") | |
|> Array.filter (fun x -> x.IndexOf('\'') < 0) | |
let nines = words | |
|> Array.filter (fun x -> x.StartsWith("a")) | |
|> Array.filter (fun x -> x.Length = 9) | |
printfn "%d candidate words" nines.Length |
NewerOlder