Skip to content

Commit

Permalink
Import spandrel_extra_arches if present.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
comfyanonymous committed May 28, 2024
1 parent b26da22 commit 91542d4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions comfy_extras/nodes_upscale_model.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down

0 comments on commit 91542d4

Please sign in to comment.