mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
remove unet test
This commit is contained in:
parent
38604aa408
commit
6d7c8d5f57
@ -198,22 +198,15 @@ class CreateGradientMaskInvocation(BaseInvocation):
|
|||||||
minimum_denoise: float = InputField(
|
minimum_denoise: float = InputField(
|
||||||
default=0.0, ge=0, le=1, description="Minimum denoise level for the coherence region", ui_order=4
|
default=0.0, ge=0, le=1, description="Minimum denoise level for the coherence region", ui_order=4
|
||||||
)
|
)
|
||||||
unet: Optional[UNetField] = InputField(
|
|
||||||
description="OPTIONAL: If the Unet is a specialized Inpainting model, masked_latents will be generated from the image with the VAE",
|
|
||||||
default=None,
|
|
||||||
input=Input.Connection,
|
|
||||||
title="[OPTIONAL] UNet",
|
|
||||||
ui_order=5,
|
|
||||||
)
|
|
||||||
image: Optional[ImageField] = InputField(
|
image: Optional[ImageField] = InputField(
|
||||||
default=None,
|
default=None,
|
||||||
description="OPTIONAL: If the Unet is a specialized Inpainting model, masked_latents will be generated from the image with the VAE",
|
description="OPTIONAL: Only connect for specialized Inpainting models, masked_latents will be generated from the image with the VAE",
|
||||||
title="[OPTIONAL] Image",
|
title="[OPTIONAL] Image",
|
||||||
ui_order=6
|
ui_order=6
|
||||||
)
|
)
|
||||||
vae: Optional[VAEField] = InputField(
|
vae: Optional[VAEField] = InputField(
|
||||||
default=None,
|
default=None,
|
||||||
description="OPTIONAL: If the Unet is a specialized Inpainting model, masked_latents will be generated from the image with the VAE",
|
description="OPTIONAL: Only connect for specialized Inpainting models, masked_latents will be generated from the image with the VAE",
|
||||||
title="[OPTIONAL] VAE",
|
title="[OPTIONAL] VAE",
|
||||||
input=Input.Connection,
|
input=Input.Connection,
|
||||||
ui_order=7
|
ui_order=7
|
||||||
@ -262,12 +255,8 @@ class CreateGradientMaskInvocation(BaseInvocation):
|
|||||||
|
|
||||||
masked_latents_name = None
|
masked_latents_name = None
|
||||||
# Check for Inpaint model and generate masked_latents
|
# Check for Inpaint model and generate masked_latents
|
||||||
if self.unet is not None and self.vae is not None and self.image is not None:
|
if self.vae is not None and self.image is not None:
|
||||||
#all three fields must be present at the same time
|
#both fields must be present at the same time
|
||||||
unet_info = context.models.load(self.unet.unet)
|
|
||||||
assert isinstance(unet_info.model, UNet2DConditionModel)
|
|
||||||
is_inpaint = unet_info.model.conv_in.in_channels == 9
|
|
||||||
if is_inpaint:
|
|
||||||
mask = blur_tensor
|
mask = blur_tensor
|
||||||
vae_info: LoadedModel = context.models.load(self.vae.vae)
|
vae_info: LoadedModel = context.models.load(self.vae.vae)
|
||||||
image = context.images.get_pil(self.image.image_name)
|
image = context.images.get_pil(self.image.image_name)
|
||||||
|
@ -175,16 +175,6 @@ export const buildCanvasInpaintGraph = async (
|
|||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: modelLoaderNodeId,
|
|
||||||
field: 'unet',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: INPAINT_CREATE_MASK,
|
|
||||||
field: 'unet',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: modelLoaderNodeId,
|
node_id: modelLoaderNodeId,
|
||||||
|
@ -200,16 +200,6 @@ export const buildCanvasOutpaintGraph = async (
|
|||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: modelLoaderNodeId,
|
|
||||||
field: 'unet',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: INPAINT_CREATE_MASK,
|
|
||||||
field: 'unet',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: modelLoaderNodeId,
|
node_id: modelLoaderNodeId,
|
||||||
|
@ -177,16 +177,6 @@ export const buildCanvasSDXLInpaintGraph = async (
|
|||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: modelLoaderNodeId,
|
|
||||||
field: 'unet',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: INPAINT_CREATE_MASK,
|
|
||||||
field: 'unet',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: modelLoaderNodeId,
|
node_id: modelLoaderNodeId,
|
||||||
|
@ -199,16 +199,6 @@ export const buildCanvasSDXLOutpaintGraph = async (
|
|||||||
field: 'unet',
|
field: 'unet',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
source: {
|
|
||||||
node_id: modelLoaderNodeId,
|
|
||||||
field: 'unet',
|
|
||||||
},
|
|
||||||
destination: {
|
|
||||||
node_id: INPAINT_CREATE_MASK,
|
|
||||||
field: 'unet',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
source: {
|
source: {
|
||||||
node_id: SDXL_MODEL_LOADER,
|
node_id: SDXL_MODEL_LOADER,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user