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.
This commit is contained in:
comfyanonymous 2024-05-28 01:37:40 -04:00
parent b26da2245f
commit 91542d4f8b
1 changed files with 9 additions and 0 deletions

View File

@ -1,10 +1,19 @@
import os
import logging
from spandrel import ModelLoader, ImageModelDescriptor
from comfy import model_management
import torch
import comfy.utils
import folder_paths
try:
from spandrel_extra_arches import EXTRA_REGISTRY
from spandrel import MAIN_REGISTRY
MAIN_REGISTRY.add(*EXTRA_REGISTRY)
logging.info("Successfully imported spandrel_extra_arches: support for non commercial upscale models.")
except:
pass
class UpscaleModelLoader:
@classmethod
def INPUT_TYPES(s):