Skip to content

Instantly share code, notes, and snippets.

Waifu Diffusion 1.4 Overview

An image generated at resolution 512x512 then upscaled to 1024x1024 with Waifu Diffusion 1.3 Epoch 7.

Goals

  • Improving image generation at different aspect ratios using conditional masking during training. This will allow for the entire image to be seen during training instead of center cropped images, which will allow for better results when generating full body images, portraits, and improving the composition.
  • Expanded the input context from 77 tokens to 231 tokens or perhaps to an unlimited amount of tokens. Out of 77 tokens for input, only 75 are useable. This does not give nearly enough room for complex prompting that requires a lot of detail.

CKA 考試全攻略流程

前言

接下來分享,我如何一次通過考試,並且拿到90分

我是在去年 2020 Cyber Monday 特價的時候買的,連買多少錢都忘了,而且拖到快過期才去考 XD

考試是採用線上考試的方式,考生可以在家上網,找個安靜的空間就可以考試了(後面會詳細講。

@mds1
mds1 / slot.ts
Created September 8, 2021 12:36
Solidity and Vyper storage slot calcuations
import { defaultAbiCoder } from '@ethersproject/abi';
import { hexZeroPad, hexStripZeros } from '@ethersproject/bytes';
import { keccak256 } from '@ethersproject/keccak256';
// `defaultAbiCoder.encode` is equivalent to Solidity's `abi.encode()`, and we strip leading zeros from the hashed
// value to conform to the JSON-RPC spec: https://ethereum.org/en/developers/docs/apis/json-rpc/#hex-value-encoding
// Returns the storage slot for a Solidity mapping from an `address` to a value, given the slot of the mapping itself,
// `mappingSlot`. Read more at https://docs.soliditylang.org/en/latest/internals/layout_in_storage.html#mappings-and-dynamic-arrays
const getSolidityStorageSlot = (mappingSlot: string, address: string) => {
#!/bin/bash
# This script generates Pornhub-style video previews,
# composed of a series of meaningful
# scenes distributed equally across entire video.
WIDTH_VAL=320 #default thumbnail width. Can be overwritten by using third CLI argument
OUTPUT_CRF=30 #output quality. 30 is fairly low and results in small file sizes
SNIPPET_SAMPLE_F=10 #for 1 second of the video, extract this number of frames
SNIPPET_FPS="$SNIPPET_SAMPLE_F/1"
@rfikki
rfikki / constantinople-ropsten-peers.txt
Last active January 15, 2024 07:11
Updated November 25, 2019: Ropsten Latest Peers with Istanbul - IMPORTANT RUN THE LATEST RELEASE OF THE CLIENT - https://geth.ethereum.org/downloads/ and use this flag --whitelist=6485846=0x43f0cd1e5b1f9c4d5cda26c240b59ee4f1b510d0a185aa8fd476d091b0097a80
admin.addPeer("enode://cd24a0c66055d788ce2bb77c2525915724a56de577b3e39c1a4dde347e60c83f082285a9d43a5ba0d7efc929699106d147e8d3612baafcaeb8f3075f36a82670@180.64.84.98:51044");
admin.addPeer("enode://86fb5f9e216c9fef5f97d3140d8d30ba13e2cc615ebb0b8e22975d296486e1f589baa6a2a4db6e0a1482f9b27a9e472efd94ec01cefc6e1d7e687dcdda0af5cc@46.105.118.30:30333");
const brorand = require('brorand')
const elliptic = require('elliptic')
const Ed25519 = elliptic.eddsa('ed25519')
const hashjs = require('hash.js')
function hash(message) {
return hashjs.sha512().update(message).digest().slice(0, 32)
}
function getL(Xs) {
@ralphschindler
ralphschindler / README.md
Last active May 1, 2024 19:14
Docker For Mac Host Address Alias To Enable PHP XDebug (10.254.254.254 Trick)

Docker (Mac) De-facto Standard Host Address Alias

This launchd script will ensure that your Docker environment on your Mac will have 10.254.254.254 as an alias on your loopback device (127.0.0.1). The command being run is ifconfig lo0 alias 10.254.254.254.

Once your machine has a well known IP address, your PHP container will then be able to connect to it, specifically XDebug can connect to it at the configured xdebug.remote_host.

Installation Of IP Alias (This survives reboot)

Copy/Paste the following in terminal with sudo (must be root as the target directory is owned by root)...

@squadbox
squadbox / cool_gpu2.sh
Last active October 20, 2024 09:32
A script to control Nvidia GPU fan speed on headless (non-X) linux nodes
#!/bin/bash
# cool_gpu2.sh This script will enable or disable fixed gpu fan speed
#
# Description: A script to control GPU fan speed on headless (non-X) linux nodes
# Original Script by Axel Kohlmeyer <[email protected]>
# https://sites.google.com/site/akohlmey/random-hacks/nvidia-gpu-coolness
#
# Modified for newer drivers and removed old work-arounds