Extended Outpaint(XL-Update)

5.0

2 reviews
94
13.7K
4.9K
31
Description

扩图工作流的一个升级版,基于XL的模型。

针对以下问题作出了改进:

色彩不统一,与原始图有色彩偏差,有明显边界,有多余的物体和人物,构图不够合理。。。。

其中我利用了差异扩散控制主体和背景的融合,来解决了色彩偏差和接缝明显等问题,没有主体的风景图一样适用,我做了自动识别。

这个升级版本更好的适用了真实拍摄的图片

或许你不需要管那么多 点击生成一键全自动化

--------------------------------------------------------------------------------------------------------------------


使用的模型:

CHECKPOINT

RealVisX V4.0

https://civitai.com/models/139562?modelVersionId=344487

Fooocus

https://huggingface.co/lllyasviel/fooocus_inpaint/tree/main

下载所有模型放置在ComfyUI/models/inpaint/路径下

IPAdapter

https://github.com/cubiq/ComfyUI_IPAdapter_plus

按照以上链接中的说明,下载和安装所有模型。

BiRefNet

https://huggingface.co/ViperYX/BiRefNet/tree/main

在以上链接下载以下5个模型,把模型放置在ComfyUI/models/BiRefNet/路径下

BiRefNet-ep480.pth

pvt_v2_b2.pth

pvt_v2_b5.pth

swin_base_patch4_window12_384_22kto1k.pth

swin_large_patch4_window12_384_22kto1k.pth

Lama

https://drive.google.com/drive/folders/1Aq0a4sybb3SRxi7j1e1_ZbBRjaWDdP9e

在以上链接下载 big-lama.pt模型 ,把模型放置在ComfyUI/models/lama/路径下


--------------------------------------------------------------------------------------------------------------------

https://space.bilibili.com/30671205

WeChat(微信):knowknow0

Node Diagram
Discussion
k
kdash9 months ago

amazing thanks! would it be possible for video as well you think?

N
Ning9 months ago

You've given a great inspiration.

🚀1
j
jx d8 months ago

how is the progress? I am very interested in video extensions, but my workflow is very ineffective

n
neng tung lee9 months ago

Error occurred when executing KSampler: too many values to unpack (expected 3)

?

thx


N
Ning9 months ago

sorry ~ Maybe it's because I supplied the wrong CHECKPOINT, but now it's been changed.RealVisX V4.0  

👍1
n
neng tung lee9 months ago

thx


s
seven9479 months ago

ning佬牛逼

👍1
N
Ning9 months ago

947大佬 你也牛逼的很~!!

(Edited)
Y
Yi Jan9 months ago

The above list of mask calculation nodes looks awesome, but the effect is limited. Most of the time, the main body will deform because it is too close to the edge. More deadly is that if the original image is of high resolution, the final output will blur the entire image.

N
Ning9 months ago

There are two Brightness & Contrast nodes, which can be adjusted to solve the issue of subject edge distortion.

The blurring problem can be addressed by adding a magnification correction function in the final output blend node.

Additionally, the edge distortion issue can be resolved by adjusting the extended parameters of the LAMA node.

(Edited)
N
Ning9 months ago

I made some adjustments based on your issues. Please download it again and try it. If you encounter any problems, continue to give me feedback.

Y
Yi Jan9 months ago

OK,thanks,I will try

H
Heewer Kwok9 months ago

怎么一张图只能抽一次卡

N
Ning9 months ago

可能是SEED值固定了    如果你需要一次很多张  重新下载新的版本  在RepeatLatentBatch更改批次数量

liushh8 months ago

Error occurred when executing LayerMask: BiRefNetUltra:

We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like hustvl/vitmatte-small-composition-1k is not the path to a directory containing a file named config.json.

Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.

👍2
k
kichinto8 months ago

download

https://huggingface.co/hustvl/vitmatte-base-composition-1k/tree/main

and put these files in \models\vitmatte

🔥1
🚀1
🎉1
👍1
👌1
❤️1
K
Kalpana Shrestha8 months ago

I am keep getting error

Error occurred when executing LayerMask: BiRefNetUltra:

We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like hustvl/vitmatte-small-composition-1k is not the path to a directory containing a file named config.json.

Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.

👍1
k
kichinto8 months ago

download

https://huggingface.co/hustvl/vitmatte-base-composition-1k/tree/main

and put these files in \models\vitmatte


👍2
🚀1
🔥1
❤️1
👌1
🎉1
p
peidong chang8 months ago

效果不错,一次跑通无报错

k
kichinto8 months ago

Thanks you i have successfully Render.

k
kichinto8 months ago

and i prefer this CHKPT model  https://civitai.com/models/277058?modelVersionId=489217

for better composition.

👍1
🎉1
👌1
🔥1
🚀1
❤️1

How long did it take you to finish the rendering?



M
Mohamed Oumoumad2 months ago

The way this workflow handles inpainting is very clever ! To first outpaint the pixels using another LaMa model to ensure color consistency then with masked attention for the IP adapter, it works really well even with higher resolutions. I still don't understand the need for that many nodes later on though, in any case, thanks for sharing probably the best inpainting workflow using SDXL !

d
darkingfury22 days ago

This is insanely good

Just make sure you have downloaded everything, yes every single file so you will get a result just like the above

also, you can try to add steps to 40 or more will also help to generate a better image

Author

3
30.4K
516
85.1K

Reviews

b

bucongming

4 months ago

🐂

C

Cenyon Ithilglan

6 months ago

Wow, so good

Versions (4)

  • - latest (9 months ago)

  • - v20240622-124406

  • - v20240622-124405

  • - v20240617-063240

Primitive Nodes (12)

DF_Divide (1)

DF_Sum (2)

DF_To_text_(Debug) (5)

Reroute (4)

Custom Nodes (76)

ComfyUI

  • - MaskToImage (8)

  • - ImageScaleBy (3)

  • - ImageToMask (6)

  • - ImageScale (4)

  • - GrowMask (3)

  • - InvertMask (3)

  • - PreviewImage (3)

  • - CheckpointLoaderSimple (1)

  • - CLIPTextEncode (2)

  • - VAEDecode (1)

  • - LoadImage (1)

  • - ImagePadForOutpaint (1)

  • - SplitImageWithAlpha (1)

  • - KSampler (1)

  • - DifferentialDiffusion (1)

  • - RepeatLatentBatch (1)

  • - SaveImage (1)

  • - easy compare (1)

  • - easy int (2)

  • - easy if (1)

  • - MaskBlur+ (1)

  • - ImpactSwitch (1)

  • - INPAINT_VAEEncodeInpaintConditioning (1)

  • - INPAINT_LoadFooocusInpaint (1)

  • - INPAINT_ApplyFooocusInpaint (1)

  • - GlobalSeed //Inspire (1)

  • - LayerUtility: ImageScaleRestore V2 (2)

  • - LayerUtility: GetColorTone (1)

  • - LayerUtility: TextBox (1)

  • - LayerUtility: GetImageSize (4)

  • - LayerMask: MaskBoxDetect (1)

  • - LayerUtility: ImageBlend (5)

  • - LayerColor: Brightness & Contrast (2)

  • - LayerUtility: LaMa (1)

  • - LayerMask: BiRefNetUltra (1)

  • - LayerMask: MaskPreview (1)

  • - IPAdapterUnifiedLoader (1)

  • - IPAdapterAdvanced (1)

  • - IPAdapterNoise (1)

  • - Paste By Mask (1)

  • - Image Blank (2)

Checkpoints (1)

realvisxlV40_v40Bakedvae.safetensors

LoRAs (0)