Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
# 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. | |
# Written by jachiam | |
import argparse | |
import os.path as osp | |
import torch |
This file contains hidden or 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
import os | |
import sys | |
import json | |
def ipynb_to_py(ipynb_file_path): | |
# Open the ipynb file and load its contents as JSON | |
with open(ipynb_file_path, 'r') as f: | |
nb = json.load(f) | |
# Create a new .py file with the same name as the ipynb file |
This file contains hidden or 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
import csv | |
import re | |
import datetime | |
from collections import defaultdict | |
# Ask user for input | |
input_file = input("Enter the input file name (including .csv extension): ") | |
output_file_base = input("Enter the base of the output file name (without extension): ") | |
account_type_header = input("Enter the header for the account type column: ") | |
date_header = input("Enter the header for the date column: ") |
OlderNewer