Skip to content

Commit 91542d4

Browse files
Import spandrel_extra_arches if present.
I will not add this dependency to the default ones because models in the spandrel_extra_arches package are non commercial and therefore not compatible with free software licenses like the one ComfyUI uses. If you don't mind this you can install it manually yourself.
1 parent b26da22 commit 91542d4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

comfy_extras/nodes_upscale_model.py

+9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
import os
2+
import logging
23
from spandrel import ModelLoader, ImageModelDescriptor
34
from comfy import model_management
45
import torch
56
import comfy.utils
67
import folder_paths
78

9+
try:
10+
from spandrel_extra_arches import EXTRA_REGISTRY
11+
from spandrel import MAIN_REGISTRY
12+
MAIN_REGISTRY.add(*EXTRA_REGISTRY)
13+
logging.info("Successfully imported spandrel_extra_arches: support for non commercial upscale models.")
14+
except:
15+
pass
16+
817
class UpscaleModelLoader:
918
@classmethod
1019
def INPUT_TYPES(s):

0 commit comments

Comments
 (0)