Skip to content

Instantly share code, notes, and snippets.

View laksjdjf's full-sized avatar
🌏
On Earth

laksjdjf

🌏
On Earth
View GitHub Profile
import torch
import modules.scripts as scripts
import gradio as gr
from modules.processing import StableDiffusionProcessing, process_images
class Script(scripts.Script):
def __init__(self):
pass
import torch
import modules.scripts as scripts
import gradio as gr
from modules.processing import StableDiffusionProcessing, process_images
class Script(scripts.Script):
def __init__(self):
pass
==============================================================================================================
Layer (type (var_name)) Input Shape Output Shape
==============================================================================================================
UNetModel (UNetModel) [1, 4, 64, 64] [1, 4, 64, 64]
├─Sequential (time_embed) [1, 320] [1, 1280]
│ └─Linear (0) [1, 320] [1, 1280]
│ └─SiLU (1) [1, 1280] [1, 1280]
│ └─Linear (2) [1, 1280] [1, 1280]
├─ModuleList (input_blocks) -- --
│ └─TimestepEmbedSequential (0) [1, 4, 64, 64] [1, 320, 64, 64]
#Put it on stable-diffusion-webui/scripts
#Idea:https://twitter.com/Birchlabs/status/1640033271512702977
#Related to https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/9129
import torch
import modules.scripts as scripts
import gradio as gr
from modules.script_callbacks import CFGDenoiserParams, on_cfg_denoiser, CFGDenoisedParams, on_cfg_denoised
from modules.processing import StableDiffusionProcessing, process_images
'''
It supports only SD-v2 models.
usage:
python simo2kohya.py --unet <simo's unet weight path> --text <simo's text_encoder weight path> --save_to <save path>
(--text is optional)
This code may no longer be available due to updates from both @kohya-ss and @cloneofsimo.
'''