- RunDll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,0
- RunDll32.exe msrating.dll,RatingSetupUI
| {0: 'tench, Tinca tinca', | |
| 1: 'goldfish, Carassius auratus', | |
| 2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias', | |
| 3: 'tiger shark, Galeocerdo cuvieri', | |
| 4: 'hammerhead, hammerhead shark', | |
| 5: 'electric ray, crampfish, numbfish, torpedo', | |
| 6: 'stingray', | |
| 7: 'cock', | |
| 8: 'hen', | |
| 9: 'ostrich, Struthio camelus', |
| # Got a bunch of .ckpt files to convert? | |
| # Here's a handy script to take care of all that for you! | |
| # Original .ckpt files are not touched! | |
| # Make sure you have enough disk space! You are going to DOUBLE the size of your models folder! | |
| # | |
| # First, run: | |
| # pip install torch torchsde==0.2.5 safetensors==0.2.5 | |
| # | |
| # Place this file in the **SAME DIRECTORY** as all of your .ckpt files, open a command prompt for that folder, and run: | |
| # python convert_to_safe.py |
An image generated at resolution 512x512 then upscaled to 1024x1024 with Waifu Diffusion 1.3 Epoch 7.
| import math | |
| import os | |
| import sys | |
| import traceback | |
| import modules.scripts as scripts | |
| import gradio as gr | |
| from modules.processing import Processed, process_images |
| import inspect | |
| from modules.processing import Processed, process_images | |
| import gradio as gr | |
| import modules.scripts as scripts | |
| import k_diffusion.sampling | |
| import torch | |
| class Script(scripts.Script): |
| # Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint. | |
| # *Only* converts the UNet, VAE, and Text Encoder. | |
| # Does not convert optimizer state or any other thing. | |
| import os | |
| import os.path as osp | |
| import torch | |
| # =================# | |
| # UNet Conversion # |
| #!/bin/bash | |
| # This is required for `notify-send` to work from within a cron. | |
| # http://askubuntu.com/questions/298608/notify-send-doesnt-work-from-crontab/346580#346580 | |
| eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(pgrep -u $LOGNAME gnome-session)/environ)"; | |
| # syncAndWink | |
| # | |
| # Syncs all remotely-tracked branches on a git repo passed as first argument ($1). It also pulls any new branches | |
| # and tags attached to the repo. |
| import torch | |
| import torch.nn as nn | |
| from bitsandbytes.nn import Linear8bitLt | |
| # Utility function | |
| def get_model_memory_footprint(model): | |
| r""" | |
| Partially copied and inspired from: https://discuss.pytorch.org/t/gpu-memory-that-model-uses/56822/2 |
| import numpy as np | |
| from numba import jit | |
| @jit(nopython=True) | |
| def golden_dp_impl(num_layers, num_devices, num_microbatches, submesh_choices, | |
| num_autosharding_configs, compute_cost, max_n_succ_stages, | |
| max_stage_cost): | |
| """The core implementation of the DP algorithm.""" | |
| # For f, layer ID start from 0 |