Code Monkey home page Code Monkey logo

clothes-swap-salvton-comfyui-workflow's Introduction

ComfyUI Workflow for Virtual Try-On Based on SAL-VTON

A ComfyUI Workflow for swapping clothes using SAL-VTON.

Generates backgrounds and swaps faces using Stable Diffusion 1.5 checkpoints.

Made with ๐Ÿ’š by the CozyMantis squad.

ComfyUI workflow to swap clothes

Dependencies:

Inputs you'll need

  • A model image (the person you want to put clothes on)
  • A garment product image (the clothes you want to put on the model)
  • Garment and model images should be close to 3:4 aspect ratio, and at least 768x1024 px.
  • (Optional) One or two portraits for face-swapping

Important

Make sure you own the rights to the images you use in this workflow. Do not use images that you do not have permission to use.

The SAL-VTON models have been trained on the VITON-HD dataset, so for best results you'll want:

  • images that have a white/light gray background
  • upper-body clothing items (tops, tshirts, bodysuits, etc.)
  • an input person standing up straight, pictured from the knees/thighs up.

To help with the first point, this workflow includes a background removal pre-processing step for the inputs.

Stage 1: Swap the clothes

This stage uses the Cozy SAL-VTON node to run the virtual try-on model on the input images. The model will swap the clothes from the garment product image onto the model image.

Node that SAL-VTON relies on landmark detection to align the garment and model images. The landmark coordinates will be auto-generated the first time you run the workflow. If needed, you can correct the fit by manually adjusting the landmark coordinates and re-running the workflow. Press the "Update Landmarks" button in the Cozy SAL-VTON node to bring up the landmark editor.

ComfyUI try-on node

Stage 2: Generate a background

Based on a text input, a background is generated for the dressed model using the following steps:

  • with an inpainting model, inpaint the background at full noise
  • with a regular model, do another pass at less noise on the background to add more details
  • with a regular model, do a very low noise pass on the entire image, to fix small artifacts without changing the cloth details

Stage 3: Optional face swap

Here we use IPAdapter and inpainting to swap the face of the model with the face provided in the input portraits. This step is optional and can be skipped if you don't have a virtual-influencer-type scenario.

More Good Stuff

Made with ๐Ÿ’š by the CozyMantis squad. Check out our ComfyUI nodes and workflows!


Cozy Portrait Animator - ComfyUI Nodes & Workflow To Animate A Face From A Single Image

Cozy Clothes Swap - Customizable ComfyUI Node For Fashion Try-on

Cozy Character Turnaround - Generate And Rotate Characters and Outfits with SD 1.5, SV3D, and IPAdapter - ComfyUI Workflow

Cozy Character Face Generator - ComfyUI SD 1.5 Workflow For Consistent Reference Sheets

Acknowledgements

Based on the excellent paper "Linking Garment With Person via Semantically Associated Landmarks for Virtual Try-On" by Keyu Yan, Tingwei Gao, HUI ZHANG, Chengjun Xie.

Licenses & Commercial Use

Please check licenses and terms of use for each of the nodes and models required by this workflow.

Misuse, Malicious Use, and Out-of-Scope Use

The workflow should not be used to intentionally create or disseminate images that create hostile or alienating environments for people. This includes generating images that people would foreseeably find disturbing, distressing, or offensive; or content that propagates historical or current stereotypes.

clothes-swap-salvton-comfyui-workflow's People

Contributors

gabidobo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

clothes-swap-salvton-comfyui-workflow's Issues

ComfyUI Manager import Failed

Hello! After trying to install the Cozy Human Parser nodes from the ComfyUI Manager, the nodes do not install and I receiva an "(Import Failed)" error in red while trying to reinstall the extention from "missing custom nodes" button.

Trouble getting the new IP adaptor nodes + other error in workflow

Had trouble as IP adaptor node and model nodes got changed..in the new version. Please correct same in your workflow in the gum road also. secondly the Human Parser Pascal.. can you give an alternative to run same in the current pipeline or else i need to do a face mask node and update it. As this is a paid version.. hope you can rectify and update all details on same.
image
Also the workflow needs to be updated in github for same with more examples on use cases.

Help Getting Started

I purchased your clothing swap workflow and custom nodes a while back and still haven't had a successful execution. I followed the install instructions and have found or replaced all the missing nodes in the workflow. There is a persistent error with the Human Parser. Is it possible to use a different parser/segmenter? Do you offer refunds? Maybe a getting started video would help.

How much memory is required?

Thanks for this amazing workflow. I'm wondering how much memory is required. I can swap the t-shirt and paint the background, but after that, I got "MemoryError: std::bad_alloc".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.