multiple lora implementation sources

This commit is contained in:
layerdiffusion
2024-08-13 07:13:32 -07:00
parent 61f83dd610
commit 00f1cd36bd
17 changed files with 1855 additions and 284 deletions

View File

@@ -1,13 +1,15 @@
import torch
from backend import memory_management, attention, operations
from backend import memory_management, attention
from backend.modules.k_prediction import k_prediction_from_diffusers_scheduler
class KModel(torch.nn.Module):
def __init__(self, model, diffusers_scheduler, k_predictor=None):
def __init__(self, model, diffusers_scheduler, k_predictor=None, config=None):
super().__init__()
self.config = config
self.storage_dtype = model.storage_dtype
self.computation_dtype = model.computation_dtype