Nodes Browser
ComfyDeploy: How ComfyUI-ZeroShot-MTrans works in ComfyUI?
What is ComfyUI-ZeroShot-MTrans?
An unofficial ComfyUI custom node for [a/Zero-Shot Material Transfer from a Single Image](https://ttchengab.github.io/zest), Given an input image (e.g., a photo of an apple) and a single material exemplar image (e.g., a golden bowl), ZeST can transfer the gold material from the exemplar onto the apple with accurate lighting cues while making everything else consistent.
How to install it in ComfyDeploy?
Head over to the machine page
- Click on the "Create a new machine" button
- Select the
Edit
build steps - Add a new step -> Custom Node
- Search for
ComfyUI-ZeroShot-MTrans
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
ComfyUI-ZeroShot-MTrans: Zero-Shot Material Transfer from a Single Image
An unofficial ComfyUI custom node for ZeST(Zero-Shot Material Transfer from a Single Image)
Given an input image (e.g., a photo of an apple) and a single material exemplar image (e.g., a golden bowl), ZeST can transfer the gold material from the exemplar onto the apple with accurate lighting cues while making everything else consistent.
Explains
Refer to zest_workflow.json in this repo for quick start.
This node implenment the red rect area of paper figure. the illumination transfer, and make it an ComfyUI node. You can use any IPA and controlnet node as your wish.
The original ZeST demo code use IPA to extract the style of material, and control for depth information. Then, change the original image with illumination informaion of subject for better lighting style.
install
in ComfyUI Manager
or git clone to ComfyUI/custom_nodes
After restart ComfyUI
, the following custom node will be available.
dependences
- ControlNet
- IP-Adaptor
- Segment Anything Model
Input/Output
-
INPUT:
target_image
: the original image for inpaintsubject_mask
: themask
for inpaint, thismask
will be also used as input ofinpaint
nodebrighter
: default is 1, means no change- value < 1 , means darker the subject, useful when subject in high light
- value > 1, means brighter the subject, useful when subject in dark light
-
OUTPUT:
IMAGE
: image withsubject
in luminosity(grey) mode. used as input forinpaint
node
Tips
- for output, the subject in
middle grey
is prefered. for high light material, dark it; otherwise, brighter it. - for
material
image, suggest remove all backgroup, just keep the material you want. - use
IP-Adaptor
strength,controlnet
strength,brighter
to control the output 1st.
Workflow
You can download the zest_workflow.json from this repo for quickly start.
sample workflow
Image Input
Material Input
Temp Images
Mask
Subject Grayout
Output
Thanks to
- ZeST: Zero-Shot Material Transfer from a Single Image Paper
- ZeST official DEMO
- ZeST site
- ZeST official video
@article{cheng2024zest,
title={ZeST: Zero-Shot Material Transfer from a Single Image},
author={Cheng, Ta-Ying and Sharma, Prafull and Markham, Andrew and Trigoni, Niki and Jampani, Varun},
journal={arXiv preprint arXiv:2404.06425},
year={2024}
}