feat: Add titles and tags to all Nodes

This commit is contained in:
blessedcoolant
2023-07-19 02:26:45 +12:00
parent 7d49c727a0
commit 0c18c5d603
15 changed files with 567 additions and 144 deletions

View File

@ -11,7 +11,7 @@ from realesrgan import RealESRGANer
from invokeai.app.models.image import ImageCategory, ImageField, ResourceOrigin
from .baseinvocation import BaseInvocation, InvocationContext
from .baseinvocation import BaseInvocation, InvocationConfig, InvocationContext
from .image import ImageOutput
# TODO: Populate this from disk?
@ -32,6 +32,14 @@ class RealESRGANInvocation(BaseInvocation):
default="RealESRGAN_x4plus.pth", description="The Real-ESRGAN model to use"
)
class Config(InvocationConfig):
schema_extra = {
"ui": {
"title": "Upscale (RealESRGAN)",
"tags": ["image", "upscale", "realesrgan"]
},
}
def invoke(self, context: InvocationContext) -> ImageOutput:
image = context.services.images.get_pil_image(self.image.image_name)
models_path = context.services.configuration.models_path