cum
This commit is contained in:
parent
8eeb0a87c4
commit
fa82334f4e
|
@ -1,5 +1,11 @@
|
||||||
# Textual Inversion Guide w/ E621 Content
|
# Textual Inversion Guide w/ E621 Content
|
||||||
|
|
||||||
|
An up-to-date repo with all the necessary files can be found here: https://git.coom.tech/mrq/stable-diffusion-utils
|
||||||
|
|
||||||
|
**!**WARNING**!** **!**CAUTION**!** ***DO NOT POST THE REPO'S URL ON 4CHAN*** **!**CAUTION**!** **!**WARNING**!**
|
||||||
|
|
||||||
|
`coom.tech` is an automatic 30-day ban if posted. I am not responsible if you share that URL. Share the [rentry](https://rentry.org/sd-e621-textual-inversion/) instead.
|
||||||
|
|
||||||
## Assumptions
|
## Assumptions
|
||||||
|
|
||||||
This guide assumes the following basics:
|
This guide assumes the following basics:
|
||||||
|
|
5
utils/renamer/package.json
Normal file
5
utils/renamer/package.json
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
"node-fetch": "^2.6.7"
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,11 +18,14 @@ for ( let i in csv ) {
|
||||||
// for starters, you can also add "anthro", "male", "female", as they're very common tags
|
// for starters, you can also add "anthro", "male", "female", as they're very common tags
|
||||||
let filters = [
|
let filters = [
|
||||||
"female"
|
"female"
|
||||||
]
|
];
|
||||||
|
|
||||||
for ( let i in files ) (async () => {
|
let parse = async () => {
|
||||||
|
for ( let i in files ) {
|
||||||
let file = files[i];
|
let file = files[i];
|
||||||
let md5 = file.match(/^([a-f0-9]{32})/)[1];
|
let md5 = file.match(/^([a-f0-9]{32})/);
|
||||||
|
if ( !md5 ) continue;
|
||||||
|
md5 = md5[1];
|
||||||
let ext = file.split(".").pop()
|
let ext = file.split(".").pop()
|
||||||
console.log(i, files.length, md5, ext);
|
console.log(i, files.length, md5, ext);
|
||||||
|
|
||||||
|
@ -31,7 +34,7 @@ for ( let i in files ) (async () => {
|
||||||
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36'
|
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36'
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
let json = JSON.parse(await res.text());
|
let json = JSON.parse(await r.text());
|
||||||
json = json.posts[0];
|
json = json.posts[0];
|
||||||
if ( !json ) continue;
|
if ( !json ) continue;
|
||||||
tags = [];
|
tags = [];
|
||||||
|
@ -80,4 +83,7 @@ for ( let i in files ) (async () => {
|
||||||
await new Promise( (resolve) => {
|
await new Promise( (resolve) => {
|
||||||
setTimeout(resolve, 500)
|
setTimeout(resolve, 500)
|
||||||
} )
|
} )
|
||||||
})();
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
parse();
|
Loading…
Reference in New Issue
Block a user