mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2026-06-01 23:00:02 +08:00
Add intristic loras
This commit is contained in:
parent
6829b0ccf8
commit
d228e713d6
4
intrinsic_loras.txt
Normal file
4
intrinsic_loras.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
source for the loras:
|
||||||
|
https://github.com/duxiaodan/intrinsic-lora
|
||||||
|
|
||||||
|
Renamed and conveted to .safetensors
|
||||||
7
nodes.py
7
nodes.py
@ -3663,15 +3663,17 @@ class ImageNormalize_Neg1_To_1:
|
|||||||
|
|
||||||
|
|
||||||
import comfy.sample
|
import comfy.sample
|
||||||
from nodes import CLIPTextEncode, VAEEncode, VAEDecode, LoraLoader
|
from nodes import CLIPTextEncode, LoraLoader
|
||||||
|
folder_paths.add_model_folder_path("intristic_loras", os.path.join(script_dir, "intristic_loras"))
|
||||||
|
|
||||||
class Intrinsic_lora_sampling:
|
class Intrinsic_lora_sampling:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.loaded_lora = None
|
self.loaded_lora = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(s):
|
def INPUT_TYPES(s):
|
||||||
return {"required": { "model": ("MODEL",),
|
return {"required": { "model": ("MODEL",),
|
||||||
"lora_name": (folder_paths.get_filename_list("loras"), ),
|
"lora_name": (folder_paths.get_filename_list("intristic_loras"), ),
|
||||||
"task": (
|
"task": (
|
||||||
[
|
[
|
||||||
'depth map',
|
'depth map',
|
||||||
@ -3735,7 +3737,6 @@ class Intrinsic_lora_sampling:
|
|||||||
for start_idx in range(0, samples["samples"].shape[0], per_batch):
|
for start_idx in range(0, samples["samples"].shape[0], per_batch):
|
||||||
decoded.append(vae.decode(samples["samples"][start_idx:start_idx+per_batch]))
|
decoded.append(vae.decode(samples["samples"][start_idx:start_idx+per_batch]))
|
||||||
image_out = torch.cat(decoded, dim=0)
|
image_out = torch.cat(decoded, dim=0)
|
||||||
#image_out, = VAEDecode.decode(self, vae, samples)
|
|
||||||
|
|
||||||
pbar.update(1)
|
pbar.update(1)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user