This file contains 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
""" | |
stable diffusion dreaming | |
creates hypnotic moving videos by smoothly walking randomly through the sample space | |
example way to run this script: | |
$ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry | |
to stitch together the images, e.g.: | |
$ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4 |
This file contains 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
# required by (\ SHELL COMMANDS \) | |
SHELL:=/bin/bash | |
VIRT_ENV_FOLDER = ~/.local/share/virtualenvs/xnli | |
SOURCE_VIRT_ENV = source $(VIRT_ENV_FOLDER)/bin/activate | |
.PHONY: train | |
train: | |
( \ |
This file contains 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
import collections | |
from configure_pretraining import PretrainingConfig | |
from run_pretraining import PretrainingModel | |
from pretrain.pretrain_data import get_input_fn, Inputs | |
import tensorflow as tf | |
import torch | |
from model import modeling | |
from transformers.modeling_electra import ElectraModel, ElectraGenerator, ElectraDiscriminator, load_tf_weights_in_electra | |
from transformers import BertConfig |