V 1.0.0 - SD3.5-1
This commit is contained in:
@@ -818,7 +818,6 @@ class PrimereCKPTLoader:
|
||||
ModelConfigFullPath = Path(folder_paths.models_dir).joinpath('checkpoints').joinpath(ModelConfigPath)
|
||||
|
||||
LOADED_CHECKPOINT = []
|
||||
print('----------SD3--------------')
|
||||
if loaded_model is not None and loaded_clip is not None and loaded_vae is not None:
|
||||
LOADED_CHECKPOINT.insert(0, loaded_model)
|
||||
LOADED_CHECKPOINT.insert(1, loaded_clip)
|
||||
@@ -831,26 +830,19 @@ class PrimereCKPTLoader:
|
||||
except Exception:
|
||||
LOADED_CHECKPOINT = nodes.CheckpointLoaderSimple.load_checkpoint(self, ckpt_name)
|
||||
else:
|
||||
print('2')
|
||||
print(ckpt_name)
|
||||
fullpathFile = folder_paths.get_full_path('checkpoints', ckpt_name)
|
||||
is_link = os.path.islink(str(fullpathFile))
|
||||
if is_link == False:
|
||||
print('3')
|
||||
print(ckpt_name)
|
||||
# LOADED_CHECKPOINT = nodes.UNETLoader.load_unet(self, ckpt_name, 'default')
|
||||
try:
|
||||
LOADED_CHECKPOINT = nodes.CheckpointLoaderSimple.load_checkpoint(self, ckpt_name)
|
||||
except Exception:
|
||||
LOADED_CHECKPOINT = nodes.UNETLoader.load_unet(self, ckpt_name, 'default')
|
||||
else:
|
||||
print('4')
|
||||
File_link = Path(str(fullpathFile)).resolve()
|
||||
print(File_link)
|
||||
linkName_U = str(folder_paths.folder_names_and_paths["diffusion_models"][0][0])
|
||||
linkName_D = str(folder_paths.folder_names_and_paths["diffusion_models"][0][1])
|
||||
linkedFileName = str(File_link).replace(linkName_U + '\\', '').replace(linkName_D + '\\', '')
|
||||
print(linkedFileName)
|
||||
LOADED_CHECKPOINT = nodes.UNETLoader.load_unet(self, linkedFileName, 'default')
|
||||
|
||||
'''try:
|
||||
@@ -885,10 +877,8 @@ class PrimereCKPTLoader:
|
||||
OUTPUT_CLIP = LOADED_CHECKPOINT[1]
|
||||
|
||||
if len(LOADED_CHECKPOINT) == 3 and type(LOADED_CHECKPOINT[2]).__name__ == 'VAE':
|
||||
print('vae 1')
|
||||
OUTPUT_VAE = LOADED_CHECKPOINT[2]
|
||||
else:
|
||||
print('vae 2')
|
||||
OUTPUT_VAE = nodes.VAELoader.load_vae(self, sd3_unet_vae)[0]
|
||||
|
||||
if use_sd3_hyper_lora == True:
|
||||
@@ -926,7 +916,6 @@ class PrimereCKPTLoader:
|
||||
|
||||
OUTPUT_MODEL = comfy.sd.load_lora_for_models(OUTPUT_MODEL, None, lora, sd3_hyper_lora_strength, 0)[0]
|
||||
|
||||
print('SD3 done...')
|
||||
return (OUTPUT_MODEL,) + (OUTPUT_CLIP,) + (OUTPUT_VAE,) + (MODEL_VERSION,)
|
||||
else:
|
||||
OUTPUT_CLIP = LOADED_CHECKPOINT[1]
|
||||
|
||||
Reference in New Issue
Block a user