diff --git a/comfy/diffusers_convert.py b/comfy/diffusers_convert.py index 950137f2..ceca8030 100644 --- a/comfy/diffusers_convert.py +++ b/comfy/diffusers_convert.py @@ -2,10 +2,6 @@ import json import os import yaml -# because of local import nonsense -import sys -sys.path.append(os.path.dirname(os.path.realpath(__file__))) - import folder_paths from comfy.ldm.util import instantiate_from_config from comfy.sd import ModelPatcher, load_model_weights, CLIP, VAE diff --git a/nodes.py b/nodes.py index 025e4fcb..5c3b3a4e 100644 --- a/nodes.py +++ b/nodes.py @@ -10,11 +10,11 @@ from PIL import Image from PIL.PngImagePlugin import PngInfo import numpy as np -from comfy.diffusers_convert import load_diffusers sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), "comfy")) +import comfy.diffusers_convert import comfy.samplers import comfy.sd import comfy.utils @@ -241,7 +241,7 @@ class DiffusersLoader: model_path = os.path.join(search_path, model_path) break - return load_diffusers(model_path, fp16=model_management.should_use_fp16(), output_vae=output_vae, output_clip=output_clip, embedding_directory=folder_paths.get_folder_paths("embeddings")) + return comfy.diffusers_convert.load_diffusers(model_path, fp16=model_management.should_use_fp16(), output_vae=output_vae, output_clip=output_clip, embedding_directory=folder_paths.get_folder_paths("embeddings")) class unCLIPCheckpointLoader: