Go to OpenArt main site
Upload workflow

Shape cutout anime wallpaper workflow

5.0

0 reviews
8
3.8K
519
0
Description

(This template is used for Workflow Contest)

What this workflow does

This workflow is a fun proof of concept on how much you can do with just the default nodes. It will take an image with a segmentation map + a background and create one of those 3D effect anime wallpapers that was popular a few years ago.

How to use this workflow

Installation

This workflow uses a custom node for the segmentation map - the only custom node in the entire workflow.

To install it, download the file from the link below (open link - right click - save as) and place it into your "ComfyUI/custom_nodes" folder.

Link to custom node


If you're using ComfyUI standalone (downloaded the zip from the releases page), then please go to the folder where the `.bat` file is that you use to launch ComfyUI.

Shift-right click an empty area and click "Open PowerShell window here" then run the command below to install the two required packages.

.\python_embeded\python.exe -m pip install onnxruntime huggingface-hub


If you use conda/venv, you can activate your environment and install the requirements with pip directly (e.g. `pip install onnxruntime huggingface-hub`).

The first time the node runs will be a bit slow, as it has to download the segmentation net from huggingface.


Alternatively, you can replace the SimpleAnimeSeg ("Anime Segmentation") node with a different one that can create a mask from an existing image.

I thin both WAS suite and Impact-Pack have nodes that could work for this, though you might have to invert the output mask.

Input images

For the "Load Image (Shape template)" node, you will want to use an image of a white shape with a black background, and some padding around the edges. You can find two examples here:

- Hexagonv2.png

- Circlev2.png


Tips about this workflow

Please use an anime model that uses tags for prompting, or change the prompt to fit your model beforehand!

The seeds on all the samplers are set to fixed! I prefer to manually change them but you can set them back to "randomize".

You can do a final img2img on the image (the example with the circle uses this) but it will usually mess up the border of the 3D effect.


There are two nodes you can change to adjust the output (both colored pale blue):

  • Invert BG blur - controls whether the background or foreground is blurred. `Right click=>bypass` to change this
  • Seg map height cutoff - controls what part of the character is used for the 3D effect. You can adjust this if parts of the character image get cut off.


The "Character prompt" should be for a centered shot of the character! You can use tags like "upper body, cowboy shot, standing" for this. If parts of the character image are cut off in the original image, then they will also be cut off in the final image!

You can also add "simple background, [color] background" to make it easier to separate your character from the background.

Your "Background prompt" should not contain any characters. "scenery, outdoors, no humans" is usually enough to achieve this.

The prompts/samplers can be completely replaced, would you want to. The "compositing" part of the workflow takes two images - a 768x960 character image and a 2560x1440 background image. These resolutions are hardcoded as there's no default math nodes to calculate the offsets on-the-fly.

Discussion

(No comments yet)

Loading...

Author

1
519
8
3.8K

No reviews yet

  • - latest (9 months ago)

Primitive Nodes (41)

Note (1)

Reroute (39)

SimpleAnimeSeg (1)

Custom Nodes (63)

ComfyUI

  • - ImageToMask (5)

  • - MaskComposite (3)

  • - ImagePadForOutpaint (5)

  • - PreviewImage (9)

  • - MaskToImage (3)

  • - CropMask (1)

  • - ImageScale (5)

  • - ImageBlur (1)

  • - ImageScaleBy (1)

  • - ImageCrop (1)

  • - EmptyImage (1)

  • - ImageCompositeMasked (4)

  • - ImageBlend (2)

  • - InvertMask (2)

  • - VAEDecodeTiled (1)

  • - VAEDecode (1)

  • - EmptyLatentImage (2)

  • - VAELoader (1)

  • - LoadImage (1)

  • - CLIPTextEncode (4)

  • - LatentUpscaleBy (2)

  • - LoraLoader (1)

  • - CheckpointLoaderSimple (1)

  • - CLIPSetLastLayer (1)

  • - KSampler (4)

  • - SaveImage (1)

Checkpoints (1)

mix\exquisiteDetails_art.safetensors

LoRAs (1)

char\Huyao-v1.1.safetensors