summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2023-03-11 12:18:18 +0600
committerGrail Finder <wohilas@gmail.com>2023-03-11 12:18:18 +0600
commit7dfdba182a01aea1af0f571664061ef06de098d9 (patch)
treef5001304d8dafaf1449f2331f0110b64d0ec4489
parent0e4a30f9b954abbd6f33d8243f30402c2a71b4a0 (diff)
Feat: loop script instead of cronmain
-rw-r--r--.gitignore1
-rwxr-xr-xget_sd_image.sh4
-rwxr-xr-xlooper.sh12
-rw-r--r--todays_audio.opusbin63762 -> 0 bytes
-rw-r--r--todays_audio.opus.json1
-rw-r--r--todays_audio.opus.srt8
-rw-r--r--todays_audio.opus.tsv3
-rw-r--r--todays_audio.opus.txt2
-rw-r--r--todays_audio.opus.vtt8
-rwxr-xr-xupdate_index.sh6
10 files changed, 18 insertions, 27 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c2f811b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+todays_audio*
diff --git a/get_sd_image.sh b/get_sd_image.sh
index e11de9f..669f800 100755
--- a/get_sd_image.sh
+++ b/get_sd_image.sh
@@ -5,7 +5,7 @@ set -e
prompt=${1:-}
steps=${2:-25}
-commonNegative="(((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquidtongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missingbreasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fusedears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, old photo, low res, black and white, black and white filter, colorless, (((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquid tongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missing breasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fused ears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, old photo, low res, black and white, black and white filter, colorless, (((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquid tongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missing breasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fused ears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, (((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquidtongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missingbreasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fusedears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, authors signature, writing, emoji"
+commonNegative="(((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquidtongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missingbreasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fusedears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, old photo, low res, black and white, black and white filter, colorless, (((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquid tongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missing breasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fused ears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, old photo, low res, black and white, black and white filter, colorless, (((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquid tongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missing breasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fused ears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, (((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquidtongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missingbreasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fusedears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, authors signature, writing, emoji, doll, doll skin, rubber skin"
model="DPM++ 2M Karras"
@@ -13,7 +13,7 @@ imgPath=./nessi_avatar.jpg
sourceIMG=$(base64 -w 0 "$imgPath")
sourceIMG=$"\"$sourceIMG\""
-resp=$(curl --data "{\"init_images\": ["$sourceIMG"], \"steps\":\"$steps\", \"prompt\":\"$prompt\", \"sampler_index\":\"$model\", \"sampler_name\":\"$model\", \"negative_prompt\": \"$commonNegative\", \"denoising_strength\": 0.58, \"cfg_scale\": 23}" --header 'Content-Type: application/json' http://127.0.0.1:7860/sdapi/v1/img2img)
+resp=$(curl --data "{\"init_images\": ["$sourceIMG"], \"steps\":\"$steps\", \"prompt\":\"$prompt\", \"sampler_index\":\"$model\", \"sampler_name\":\"$model\", \"negative_prompt\": \"$commonNegative\", \"denoising_strength\": 0.6, \"cfg_scale\": 23}" --header 'Content-Type: application/json' http://127.0.0.1:7860/sdapi/v1/img2img)
# outname=$(printf "$prompt$steps" | xxhsum | cut -d " " -f 1)
outname="/home/grail/projects/web/grailblog/src/nessi_generated.jpg"
diff --git a/looper.sh b/looper.sh
new file mode 100755
index 0000000..bddc027
--- /dev/null
+++ b/looper.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# anacron is annoying
+
+set -e
+
+while true
+do
+ ./update_index.sh "${HOME}/projects/plays/audio_stuff/vad/good"
+ echo "-----------------------------" && sleep 300
+done
+
diff --git a/todays_audio.opus b/todays_audio.opus
deleted file mode 100644
index fa0f0bf..0000000
--- a/todays_audio.opus
+++ /dev/null
Binary files differ
diff --git a/todays_audio.opus.json b/todays_audio.opus.json
deleted file mode 100644
index f34fe34..0000000
--- a/todays_audio.opus.json
+++ /dev/null
@@ -1 +0,0 @@
-{"text": " Oh, ihr seid also die Helden, die unsere Quelle versegeln werden? Ha, viel Gl\u00fcck!", "segments": [{"id": 0, "seek": 0, "start": 0.0, "end": 4.8, "text": " Oh, ihr seid also die Helden, die unsere Quelle versegeln werden?", "tokens": [876, 11, 5553, 38041, 611, 978, 6128, 1556, 11, 978, 14339, 4493, 2447, 7996, 70, 9878, 4604, 30], "temperature": 0.0, "avg_logprob": -0.2906264236995152, "compression_ratio": 1.0, "no_speech_prob": 0.007941224612295628}, {"id": 1, "seek": 480, "start": 4.8, "end": 30.8, "text": " Ha, viel Gl\u00fcck!", "tokens": [50364, 4064, 11, 5891, 33508, 0, 51664], "temperature": 0.0, "avg_logprob": -0.6473857164382935, "compression_ratio": 0.6666666666666666, "no_speech_prob": 0.0021506426855921745}], "language": "de"} \ No newline at end of file
diff --git a/todays_audio.opus.srt b/todays_audio.opus.srt
deleted file mode 100644
index 7b3404f..0000000
--- a/todays_audio.opus.srt
+++ /dev/null
@@ -1,8 +0,0 @@
-1
-00:00:00,000 --> 00:00:04,800
-Oh, ihr seid also die Helden, die unsere Quelle versegeln werden?
-
-2
-00:00:04,800 --> 00:00:30,800
-Ha, viel Glück!
-
diff --git a/todays_audio.opus.tsv b/todays_audio.opus.tsv
deleted file mode 100644
index db93545..0000000
--- a/todays_audio.opus.tsv
+++ /dev/null
@@ -1,3 +0,0 @@
-start end text
-0 4800 Oh, ihr seid also die Helden, die unsere Quelle versegeln werden?
-4800 30800 Ha, viel Glück!
diff --git a/todays_audio.opus.txt b/todays_audio.opus.txt
deleted file mode 100644
index c7f4537..0000000
--- a/todays_audio.opus.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Oh, ihr seid also die Helden, die unsere Quelle versegeln werden?
-Ha, viel Glück!
diff --git a/todays_audio.opus.vtt b/todays_audio.opus.vtt
deleted file mode 100644
index 321b075..0000000
--- a/todays_audio.opus.vtt
+++ /dev/null
@@ -1,8 +0,0 @@
-WEBVTT
-
-00:00.000 --> 00:04.800
-Oh, ihr seid also die Helden, die unsere Quelle versegeln werden?
-
-00:04.800 --> 00:30.800
-Ha, viel Glück!
-
diff --git a/update_index.sh b/update_index.sh
index 61a0e03..f6cf15f 100755
--- a/update_index.sh
+++ b/update_index.sh
@@ -9,7 +9,7 @@ echo "$filepath"
cp "$filepath" /home/grail/projects/web/dynamic-web-page/todays_audio.opus
-whisper --model medium --language de --device cpu /home/grail/projects/web/dynamic-web-page/todays_audio.opus
+whisper --model medium --language de --device cpu /home/grail/projects/web/dynamic-web-page/todays_audio.opus 2>/dev/null
phrase=$(cat todays_audio.opus.txt)
phrase=$(echo $phrase | tr "\n" " ")
@@ -19,5 +19,5 @@ phrase=$(echo $phrase | tr "\n" " ")
# in case of error go back
# cp audio.bak todays_audio.opus
-cp "$filepath" /home/grail/projects/web/grailblog/src/todays_audio.opus
-rsync -rPha /home/grail/projects/web/grailblog/src hostiko:/var/www
+yes | cp "$filepath" /home/grail/projects/web/grailblog/src/todays_audio.opus && \
+ rsync -rPha /home/grail/projects/web/grailblog/src hostiko:/var/www