mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(nodes): add beta classification to mask tensor nodes
This commit is contained in:
parent
d43f9732ab
commit
ea527f5fe1
@ -1,7 +1,7 @@
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
from invokeai.app.invocations.baseinvocation import BaseInvocation, InvocationContext, invocation
|
from invokeai.app.invocations.baseinvocation import BaseInvocation, Classification, InvocationContext, invocation
|
||||||
from invokeai.app.invocations.fields import ImageField, InputField, TensorField, WithMetadata
|
from invokeai.app.invocations.fields import ImageField, InputField, TensorField, WithMetadata
|
||||||
from invokeai.app.invocations.primitives import MaskOutput
|
from invokeai.app.invocations.primitives import MaskOutput
|
||||||
|
|
||||||
@ -43,6 +43,7 @@ class RectangleMaskInvocation(BaseInvocation, WithMetadata):
|
|||||||
tags=["conditioning"],
|
tags=["conditioning"],
|
||||||
category="conditioning",
|
category="conditioning",
|
||||||
version="1.0.0",
|
version="1.0.0",
|
||||||
|
classification=Classification.Beta,
|
||||||
)
|
)
|
||||||
class AlphaMaskToTensorInvocation(BaseInvocation):
|
class AlphaMaskToTensorInvocation(BaseInvocation):
|
||||||
"""Convert a mask image to a tensor. Opaque regions are 1 and transparent regions are 0."""
|
"""Convert a mask image to a tensor. Opaque regions are 1 and transparent regions are 0."""
|
||||||
@ -71,6 +72,7 @@ class AlphaMaskToTensorInvocation(BaseInvocation):
|
|||||||
tags=["conditioning"],
|
tags=["conditioning"],
|
||||||
category="conditioning",
|
category="conditioning",
|
||||||
version="1.0.0",
|
version="1.0.0",
|
||||||
|
classification=Classification.Beta,
|
||||||
)
|
)
|
||||||
class InvertTensorMaskInvocation(BaseInvocation):
|
class InvertTensorMaskInvocation(BaseInvocation):
|
||||||
"""Inverts a tensor mask."""
|
"""Inverts a tensor mask."""
|
||||||
|
Loading…
Reference in New Issue
Block a user