git clone https://github.com/mlfoundations/open_clip.git
cd open_clip
python3.8 -m venv .env
source .env/bin/activate
pip install -U pip
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
pip install -e .
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
''' | |
https://gist.github.com/kohya-ss/3f774da220df102548093a7abc8538ed | |
1. put this file in ComfyUI/custom_nodes | |
2. load node from <loaders> | |
''' | |
import torch | |
from comfy.ldm.modules.diffusionmodules.openaimodel import forward_timestep_embed, timestep_embedding, th | |
def apply_control(h, control, name): |
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 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
; acceleration_enabled = {acceleration_enabled} | |
; acceleration_infill = {acceleration_infill} | |
; acceleration_ironing = {acceleration_ironing} | |
; acceleration_layer_0 = {acceleration_layer_0} | |
; acceleration_prime_tower = {acceleration_prime_tower} | |
; acceleration_print = {acceleration_print} | |
; acceleration_print_layer_0 = {acceleration_print_layer_0} | |
; acceleration_roofing = {acceleration_roofing} | |
; acceleration_skirt_brim = {acceleration_skirt_brim} | |
; acceleration_support = {acceleration_support} |
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
!pip install fastai | |
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python | |
import cv2 | |
from os import path | |
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag | |
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag()) | |
accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu' | |
!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.3.0.post4-{platform}-linux_x86_64.whl torchvision |
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
# This file is your Lambda function | |
import json | |
import boto3 | |
def save_to_bucket(event, context): | |
AWS_BUCKET_NAME = 'my-bucket-name' | |
s3 = boto3.resource('s3') | |
bucket = s3.Bucket(AWS_BUCKET_NAME) | |
path = 'my-path-name.txt' |
- The paper introduces a novel technique to explain the predictions of any classifier in an interpretable and faithful manner.
- It also proposes a method to explain models by obtaining representative individual predictions and their explanations.
- Link to the paper
- Demo
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
library(ggraph) | |
library(gganimate) | |
library(igraph) | |
# Data from http://konect.uni-koblenz.de/networks/sociopatterns-infectious | |
infect <- read.table('out.sociopatterns-infectious', skip = 2, sep = ' ', stringsAsFactors = FALSE) | |
infect$V3 <- NULL | |
names(infect) <- c('from', 'to', 'time') | |
infect$timebins <- as.numeric(cut(infect$time, breaks = 100)) | |
# We want that nice fading effect so we need to add extra data for the trailing |
NewerOlder