Thank you everybody, Your comments makes it better
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
import inspect | |
import json | |
import re | |
import typing | |
from inspect import isclass, getdoc | |
from types import NoneType | |
from pydantic import BaseModel, Field | |
from pydantic.fields import FieldInfo | |
from typing import Any, Type, List, get_args, get_origin, Tuple, Union, Optional |
import urllib.request | |
import json | |
def bits_to_gb(bits): | |
return bits / (8 * 1024**3) | |
def calculate_train_vram_requirements( | |
batch_size, seq_len, params, precision, num_layers, num_attn_heads, hidden_size, **ignored |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
{"seed": 374894, "temp": 0.7, "top_p": 0.0, "top_k": 40, "repetition_penalty": 1.1764705882352942, "max_seq_len": 512, "max_gen_len": 511} | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
Loading | |
Loaded in 8.72 seconds | |
============== sample 1 ================= | |
I believe the meaning of life is to grow, learn and give. |
import torch | |
import numpy as np | |
import k_diffusion as K | |
from PIL import Image | |
from torch import autocast | |
from einops import rearrange, repeat | |
def pil_img_to_torch(pil_img, half=False): | |
image = np.array(pil_img).astype(np.float32) / 255.0 |
Thank you everybody, Your comments makes it better
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
#! /usr/bin/env python | |
import argparse | |
import itertools | |
import cv2 | |
import numpy as np | |
if __name__=='__main__': | |
parser = argparse.ArgumentParser( |
#!/usr/bin/env ruby | |
# modified from https://gist.github.com/pbock/3ab260f3862c350e6b5f # | |
require 'watir-webdriver' | |
class BurgerBot | |
def initialize | |
@attempt_count = 0 |
Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X) | |
(if you aren't using version 9.1.5, change line 6 with the correct version) | |
1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
2. mv /usr/local/var/postgres /usr/local/var/postgres91 | |
3. brew update | |
4. brew upgrade postgresql | |
5. initdb /usr/local/var/postgres -E utf8 | |
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres | |
7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ |