Music to Crash Cars To, Bruebach, Alexis Alexoudis & Hardyville.

This commit is contained in:
nik gaffney 2021-01-29 14:02:58 +01:00
parent 8be0b53ada
commit b976f2526b
6 changed files with 150 additions and 3 deletions

View file

@ -7,7 +7,7 @@ PLACE=/tmp/neural
mkdir -p $PLACE mkdir -p $PLACE
cd $PLACE cd $PLACE
echo "using the Superject archetype..." echo "using the Superject archetypes..."
occasions=("Journey" "Science" "Magic" "Nature" "Power" "Education" "Connection" "Obstacle" "Tool" "Retreat" "Fortune" "Justice" "Sacrifice" "Death" "Art" "Decay" "Ruin" "Mystery" "Bridge" "Energy" "Transformation" "World") occasions=("Journey" "Science" "Magic" "Nature" "Power" "Education" "Connection" "Obstacle" "Tool" "Retreat" "Fortune" "Justice" "Sacrifice" "Death" "Art" "Decay" "Ruin" "Mystery" "Bridge" "Energy" "Transformation" "World")
@ -16,9 +16,18 @@ qualia=("Sad" "Happy" "Fear" "Surprise" "Angry" "Disgust" "Grief" "Hunger" "Love
lures=("Assemble" "Cook" "Destroy" "Hex" "Enact" "Exchange" "Experiment" "Gather" "Give" "Grow" "Repair" "Make" "Perform" "Play" "Protect" "Prototype" "Question" "Resist" "Reverse" "Serve" "Solve" "Trick") lures=("Assemble" "Cook" "Destroy" "Hex" "Enact" "Exchange" "Experiment" "Gather" "Give" "Grow" "Repair" "Make" "Perform" "Play" "Protect" "Prototype" "Question" "Resist" "Reverse" "Serve" "Solve" "Trick")
echo "qualia..." echo "occasions..."
for i in "${qualia[@]}" for i in "${occasions[@]}"
do
export CUDA_VISIBLE_DEVICES=1
echo "dreaming $i"
dream $i --save-progress --save-every 30 --epochs=6 --iterations=600
done
echo "lures..."
for i in "${lures[@]}"
do do
export CUDA_VISIBLE_DEVICES=1 export CUDA_VISIBLE_DEVICES=1
echo "dreaming $i" echo "dreaming $i"

View file

@ -0,0 +1,7 @@
#!/bin/bash
NAME=$1
echo "composing $1"
ffmpeg -r 24 -f image2 -s 1920x1080 -i "$NAME".%d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p "$NAME"_x0.mp4

41
cards/neural/glow.py Normal file
View file

@ -0,0 +1,41 @@
# via https://github.com/huggingface/pytorch-pretrained-BigGAN
import torch
from pytorch_pretrained_biggan import (BigGAN, one_hot_from_names, truncated_noise_sample,
save_as_images, display_in_terminal)
# OPTIONAL: if you want to have more information on what's happening, activate the logger as follows
import logging
logging.basicConfig(level=logging.INFO)
# Load pre-trained model tokenizer (vocabulary)
model = BigGAN.from_pretrained('biggan-deep-512')
# Prepare a input
truncation = 0.4
class_vector = one_hot_from_names(['soap bubble', 'coffee', 'mushroom'], batch_size=3)
noise_vector = truncated_noise_sample(truncation=truncation, batch_size=3)
# All in tensors
noise_vector = torch.from_numpy(noise_vector)
class_vector = torch.from_numpy(class_vector)
# If you have a GPU, put everything on 'cuda'
noise_vector = noise_vector.to('cpu')
class_vector = class_vector.to('cpu')
model.to('cpu')
# Generate an image
with torch.no_grad():
output = model(noise_vector, class_vector, truncation)
# If you have a GPU put back on CPU
output = output.to('cpu')
# If you have a sixtel compatible terminal you can display the images in the terminal
# (see https://github.com/saitoha/libsixel for details)
display_in_terminal(output)
# Save results as png images
save_as_images(output)

View file

@ -0,0 +1,30 @@
#!/bin/bash
# a simple script to test a linode GPU instance for superject abstraction
PLACE=/tmp/neural/hexagrams
mkdir -p $PLACE
cd $PLACE
echo "using the HEXAGRAMS..."
hexagrams=("The Creative Heaven" "The Receptive Earth" "Difficulty At The Beginning" "Youthful Folly" "Waiting" "Conflict" "The Army" "Holding Together" "Small Taming" "Treading" "Peace" "Standstill" "Fellowship" "Great Possession" "Modesty" "Enthusiasm" "Following" "Work On The Decayed" "Approach" "Contemplation" "Biting Through" "Grace" "Splitting Apart" "Return" "Innocence" "Great Taming" "Mouth Corners" "Great Preponderance" "The Abysmal Water" "The Clinging Fire" "Influence" "Duration" "Retreat" "Great Power" "Progress" "Darkening Of The Light" "The Family" "Opposition" "Obstruction" "Deliverance" "Decrease" "Increase" "Breakthrough" "Coming To Meet" "Gathering Together" "Pushing Upward" "Oppression" "The Well" "Revolution" "The Cauldron" "The Arousing Thunder" "The Keeping Still Mountain" "Development" "The Marrying Maiden" "Abundance" "The Wanderer" "The Gentle Wind" "The Joyous Lake" "Dispersion" "Limitation" "Inner Truth" "Small Preponderance" "After Completion")
echo "bifold trigram..."
for i in "${hexagrams[@]}"
do
export CUDA_VISIBLE_DEVICES=1
echo "dreaming $i"
dream "$i" --save-progress --save-every 10 --epochs=1 --iterations=100 --image-size=512
done
#export CUDA_VISIBLE_DEVICES=1
# note in big-sleep.py -> torch,cuda.set_device(1)
# and/or CUDA_VISIBLE_DEVICES=1,2 python myscript.py
# ffmpeg -r 24 -f image2 -s 1920x1080 -i The_Grand_Evocateur_of_intensity.%d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p The_Grand_Evocateur_of_intensity_m3.mp4

View file

@ -0,0 +1,30 @@
#!/bin/bash
# a simple script to test a linode GPU instance for superject abstraction
PLACE=/tmp/neural/tarot
mkdir -p $PLACE
cd $PLACE
echo "using the Tarot..."
phrases=("An energetic nomad on a long hike with wooden staff a green leaf and a small dog." "At the beginning of a magical quest for wisdom an animus of a conman hide beneath the table." "A charismatic female figure meditates on the book of flesh in isolation, oval and white." "Fertility of nature in small green leaves, adam's apple, a pyramid and a baby eagle's wing." "The alchemical gold adorns the throne in a powerful house rooted in matter.")
echo "cosmic entanglement..."
for i in "${phrases[@]}"
do
export CUDA_VISIBLE_DEVICES=0
echo "dreaming $i"
dream "$i" --save-progress --save-every 20 --epochs=6 --iterations=800 --image-size=512
done
#export CUDA_VISIBLE_DEVICES=1
# note in big-sleep.py -> torch,cuda.set_device(1)
# and/or CUDA_VISIBLE_DEVICES=1,2 python myscript.py
# ffmpeg -r 24 -f image2 -s 1920x1080 -i The_Grand_Evocateur_of_intensity.%d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p The_Grand_Evocateur_of_intensity_m3.mp4

View file

@ -0,0 +1,30 @@
#!/bin/bash
# a simple script to test a linode GPU instance for superject abstraction
PLACE=/tmp/neural/tarot
mkdir -p $PLACE
cd $PLACE
echo "using the Tarot..."
phrases=("An energetic nomad on a long hike with wooden staff a green leaf and a small dog." "At the beginning of a magical quest for wisdom an animus of a conman hide beneath the table." "A charismatic female figure meditates on the book of flesh in isolation, oval and white." "Fertility of nature in small green leaves, adam's apple, a pyramid and a baby eagle's wing." "The alchemical gold adorns the throne in a powerful house rooted in matter.")
echo "cosmic entanglement..."
for i in "${phrases[@]}"
do
export CUDA_VISIBLE_DEVICES=1
echo "dreaming $i"
dream "$i" --save-progress --save-every 40 --epochs=6 --iterations=800 --image-size=512
done
#export CUDA_VISIBLE_DEVICES=1
# note in big-sleep.py -> torch,cuda.set_device(1)
# and/or CUDA_VISIBLE_DEVICES=1,2 python myscript.py
# ffmpeg -r 24 -f image2 -s 1920x1080 -i The_Grand_Evocateur_of_intensity.%d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p The_Grand_Evocateur_of_intensity_m3.mp4