Skip to content

Instantly share code, notes, and snippets.

@spacepxl
spacepxl / convert_hyv_lora_to_orig.py
Created February 7, 2025 01:50
Convert HunyuanVideo diffusers lora to original format
import os
import argparse
import torch
from safetensors.torch import load_file, save_file
def convert_lora_sd(diffusers_lora_sd):
double_block_patterns = {
"attn.to_out.0": "img_attn.proj",
"ff.net.0.proj": "img_mlp.0",
@spacepxl
spacepxl / openflux-workflow.json
Created November 4, 2024 18:30
openflux comfyui workflow
{
"last_node_id": 52,
"last_link_id": 129,
"nodes": [
{
"id": 2,
"type": "DualCLIPLoader",
"pos": {
"0": 20,
"1": 210
@spacepxl
spacepxl / convert_ic-light.py
Last active May 8, 2024 23:01
convert sd15 ckpt + ic-light to ip2p model
import torch
import safetensors
from diffusers.pipelines.stable_diffusion.convert_from_ckpt import download_from_original_stable_diffusion_ckpt
ckpt_path = "./realisticVisionV5_1.safetensors"
ic_path = "./iclight_sd15_fc.safetensors"
dump_path = "./ic-light"