Update nodes.py

This commit is contained in:
kijai
2024-06-19 21:00:45 +03:00
parent 1bb7f5d35c
commit 731525bb3e
+1 -6
View File
@@ -31,10 +31,6 @@ class DownloadAndLoadFlorence2Model:
{
"default": 'microsoft/Florence-2-base'
}),
"precision": ([ 'bf16','fp32'],
{
"default": 'bf16'
}),
},
}
@@ -43,10 +39,9 @@ class DownloadAndLoadFlorence2Model:
FUNCTION = "loadmodel"
CATEGORY = "Florence2"
def loadmodel(self, model, precision):
def loadmodel(self, model):
device = mm.get_torch_device()
offload_device = mm.unet_offload_device()
dtype = {"bf16": torch.bfloat16, "fp16": torch.float16, "fp32": torch.float32}[precision]
model_name = model.rsplit('/', 1)[-1]
model_path = os.path.join(folder_paths.models_dir, "LLM", model_name)