Skip to content

Instantly share code, notes, and snippets.

View nnuudev's full-sized avatar

nnuu.dev nnuudev

  • Equestria
View GitHub Profile
@nnuudev
nnuudev / show_hash.py
Created January 30, 2023 23:49
Calculate old and new hashes for Stable Diffusion models, using the same format as https://github.com/AUTOMATIC1111/stable-diffusion-webui
#!/usr/bin/python
# encoding: utf-8
# https://github.com/AUTOMATIC1111/stable-diffusion-webui shows a hash next to models
# the way those hashes is calculated was changed in the commit a95f135 (2022-01-14)
# this script shows both the old and new hashes for any checkpoint (ckpt or safetensors)
# just run
# > python show_hash.py path/to/your model
# or drop the checkpoint on show_hash.py if your system supports drag and drop on python scripts
@nnuudev
nnuudev / copy prompt.pyw
Created September 12, 2022 13:42
Copy to the clipboard the prompt of an image generated with https://github.com/AUTOMATIC1111/stable-diffusion-webui
#!/usr/bin/python
# encoding: utf-8
# - this script reads the prompt of images generated with https://github.com/AUTOMATIC1111/stable-diffusion-webui
# > 1. drag the image to the icon of the script
# > 2. its prompt will be copied to the clipboard
# - only works on Windows, tested on Windows 10
# - should work both with Python 2 and Python 3, as long as PIL is installed
# - files with non-latin1 characters (like emojis) in its filename will fail in Python 2
@nnuudev
nnuudev / Desuarchive flags.user.js
Created September 13, 2021 18:48
Add flags to the posts when viewing an archived thread on Desuarchive
// ==UserScript==
// @name Load /mlp/ flags on Desuarchive
// @namespace https://desuarchive.org/mlp/thread/
// @description Add flags to the posts when viewing an archived thread on Desuarchive
// @version 1.0
// @author Anonymous
// @icon https://s.4cdn.org/image/flags/mlp/anf.gif
// @match https://desuarchive.org/mlp/thread/*
// @run-at document-end
// @grant GM_addStyle
@nnuudev
nnuudev / reanimate.js
Created September 13, 2021 17:32 — forked from PluieElectrique/reanimate.js
Make a dead thread look like it's still alive.
/* Thread Reanimater
* =================
*
* Make a dead thread look like it's still alive.
*
*
* How to use
* ==========
*
* If you want to use a board other than /mlp/ or an archive other than Desu,
@nnuudev
nnuudev / Better flags.user.js
Last active October 18, 2021 07:00
Improved flag selector for /mlp/ (requires 4chan X)
// ==UserScript==
// @name Better flags on /mlp/
// @namespace https://boards.4channel.org/mlp/
// @description Improved flag selector for /mlp/ (requires 4chan X)
// @version 1.1
// @author Anonymous
// @icon https://s.4cdn.org/image/flags/mlp/anf.gif
// @downloadURL https://gist.github.com/nnuudev/6c4376687572f8627e1e10c5a5323497/raw/Better%2520flags.user.js
// @match https://boards.4channel.org/mlp/*
// @run-at document-start
@nnuudev
nnuudev / pastebin.ps1
Created May 27, 2021 10:22
Pastebin downloader 0.1.2
# Pastebin downloader 0.1.2
# - Open a PowerShell window (press the Windows key, write powershell, press enter)
# - Navigate to the folder you want to download the pastes to
# - Copy all the contents from this file and paste them to the window (right click)
# - Use any of the functions here:
# + DownloadPaste expects a valid paste url, it will download a single paste:
# > DownloadPaste https://pastebin.com/xxx
# + DownloadUser expects a valid user url, it will download all the pastes:
# > DownloadUser https://pastebin.com/u/xxx
# + Pastebin can be used as a replacement for both the previous functions,