├── .gitignore ├── LICENSE ├── README.md ├── VisualCloze.png ├── __init__.py ├── add.png ├── app.py ├── configs ├── FLUX.1-dev │ ├── LICENSE.md │ ├── README.md │ ├── dev_grid.jpg │ └── tokenizer_2 │ │ └── spiece.model └── data │ └── visualcloze.yaml ├── data ├── __init__.py ├── data_reader.py ├── data_utils.py ├── dataset.py ├── degradation_toolkit │ ├── __init__.py │ ├── add_degradation_various.py │ ├── frost │ │ ├── frost1.png │ │ ├── frost2.png │ │ ├── frost3.png │ │ ├── frost4.jpg │ │ ├── frost5.jpg │ │ └── frost6.jpg │ ├── image_operators.py │ └── x_distortion │ │ ├── __init__.py │ │ ├── blur.py │ │ ├── brightness.py │ │ ├── compression.py │ │ ├── contrast.py │ │ ├── helper.py │ │ ├── noise.py │ │ ├── oversharpen.py │ │ ├── pixelate.py │ │ ├── quantization.py │ │ ├── saturate.py │ │ └── spatter.py ├── degradation_utils.py └── prefix_instruction.py ├── docs ├── DATASET.md └── INSTALL.md ├── exampleA.png ├── examples ├── __init__.py ├── degradation_toolkit │ ├── __init__.py │ ├── add_degradation_various.py │ ├── frost │ │ ├── frost1.png │ │ ├── frost2.png │ │ ├── frost3.png │ │ ├── frost4.jpg │ │ ├── frost5.jpg │ │ └── frost6.jpg │ ├── image_operators.py │ └── x_distortion │ │ ├── __init__.py │ │ ├── blur.py │ │ ├── brightness.py │ │ ├── compression.py │ │ ├── contrast.py │ │ ├── helper.py │ │ ├── noise.py │ │ ├── oversharpen.py │ │ ├── pixelate.py │ │ ├── quantization.py │ │ ├── saturate.py │ │ └── spatter.py ├── degradation_utils.py ├── examples │ ├── 012cd3921e1f97d761eeff580f918ff9 │ │ ├── 012cd3921e1f97d761eeff580f918ff9.jpg │ │ ├── 012cd3921e1f97d761eeff580f918ff9_ben2-background-removal.jpg │ │ ├── 012cd3921e1f97d761eeff580f918ff9_canny_100_200_512.jpg │ │ ├── 012cd3921e1f97d761eeff580f918ff9_depth-anything-v2_Large.jpg │ │ ├── 012cd3921e1f97d761eeff580f918ff9_dsine_normal_map.jpg │ │ ├── 012cd3921e1f97d761eeff580f918ff9_hed_512.jpg │ │ └── 012cd3921e1f97d761eeff580f918ff9_sam2_mask.jpg │ ├── 0fdaecdb7906a1bf0d6e202363f15de3 │ │ ├── 0fdaecdb7906a1bf0d6e202363f15de3.jpg │ │ ├── 0fdaecdb7906a1bf0d6e202363f15de3_instantx-style_0.jpg │ │ ├── 0fdaecdb7906a1bf0d6e202363f15de3_instantx-style_0_style.jpg │ │ └── 0fdaecdb7906a1bf0d6e202363f15de3_qwen2_5_mask.jpg │ ├── 10d7dcae5240b8cc8c9427e876b4f462 │ │ ├── 10d7dcae5240b8cc8c9427e876b4f462.jpg │ │ ├── 10d7dcae5240b8cc8c9427e876b4f462_instantx-style_0.jpg │ │ ├── 10d7dcae5240b8cc8c9427e876b4f462_instantx-style_0_style.jpg │ │ └── 10d7dcae5240b8cc8c9427e876b4f462_qwen2_5_mask.jpg │ ├── 2b74476568f7562a6aa832d423132ed3 │ │ ├── 2b74476568f7562a6aa832d423132ed3.jpg │ │ ├── 2b74476568f7562a6aa832d423132ed3_canny_100_200_512.jpg │ │ ├── 2b74476568f7562a6aa832d423132ed3_depth-anything-v2_Large.jpg │ │ ├── 2b74476568f7562a6aa832d423132ed3_dsine_normal_map.jpg │ │ ├── 2b74476568f7562a6aa832d423132ed3_hed_512.jpg │ │ ├── 2b74476568f7562a6aa832d423132ed3_openpose_fullres_nohand.jpg │ │ └── 2b74476568f7562a6aa832d423132ed3_sam2_mask.jpg │ ├── 2c4e256fa512cb7e7f433f4c7f9101de │ │ ├── 2c4e256fa512cb7e7f433f4c7f9101de.jpg │ │ ├── 2c4e256fa512cb7e7f433f4c7f9101de_ben2-background-removal.jpg │ │ ├── 2c4e256fa512cb7e7f433f4c7f9101de_canny_100_200_512.jpg │ │ ├── 2c4e256fa512cb7e7f433f4c7f9101de_depth-anything-v2_Large.jpg │ │ ├── 2c4e256fa512cb7e7f433f4c7f9101de_dsine_normal_map.jpg │ │ ├── 2c4e256fa512cb7e7f433f4c7f9101de_hed_512.jpg │ │ ├── 2c4e256fa512cb7e7f433f4c7f9101de_instantx-style_0.jpg │ │ ├── 2c4e256fa512cb7e7f433f4c7f9101de_instantx-style_0_style.jpg │ │ └── 2c4e256fa512cb7e7f433f4c7f9101de_sam2_mask.jpg │ ├── 53b3f413257bee9e499b823b44623b1a │ │ ├── 53b3f413257bee9e499b823b44623b1a.jpg │ │ ├── 53b3f413257bee9e499b823b44623b1a_ben2-background-removal.jpg │ │ ├── 53b3f413257bee9e499b823b44623b1a_canny_100_200_512.jpg │ │ ├── 53b3f413257bee9e499b823b44623b1a_depth-anything-v2_Large.jpg │ │ ├── 53b3f413257bee9e499b823b44623b1a_dsine_normal_map.jpg │ │ ├── 53b3f413257bee9e499b823b44623b1a_hed_512.jpg │ │ ├── 53b3f413257bee9e499b823b44623b1a_instantx-style_0.jpg │ │ ├── 53b3f413257bee9e499b823b44623b1a_instantx-style_0_style.jpg │ │ └── 53b3f413257bee9e499b823b44623b1a_sam2_mask.jpg │ ├── 5bf755ed9dbb9b3e223e7ba35232b06e │ │ ├── 5bf755ed9dbb9b3e223e7ba35232b06e.jpg │ │ ├── 5bf755ed9dbb9b3e223e7ba35232b06e_ben2-background-removal.jpg │ │ ├── 5bf755ed9dbb9b3e223e7ba35232b06e_canny_100_200_512.jpg │ │ ├── 5bf755ed9dbb9b3e223e7ba35232b06e_depth-anything-v2_Large.jpg │ │ ├── 5bf755ed9dbb9b3e223e7ba35232b06e_dsine_normal_map.jpg │ │ └── 5bf755ed9dbb9b3e223e7ba35232b06e_hed_512.jpg │ ├── 78dc6506367d7aa43fe42a898abbfe4a │ │ ├── 78dc6506367d7aa43fe42a898abbfe4a.jpg │ │ ├── 78dc6506367d7aa43fe42a898abbfe4a_ben2-background-removal.jpg │ │ ├── 78dc6506367d7aa43fe42a898abbfe4a_canny_100_200_512.jpg │ │ ├── 78dc6506367d7aa43fe42a898abbfe4a_depth-anything-v2_Large.jpg │ │ ├── 78dc6506367d7aa43fe42a898abbfe4a_dsine_normal_map.jpg │ │ ├── 78dc6506367d7aa43fe42a898abbfe4a_edge.jpg │ │ ├── 78dc6506367d7aa43fe42a898abbfe4a_hed_512.jpg │ │ ├── 78dc6506367d7aa43fe42a898abbfe4a_instantx-style_0.jpg │ │ ├── 78dc6506367d7aa43fe42a898abbfe4a_instantx-style_0_style.jpg │ │ ├── 78dc6506367d7aa43fe42a898abbfe4a_openpose_fullres_nohand.jpg │ │ └── 78dc6506367d7aa43fe42a898abbfe4a_sam2_mask.jpg │ ├── 79f2ee632f1be3ad64210a641c4e201b │ │ ├── 79f2ee632f1be3ad64210a641c4e201b.jpg │ │ ├── 79f2ee632f1be3ad64210a641c4e201b_ben2-background-removal.jpg │ │ ├── 79f2ee632f1be3ad64210a641c4e201b_canny_100_200_512.jpg │ │ ├── 79f2ee632f1be3ad64210a641c4e201b_depth-anything-v2_Large.jpg │ │ ├── 79f2ee632f1be3ad64210a641c4e201b_dsine_normal_map.jpg │ │ ├── 79f2ee632f1be3ad64210a641c4e201b_hed_512.jpg │ │ ├── 79f2ee632f1be3ad64210a641c4e201b_instantx-style_0.jpg │ │ ├── 79f2ee632f1be3ad64210a641c4e201b_instantx-style_0_style.jpg │ │ └── 79f2ee632f1be3ad64210a641c4e201b_sam2_mask.jpg │ ├── 88d0ba30e2c0bc4401cf2633cac162d4 │ │ ├── 88d0ba30e2c0bc4401cf2633cac162d4.jpg │ │ ├── 88d0ba30e2c0bc4401cf2633cac162d4_ben2-background-removal.jpg │ │ ├── 88d0ba30e2c0bc4401cf2633cac162d4_canny_100_200_512.jpg │ │ ├── 88d0ba30e2c0bc4401cf2633cac162d4_depth-anything-v2_Large.jpg │ │ ├── 88d0ba30e2c0bc4401cf2633cac162d4_dsine_normal_map.jpg │ │ ├── 88d0ba30e2c0bc4401cf2633cac162d4_hed_512.jpg │ │ ├── 88d0ba30e2c0bc4401cf2633cac162d4_instantx-style_0.jpg │ │ ├── 88d0ba30e2c0bc4401cf2633cac162d4_instantx-style_0_style.jpg │ │ ├── 88d0ba30e2c0bc4401cf2633cac162d4_openpose_fullres_nohand.jpg │ │ └── 88d0ba30e2c0bc4401cf2633cac162d4_sam2_mask.jpg │ ├── 93bc1c43af2d6c91ac2fc966bf7725a2 │ │ ├── 93bc1c43af2d6c91ac2fc966bf7725a2.jpg │ │ ├── 93bc1c43af2d6c91ac2fc966bf7725a2_ben2-background-removal.jpg │ │ ├── 93bc1c43af2d6c91ac2fc966bf7725a2_canny_100_200_512.jpg │ │ ├── 93bc1c43af2d6c91ac2fc966bf7725a2_depth-anything-v2_Large.jpg │ │ ├── 93bc1c43af2d6c91ac2fc966bf7725a2_dsine_normal_map.jpg │ │ ├── 93bc1c43af2d6c91ac2fc966bf7725a2_hed_512.jpg │ │ ├── 93bc1c43af2d6c91ac2fc966bf7725a2_openpose_fullres_nohand.jpg │ │ └── 93bc1c43af2d6c91ac2fc966bf7725a2_sam2_mask.jpg │ ├── 9c565b1aad76b22f5bb836744a93561a │ │ ├── 9c565b1aad76b22f5bb836744a93561a.jpg │ │ ├── 9c565b1aad76b22f5bb836744a93561a_ben2-background-removal.jpg │ │ ├── 9c565b1aad76b22f5bb836744a93561a_canny_100_200_512.jpg │ │ ├── 9c565b1aad76b22f5bb836744a93561a_depth-anything-v2_Large.jpg │ │ ├── 9c565b1aad76b22f5bb836744a93561a_dsine_normal_map.jpg │ │ ├── 9c565b1aad76b22f5bb836744a93561a_hed_512.jpg │ │ └── 9c565b1aad76b22f5bb836744a93561a_sam2_mask.jpg │ ├── 9d39f75f1f728e097efeaff39acb4710 │ │ ├── 9d39f75f1f728e097efeaff39acb4710.jpg │ │ ├── 9d39f75f1f728e097efeaff39acb4710_ben2-background-removal.jpg │ │ ├── 9d39f75f1f728e097efeaff39acb4710_canny_100_200_512.jpg │ │ ├── 9d39f75f1f728e097efeaff39acb4710_depth-anything-v2_Large.jpg │ │ ├── 9d39f75f1f728e097efeaff39acb4710_dsine_normal_map.jpg │ │ ├── 9d39f75f1f728e097efeaff39acb4710_hed_512.jpg │ │ └── 9d39f75f1f728e097efeaff39acb4710_sam2_mask.jpg │ ├── de5a8b250bf407aa7e04913562dcba90 │ │ ├── de5a8b250bf407aa7e04913562dcba90.jpg │ │ ├── de5a8b250bf407aa7e04913562dcba90_ben2-background-removal.jpg │ │ ├── de5a8b250bf407aa7e04913562dcba90_canny_100_200_512.jpg │ │ ├── de5a8b250bf407aa7e04913562dcba90_depth-anything-v2_Large.jpg │ │ ├── de5a8b250bf407aa7e04913562dcba90_dsine_normal_map.jpg │ │ ├── de5a8b250bf407aa7e04913562dcba90_hed_512.jpg │ │ └── de5a8b250bf407aa7e04913562dcba90_sam2_mask.jpg │ ├── env │ │ ├── 1_source.jpg │ │ ├── 1_target.jpg │ │ ├── 2_source.jpg │ │ ├── 2_target.jpg │ │ ├── 3_source.jpg │ │ └── 3_target.jpg │ ├── face │ │ ├── 2ef6aa5a-e751-4bf2-a302-0237ab460627 │ │ │ ├── face_1.jpg │ │ │ ├── face_6.jpg │ │ │ └── face_8.jpg │ │ ├── 34e1633a-369f-4324-86c3-3e6418ec00be │ │ │ ├── face_0.jpg │ │ │ ├── face_1.jpg │ │ │ └── face_2.jpg │ │ └── cb5d403a-f1bb-4392-8302-24846893a797 │ │ │ ├── face_0.jpg │ │ │ ├── face_1.jpg │ │ │ └── face_2.jpg │ ├── graph200k │ │ ├── data-00004-of-00022-7170 │ │ │ ├── data-00004-of-00022-7170_canny_100_200_512.jpg │ │ │ ├── data-00004-of-00022-7170_depth-anything-v2_Large.jpg │ │ │ ├── data-00004-of-00022-7170_dsine-normal-map.jpg │ │ │ ├── data-00004-of-00022-7170_hed_512.jpg │ │ │ ├── data-00004-of-00022-7170_instantx-style_0.jpg │ │ │ ├── data-00004-of-00022-7170_instantx-style_0_style.jpg │ │ │ ├── data-00004-of-00022-7170_reference.jpg │ │ │ ├── data-00004-of-00022-7170_sam2_mask.jpg │ │ │ └── data-00004-of-00022-7170_target.jpg │ │ ├── data-00005-of-00022-4396 │ │ │ ├── data-00005-of-00022-4396_canny_100_200_512.jpg │ │ │ ├── data-00005-of-00022-4396_depth-anything-v2_Large.jpg │ │ │ ├── data-00005-of-00022-4396_dsine-normal-map.jpg │ │ │ ├── data-00005-of-00022-4396_hed_512.jpg │ │ │ ├── data-00005-of-00022-4396_instantx-style_0.jpg │ │ │ ├── data-00005-of-00022-4396_instantx-style_0_style.jpg │ │ │ ├── data-00005-of-00022-4396_reference.jpg │ │ │ ├── data-00005-of-00022-4396_sam2_mask.jpg │ │ │ └── data-00005-of-00022-4396_target.jpg │ │ ├── data-00013-of-00022-4696 │ │ │ ├── data-00013-of-00022-4696_canny_100_200_512.jpg │ │ │ ├── data-00013-of-00022-4696_depth-anything-v2_Large.jpg │ │ │ ├── data-00013-of-00022-4696_dsine-normal-map.jpg │ │ │ ├── data-00013-of-00022-4696_hed_512.jpg │ │ │ ├── data-00013-of-00022-4696_instantx-style_0.jpg │ │ │ ├── data-00013-of-00022-4696_instantx-style_0_style.jpg │ │ │ ├── data-00013-of-00022-4696_reference.jpg │ │ │ ├── data-00013-of-00022-4696_sam2_mask.jpg │ │ │ └── data-00013-of-00022-4696_target.jpg │ │ ├── data-00017-of-00022-8377 │ │ │ ├── data-00017-of-00022-8377_canny_100_200_512.jpg │ │ │ ├── data-00017-of-00022-8377_depth-anything-v2_Large.jpg │ │ │ ├── data-00017-of-00022-8377_dsine-normal-map.jpg │ │ │ ├── data-00017-of-00022-8377_hed_512.jpg │ │ │ ├── data-00017-of-00022-8377_instantx-style_0.jpg │ │ │ ├── data-00017-of-00022-8377_instantx-style_0_style.jpg │ │ │ ├── data-00017-of-00022-8377_reference.jpg │ │ │ ├── data-00017-of-00022-8377_sam2_mask.jpg │ │ │ └── data-00017-of-00022-8377_target.jpg │ │ ├── data-00018-of-00022-4948 │ │ │ ├── data-00018-of-00022-4948_canny_100_200_512.jpg │ │ │ ├── data-00018-of-00022-4948_depth-anything-v2_Large.jpg │ │ │ ├── data-00018-of-00022-4948_dsine-normal-map.jpg │ │ │ ├── data-00018-of-00022-4948_hed_512.jpg │ │ │ ├── data-00018-of-00022-4948_instantx-style_0.jpg │ │ │ ├── data-00018-of-00022-4948_instantx-style_0_style.jpg │ │ │ ├── data-00018-of-00022-4948_reference.jpg │ │ │ ├── data-00018-of-00022-4948_sam2_mask.jpg │ │ │ └── data-00018-of-00022-4948_target.jpg │ │ └── editing │ │ │ ├── data-00004-of-00022-3633 │ │ │ ├── data-00004-of-00022-3633_qwen_subject_replacement_1737373818845_1.jpg │ │ │ ├── data-00004-of-00022-3633_reference.jpg │ │ │ └── data-00004-of-00022-3633_target.jpg │ │ │ ├── data-00004-of-00022-5419 │ │ │ ├── data-00004-of-00022-5419_qwen_subject_replacement_1737377830929_2.jpg │ │ │ ├── data-00004-of-00022-5419_reference.jpg │ │ │ └── data-00004-of-00022-5419_target.jpg │ │ │ └── data-00012-of-00022-8475 │ │ │ ├── data-00012-of-00022-8475_qwen_subject_replacement_1737410088010_2.jpg │ │ │ ├── data-00012-of-00022-8475_reference.jpg │ │ │ └── data-00012-of-00022-8475_target.jpg │ ├── omniedit │ │ ├── task_obj_add_273266.jpg │ │ ├── task_obj_add_273266_edit.jpg │ │ ├── task_obj_add_528329.jpg │ │ ├── task_obj_add_528329_edit.jpg │ │ ├── task_obj_remove_855511.jpg │ │ └── task_obj_remove_855511_edit.jpg │ ├── photodoodle │ │ ├── sksedgeeffect │ │ │ ├── 1.jpg │ │ │ ├── 1_blend.jpg │ │ │ ├── 34.jpg │ │ │ └── 34_blend.jpg │ │ ├── sksmagiceffects │ │ │ ├── 24.jpg │ │ │ ├── 24_blend.jpg │ │ │ ├── 29.jpg │ │ │ ├── 29_blend.jpg │ │ │ ├── 50.jpg │ │ │ └── 50_blend.jpg │ │ ├── sksmonstercalledlulu │ │ │ ├── 5.jpg │ │ │ ├── 5_blend.jpg │ │ │ ├── 6.jpg │ │ │ ├── 6_blend.jpg │ │ │ ├── 9.jpg │ │ │ └── 9_blend.jpg │ │ └── skspaintingeffects │ │ │ ├── 12.jpg │ │ │ ├── 12_blend.jpg │ │ │ ├── 35.jpg │ │ │ ├── 35_blend.jpg │ │ │ ├── 37.jpg │ │ │ └── 37_blend.jpg │ ├── property │ │ ├── 1_source.jpg │ │ ├── 1_target.jpg │ │ ├── 2_source.jpg │ │ ├── 2_target.jpg │ │ ├── 3_source.jpg │ │ └── 3_target.jpg │ ├── relighting │ │ ├── 02aee2a8df8f6e6f16ca4ec278203543656cecf1.jpg │ │ ├── 02aee2a8df8f6e6f16ca4ec278203543656cecf1_Left.jpg │ │ ├── 02af06c41208b31248e94da13166a675c862b003.jpg │ │ ├── 02af06c41208b31248e94da13166a675c862b003_Left.jpg │ │ ├── 02af9925c86c22b379e4e6d4f2762d66966ee281.jpg │ │ ├── 02af9925c86c22b379e4e6d4f2762d66966ee281_Left.jpg │ │ ├── 02af99b6765a77a8f2ac87aa42d2f2453dcd590f.jpg │ │ ├── 02af99b6765a77a8f2ac87aa42d2f2453dcd590f_Left.jpg │ │ ├── 02af9fa52ff41e64de8e3212683c9ed43bd91010.jpg │ │ ├── 02af9fa52ff41e64de8e3212683c9ed43bd91010_Left.jpg │ │ ├── 02af9fa52ff41e64de8e3212683c9ed43bd91010_depth.jpg │ │ ├── 02afbcf084a1e35bda34c26d2271d56b6a1c621e.jpg │ │ ├── 02afbcf084a1e35bda34c26d2271d56b6a1c621e_Left.jpg │ │ ├── 02b02e2916bf2eb3608f5a806dc3b7ecbed3b649.jpg │ │ ├── 02b02e2916bf2eb3608f5a806dc3b7ecbed3b649_Left.jpg │ │ ├── 02c02535d741e8800bf5fca514a85c29f7b4d115.jpg │ │ ├── 02c02535d741e8800bf5fca514a85c29f7b4d115_Left.jpg │ │ ├── 02c032354830e33b94b50dee9a55113d91dae87b.jpg │ │ ├── 02c032354830e33b94b50dee9a55113d91dae87b_Left.jpg │ │ ├── 02c0359af5386b96429b8239783921088e007347.jpg │ │ ├── 02c0359af5386b96429b8239783921088e007347_Left.jpg │ │ ├── 02c063fcc7f36018f6b55d26c6d4e05d43474d70.jpg │ │ ├── 02c063fcc7f36018f6b55d26c6d4e05d43474d70_Left.jpg │ │ ├── 02c3760bf08f00d9e2163248e2864f5e1a70d709.jpg │ │ ├── 02c3760bf08f00d9e2163248e2864f5e1a70d709_Left.jpg │ │ ├── 02c39e8e82f4be91d24252c8bfbfdef033ec8a32.jpg │ │ ├── 02c39e8e82f4be91d24252c8bfbfdef033ec8a32_Left.jpg │ │ ├── 02c466ad25faefb2a8bbe84d20d5ca1beb323a6d.jpg │ │ ├── 02c466ad25faefb2a8bbe84d20d5ca1beb323a6d_Left.jpg │ │ ├── 02c5200cac1d0f19256232a09708ac47f6ddfab3.jpg │ │ ├── 02c5200cac1d0f19256232a09708ac47f6ddfab3_Left.jpg │ │ ├── 02c53f12ec3d4a9a16d9b0ca3f7773ad2222100c.jpg │ │ ├── 02c53f12ec3d4a9a16d9b0ca3f7773ad2222100c_Left.jpg │ │ ├── 02c5cc03d46ce15494caaf3d65a2b2c7e09089f2.jpg │ │ ├── 02c5cc03d46ce15494caaf3d65a2b2c7e09089f2_Left.jpg │ │ ├── 02c6c0f92a672110ff86bd12f4aa0d0083c9cf6b.jpg │ │ ├── 02c6c0f92a672110ff86bd12f4aa0d0083c9cf6b_Left.jpg │ │ ├── 02c73157a981e0ee669ca8125018efbdda1e1483.jpg │ │ ├── 02c73157a981e0ee669ca8125018efbdda1e1483_Left.jpg │ │ ├── 02c77b643fbdaec82912634655426553f3d7a537.jpg │ │ ├── 02c77b643fbdaec82912634655426553f3d7a537_Left.jpg │ │ ├── 02c7df6c0decd3d542e25089a0af6afe1e070b6a.jpg │ │ ├── 02c7df6c0decd3d542e25089a0af6afe1e070b6a_Left.jpg │ │ ├── 02daa50ac59bb9eabcbe0d5304af880d941bffc3.jpg │ │ ├── 02daa50ac59bb9eabcbe0d5304af880d941bffc3_Left.jpg │ │ ├── 02daa93f44c11ebbe5942cc0b781c12e125a6c65.jpg │ │ ├── 02daa93f44c11ebbe5942cc0b781c12e125a6c65_Left.jpg │ │ ├── 02dac14fc596c51077015d280ea564faa1f735b5.jpg │ │ ├── 02dac14fc596c51077015d280ea564faa1f735b5_Left.jpg │ │ ├── 02dad6943d2033198a89c1d5f222db2eacb293c6.jpg │ │ ├── 02dad6943d2033198a89c1d5f222db2eacb293c6_Left.jpg │ │ ├── 02dad6943d2033198a89c1d5f222db2eacb293c6_depth.jpg │ │ ├── 02dafead46f6d59172d8df216c1f5ad11f9899b5.jpg │ │ ├── 02dafead46f6d59172d8df216c1f5ad11f9899b5_Left.jpg │ │ ├── 02db22466eb3bc19d6a10195e1b48fff696c1582.jpg │ │ ├── 02db22466eb3bc19d6a10195e1b48fff696c1582_Left.jpg │ │ ├── 02db31cb32e74620523955b70807b3e11815451c.jpg │ │ ├── 02db31cb32e74620523955b70807b3e11815451c_Left.jpg │ │ ├── 02db31cb32e74620523955b70807b3e11815451c_depth.jpg │ │ ├── 02db5a81c222483058fecd76d62c5f7246b06ee4.jpg │ │ ├── 02db5a81c222483058fecd76d62c5f7246b06ee4_Left.jpg │ │ ├── 02db80670789cc6722f78747cf6ab8c292a898ab.jpg │ │ ├── 02db80670789cc6722f78747cf6ab8c292a898ab_Left.jpg │ │ ├── 02db8a5f38464943d496bd3b475c36a3d65e7095.jpg │ │ ├── 02db8a5f38464943d496bd3b475c36a3d65e7095_Left.jpg │ │ ├── 02db96d3ce2531dc4d51dda52492b78cf3577c56.jpg │ │ ├── 02db96d3ce2531dc4d51dda52492b78cf3577c56_Left.jpg │ │ ├── 02dc3e2cf9541a7d7ebff79cbf1fb0d95b4911e8.jpg │ │ ├── 02dc3e2cf9541a7d7ebff79cbf1fb0d95b4911e8_Left.jpg │ │ ├── 02dc42496c4ffdb2a8e101ed82943b26fc2d9d24.jpg │ │ ├── 02dc42496c4ffdb2a8e101ed82943b26fc2d9d24_Left.jpg │ │ ├── 02dc4ebfd90dc80dbc0f4174679ff3828605ec9c.jpg │ │ ├── 02dc4ebfd90dc80dbc0f4174679ff3828605ec9c_Left.jpg │ │ ├── 02dc6ca122863a582306a4f146b7bccb721a49e0.jpg │ │ ├── 02dc6ca122863a582306a4f146b7bccb721a49e0_Left.jpg │ │ ├── 02dca7ccfad757fd596d33563d06b3ab7836d5af.jpg │ │ ├── 02dca7ccfad757fd596d33563d06b3ab7836d5af_Left.jpg │ │ ├── 02dcc762ae13127e3975ec043f13342490f61cf8.jpg │ │ ├── 02dcc762ae13127e3975ec043f13342490f61cf8_Left.jpg │ │ ├── 02dcc762ae13127e3975ec043f13342490f61cf8_depth.jpg │ │ ├── 02dcd82122ffe344c8d7c289dc770febb5121153.jpg │ │ ├── 02dcd82122ffe344c8d7c289dc770febb5121153_Left.jpg │ │ ├── 02dd0f49dceaf611e0173319e26b4e6e1b7a6dd4.jpg │ │ ├── 02dd0f49dceaf611e0173319e26b4e6e1b7a6dd4_Left.jpg │ │ ├── 02dd0f49dceaf611e0173319e26b4e6e1b7a6dd4_depth.jpg │ │ ├── 02dd1c7c81e77e22ddba378a121fc371afcc9657.jpg │ │ ├── 02dd1c7c81e77e22ddba378a121fc371afcc9657_Left.jpg │ │ ├── 02dd1c7c81e77e22ddba378a121fc371afcc9657_depth.jpg │ │ ├── 02dd6a91d0d1d17a9f06e999654b541b555da242.jpg │ │ ├── 02dd6a91d0d1d17a9f06e999654b541b555da242_Left.jpg │ │ ├── 02dd6f77ccab6d63e7f2d7795f5d03180b46621c.jpg │ │ ├── 02dd6f77ccab6d63e7f2d7795f5d03180b46621c_Left.jpg │ │ ├── 02dd6f77ccab6d63e7f2d7795f5d03180b46621c_Left_2.jpg │ │ ├── 02dd79a669a4522f1d5631d75c14243f927848b8.jpg │ │ ├── 02dd79a669a4522f1d5631d75c14243f927848b8_Left.jpg │ │ ├── 02dd9913f85a62d9c1587b00f610cc753ebad649.jpg │ │ └── 02dd9913f85a62d9c1587b00f610cc753ebad649_Left.jpg │ └── tryon │ │ ├── 00555_00.jpg │ │ ├── 00555_00_tryon_catvton_0.jpg │ │ ├── 00700_00.jpg │ │ ├── 00700_00_tryon_catvton_0.jpg │ │ ├── 03673_00.jpg │ │ └── 12265_00.jpg ├── gradio_tasks.py ├── gradio_tasks_editing.py ├── gradio_tasks_editing_subject.py ├── gradio_tasks_photodoodle.py ├── gradio_tasks_relighting.py ├── gradio_tasks_restoration.py ├── gradio_tasks_style.py ├── gradio_tasks_subject.py ├── gradio_tasks_tryon.py ├── gradio_tasks_unseen.py └── prefix_instruction.py ├── exps ├── sample.sh └── train.sh ├── figures ├── consolidate.jpg ├── face.jpg ├── graph200k.jpg ├── reverse.jpg ├── seen.jpg ├── unseen.jpg └── visualcloze.png ├── inference.py ├── model_utils.py ├── models ├── __init__.py ├── api.py ├── math.py ├── model.py ├── modules │ ├── autoencoder.py │ ├── conditioner.py │ ├── image_embedders.py │ ├── layers.py │ └── lora.py ├── sampling.py └── util.py ├── processing.py ├── pyproject.toml ├── sample.py ├── train.py ├── transport ├── __init__.py ├── integrators.py ├── path.py ├── transport.py └── utils.py ├── util ├── imgproc.py ├── misc.py └── parallel.py ├── visualcloze.py ├── visualcloze_node.py └── visualcloze_wrapper.py /.gitignore: -------------------------------------------------------------------------------- 1 | batch* 2 | phoe* 3 | *gt* 4 | *__pycache__* 5 | *ocr* 6 | *.pyc 7 | *.pyo 8 | *.pyd 9 | *.txt 10 | *.json 11 | .gradio 12 | output 13 | gradio_cache 14 | __pycache__ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 smthemex 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [VisualCloze](https://github.com/lzyhha/VisualCloze): A Universal Image Generation Framework via Visual In-Context Learning 2 | 3 | # Tips 4 | * 量化fp8的模式始终跑不出效果,官方的diffuser版本暂时没空捣鼓,先放代码出来,免得说占坑。方法需要的显存较大,内存也要64+,24显存可以试试关闭cpu offload 5 | 6 | 1.Installation 7 | ----- 8 | In the ./ComfyUI /custom_node directory, run the following: 9 | ``` 10 | git clone https://github.com/smthemex/ComfyUI_VisualCloze.git 11 | ``` 12 | 13 | 2.requirements 14 | ---- 15 | ``` 16 | pip install -r requirements.txt 17 | ``` 18 | 19 | 3 models 20 | ---- 21 | [lora 384](https://huggingface.co/VisualCloze/VisualClozePipeline-LoRA-384/tree/main) or [lora 512](https://huggingface.co/VisualCloze/VisualClozePipeline-LoRA-512/tree/main) 22 | ``` 23 | ├── ComfyUI/models/loras/ 24 | | ├── visualcloze-lora-512.safetensors # or 384 25 | ├── ComfyUI/models/diffusion_models/ 26 | | ├── flux1-fill-dev.safetensors # or flux1-fill-dev-fp8.safetensors 27 | ``` 28 | 29 | # Example 30 | ![](https://github.com/smthemex/ComfyUI_VisualCloze/blob/main/add.png) 31 | ![](https://github.com/smthemex/ComfyUI_VisualCloze/blob/main/exampleA.png) 32 | ![](https://github.com/smthemex/ComfyUI_VisualCloze/blob/main/VisualCloze.png) 33 | 34 | # Citation 35 | ``` 36 | @article{li2025visualcloze, 37 | title={VisualCloze : A Universal Image Generation Framework via Visual In-Context Learning}, 38 | author={Li, Zhong-Yu and Du, Ruoyi and Yan, Juncheng and Zhuo, Le and Li, Zhen and Gao, Peng and Ma, Zhanyu and Cheng, Ming-Ming}, 39 | journal={arXiv preprint arxiv:}, 40 | year={2025} 41 | } 42 | ``` 43 | -------------------------------------------------------------------------------- /VisualCloze.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/VisualCloze.png -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- 1 | 2 | from .visualcloze_node import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS 3 | 4 | __all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS'] 5 | -------------------------------------------------------------------------------- /add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/add.png -------------------------------------------------------------------------------- /configs/FLUX.1-dev/dev_grid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/configs/FLUX.1-dev/dev_grid.jpg -------------------------------------------------------------------------------- /configs/FLUX.1-dev/tokenizer_2/spiece.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/configs/FLUX.1-dev/tokenizer_2/spiece.model -------------------------------------------------------------------------------- /configs/data/visualcloze.yaml: -------------------------------------------------------------------------------- 1 | META: 2 | - 3 | path: "dataset/test/data.json" 4 | type: 'image_grid_graph200k' -------------------------------------------------------------------------------- /data/__init__.py: -------------------------------------------------------------------------------- 1 | from .dataset import * 2 | from .prefix_instruction import * 3 | from .data_utils import * 4 | from .data_reader import * -------------------------------------------------------------------------------- /data/data_utils.py: -------------------------------------------------------------------------------- 1 | import torch 2 | from data.prefix_instruction import degradation_list 3 | 4 | 5 | def check_item_graph200k(data, image_type_list): 6 | valid = True 7 | 8 | for image_type in image_type_list: 9 | if not valid: 10 | return valid 11 | if image_type in [ 12 | "target", 13 | "mask", "bbox", 14 | "canny", "depth", "hed", "normal", "openpose", "mlsd", 15 | "sam2_mask", "uniformer", 16 | "DepthEdit", "FillEdit", "ReduxStyle", "InstantStyle"]: 17 | if image_type not in data["condition"]: 18 | valid = False 19 | elif image_type in ["foreground", "background"]: 20 | if "foreground" not in data["condition"]: 21 | valid = False 22 | elif "reference" == image_type: 23 | if data["quality_assessment"] is not None: 24 | if data["quality_assessment"]["objectConsistency"] < 3: 25 | valid = False 26 | else: 27 | valid = False 28 | elif image_type in degradation_list: 29 | valid = True 30 | else: 31 | print(image_type) 32 | raise NotImplementedError() 33 | return valid 34 | 35 | 36 | def dataloader_collate_fn(samples): 37 | group_names = [x[0] for x in samples] 38 | image = [x[1] for x in samples] 39 | prompt = [x[2] for x in samples] 40 | text_emb = [x[3] for x in samples] 41 | grid_shape = [x[4] for x in samples] 42 | return group_names, image, prompt, text_emb, grid_shape 43 | 44 | 45 | def get_train_sampler(dataset, rank, world_size, global_batch_size, max_steps, resume_step, seed): 46 | sample_indices = torch.empty([max_steps * global_batch_size // world_size], dtype=torch.long) 47 | epoch_id, fill_ptr, offs = 0, 0, 0 48 | while fill_ptr < sample_indices.size(0): 49 | g = torch.Generator() 50 | g.manual_seed(seed + epoch_id) 51 | epoch_sample_indices = torch.randperm(len(dataset), generator=g) 52 | epoch_id += 1 53 | epoch_sample_indices = epoch_sample_indices[(rank + offs) % world_size :: world_size] 54 | offs = (offs + world_size - len(dataset) % world_size) % world_size 55 | epoch_sample_indices = epoch_sample_indices[: sample_indices.size(0) - fill_ptr] 56 | sample_indices[fill_ptr : fill_ptr + epoch_sample_indices.size(0)] = epoch_sample_indices 57 | fill_ptr += epoch_sample_indices.size(0) 58 | return sample_indices[resume_step * global_batch_size // world_size :].tolist() 59 | -------------------------------------------------------------------------------- /data/degradation_toolkit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/data/degradation_toolkit/__init__.py -------------------------------------------------------------------------------- /data/degradation_toolkit/frost/frost1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/data/degradation_toolkit/frost/frost1.png -------------------------------------------------------------------------------- /data/degradation_toolkit/frost/frost2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/data/degradation_toolkit/frost/frost2.png -------------------------------------------------------------------------------- /data/degradation_toolkit/frost/frost3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/data/degradation_toolkit/frost/frost3.png -------------------------------------------------------------------------------- /data/degradation_toolkit/frost/frost4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/data/degradation_toolkit/frost/frost4.jpg -------------------------------------------------------------------------------- /data/degradation_toolkit/frost/frost5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/data/degradation_toolkit/frost/frost5.jpg -------------------------------------------------------------------------------- /data/degradation_toolkit/frost/frost6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/data/degradation_toolkit/frost/frost6.jpg -------------------------------------------------------------------------------- /data/degradation_toolkit/x_distortion/__init__.py: -------------------------------------------------------------------------------- 1 | from .blur import * 2 | from .brightness import * 3 | from .quantization import * 4 | from .compression import * 5 | from .contrast import * 6 | from .noise import * 7 | from .oversharpen import * 8 | from .pixelate import * 9 | from .saturate import * 10 | 11 | 12 | def add_distortion(img, severity=1, distortion_name=None): 13 | """This function returns a distorted version of the given image. 14 | 15 | @param img (np.ndarray, unit8): Input image, H x W x 3, RGB, [0, 255] 16 | @param severity: Severity of distortion, [1, 5] 17 | @distortion_name: 18 | @return: Degraded image (np.ndarray, unit8), H x W x 3, RGB, [0, 255] 19 | """ 20 | 21 | if not isinstance(img, np.ndarray): 22 | raise AttributeError('Expecting type(img) to be numpy.ndarray') 23 | if not (img.dtype.type is np.uint8): 24 | raise AttributeError('Expecting img.dtype.type to be numpy.uint8') 25 | 26 | if not (img.ndim in [2, 3]): 27 | raise AttributeError('Expecting img.shape to be either (h x w) or (h x w x c)') 28 | if img.ndim == 2: 29 | img = np.stack((img,) * 3, axis=-1) 30 | 31 | h, w, c = img.shape 32 | if (h < 32 or w < 32): 33 | raise AttributeError('The (w, h) must be at least 32 pixels') 34 | if not (c in [1, 3]): 35 | raise AttributeError('Expecting img to have either 1 or 3 chennels') 36 | if c == 1: 37 | img = np.stack((np.squeeze(img),) * 3, axis=-1) 38 | 39 | if severity not in [1, 2, 3, 4, 5]: 40 | raise AttributeError('The severity must be an integer in [1, 5]') 41 | 42 | if distortion_name: 43 | img_lq = globals()[distortion_name](img, severity) 44 | else: 45 | raise ValueError("The distortion_name must be passed") 46 | 47 | return np.uint8(img_lq) 48 | 49 | 50 | distortions_dict = { 51 | "blur": [ 52 | "blur_gaussian", 53 | "blur_motion", 54 | "blur_glass", 55 | "blur_lens", 56 | "blur_zoom", 57 | "blur_jitter", 58 | ], 59 | "noise": [ 60 | "noise_gaussian_RGB", 61 | "noise_gaussian_YCrCb", 62 | "noise_speckle", 63 | "noise_spatially_correlated", 64 | "noise_poisson", 65 | "noise_impulse", 66 | ], 67 | "compression": [ 68 | "compression_jpeg", 69 | "compression_jpeg_2000", 70 | ], 71 | "brighten": [ 72 | "brightness_brighten_shfit_HSV", 73 | "brightness_brighten_shfit_RGB", 74 | "brightness_brighten_gamma_HSV", 75 | "brightness_brighten_gamma_RGB", 76 | ], 77 | "darken": [ 78 | "brightness_darken_shfit_HSV", 79 | "brightness_darken_shfit_RGB", 80 | "brightness_darken_gamma_HSV", 81 | "brightness_darken_gamma_RGB", 82 | ], 83 | "contrast_strengthen": [ 84 | "contrast_strengthen_scale", 85 | "contrast_strengthen_stretch", 86 | ], 87 | "contrast_weaken": [ 88 | "contrast_weaken_scale", 89 | "contrast_weaken_stretch", 90 | ], 91 | "saturate_strengthen": [ 92 | "saturate_strengthen_HSV", 93 | "saturate_strengthen_YCrCb", 94 | ], 95 | "saturate_weaken": [ 96 | "saturate_weaken_HSV", 97 | "saturate_weaken_YCrCb", 98 | ], 99 | "oversharpen": [ 100 | "oversharpen", 101 | ], 102 | "pixelate": [ 103 | "pixelate", 104 | ], 105 | "quantization": [ 106 | "quantization_otsu", 107 | "quantization_median", 108 | "quantization_hist", 109 | ], 110 | "spatter": [ 111 | "spatter", 112 | ], 113 | } 114 | 115 | 116 | def get_distortion_names(subset=None): 117 | if subset in distortions_dict: 118 | print(distortions_dict[subset]) 119 | else: 120 | print(distortions_dict) 121 | -------------------------------------------------------------------------------- /data/degradation_toolkit/x_distortion/compression.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from PIL import Image 3 | from io import BytesIO 4 | 5 | 6 | def compression_jpeg(img, severity=1): 7 | """ 8 | JPEG compression on a NumPy array. 9 | severity=[1,2,3,4,5] corresponding to quality=[25,18,15,10,7]. 10 | from https://github.com/bethgelab/imagecorruptions/blob/master/imagecorruptions/corruptions.py 11 | 12 | @param img: Input image as NumPy array, H x W x C, value range [0, 255] 13 | @param severity: Severity of distortion, [1, 5] 14 | @return: Degraded image as NumPy array, H x W x C, value range [0, 255] 15 | """ 16 | assert img.dtype == np.uint8, "Image array should have dtype of np.uint8" 17 | assert severity in [1, 2, 3, 4, 5], 'Severity must be an integer between 1 and 5.' 18 | 19 | quality = [25, 18, 12, 8, 5][severity - 1] 20 | output = BytesIO() 21 | gray_scale = False 22 | if img.shape[2] == 1: # Check if the image is grayscale 23 | gray_scale = True 24 | # Convert NumPy array to PIL Image 25 | img = Image.fromarray(img) 26 | if gray_scale: 27 | img = img.convert('L') 28 | else: 29 | img = img.convert('RGB') 30 | # Save image to a bytes buffer using JPEG compression 31 | img.save(output, 'JPEG', quality=quality) 32 | output.seek(0) 33 | # Load the compressed image from the bytes buffer 34 | img_lq = Image.open(output) 35 | # Convert PIL Image back to NumPy array 36 | if gray_scale: 37 | img_lq = np.array(img_lq.convert('L')) 38 | img_lq = img_lq.reshape((img_lq.shape[0], img_lq.shape[1], 1)) # Maintaining the original shape (H, W, 1) 39 | else: 40 | img_lq = np.array(img_lq.convert('RGB')) 41 | return img_lq 42 | 43 | 44 | def compression_jpeg_2000(img, severity=1): 45 | """ 46 | JPEG2000 compression on a NumPy array. 47 | severity=[1,2,3,4,5] corresponding to quality=[29,27.5,26,24.5,23], quality_mode='dB'. 48 | 49 | @param x: Input image as NumPy array, H x W x C, value range [0, 255] 50 | @param severity: Severity of distortion, [1, 5] 51 | @return: Degraded image as NumPy array, H x W x C, value range [0, 255] 52 | """ 53 | assert img.dtype == np.uint8, "Image array should have dtype of np.uint8" 54 | assert severity in [1, 2, 3, 4, 5], 'Severity must be an integer between 1 and 5.' 55 | 56 | quality = [29, 27.5, 26, 24.5, 23][severity - 1] 57 | output = BytesIO() 58 | gray_scale = False 59 | if img.shape[2] == 1: # Check if the image is grayscale 60 | gray_scale = True 61 | # Convert NumPy array to PIL Image 62 | img = Image.fromarray(img) 63 | if gray_scale: 64 | img = img.convert('L') 65 | else: 66 | img = img.convert('RGB') 67 | # Save image to a bytes buffer using JPEG compression 68 | img.save(output, 'JPEG2000', quality_mode='dB', quality_layers=[quality]) 69 | output.seek(0) 70 | # Load the compressed image from the bytes buffer 71 | img_lq = Image.open(output) 72 | # Convert PIL Image back to NumPy array 73 | if gray_scale: 74 | img_lq = np.array(img_lq.convert('L')) 75 | img_lq = img_lq.reshape((img_lq.shape[0], img_lq.shape[1], 1)) # Maintaining the original shape (H, W, 1) 76 | else: 77 | img_lq = np.array(img_lq.convert('RGB')) 78 | return img_lq 79 | -------------------------------------------------------------------------------- /data/degradation_toolkit/x_distortion/contrast.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | from PIL import Image 4 | from PIL import ImageEnhance 5 | 6 | 7 | def contrast_weaken_scale(img, severity=1): 8 | """ 9 | Contrast Weaken by scaling. 10 | severity=[1, 2, 3, 4, 5] corresponding to scale=[0.75, 0.6, 0.45, 0.3, 0.2]. 11 | 12 | @param img: Input image, H x W x 3, value range [0, 255] 13 | @param severity: Severity of distortion, [1, 5] 14 | @return: Degraded image, H x W x 3, value range [0, 255] 15 | """ 16 | c = [0.75, 0.6, 0.45, 0.3, 0.2][severity - 1] 17 | img = Image.fromarray(img) 18 | enhancer = ImageEnhance.Contrast(img) 19 | img = enhancer.enhance(c) 20 | img = np.uint8(np.clip(np.array(img), 0, 255)) 21 | return img 22 | 23 | 24 | def contrast_weaken_stretch(img, severity=1): 25 | """ 26 | Contrast Weaken by stretching. 27 | severity=[1, 2, 3, 4, 5] corresponding to scale=[1.0, 0.9, 0.8, 0.6, 0.4]. 28 | severity mainly refer to PieAPP. 29 | 30 | @param img: Input image, H x W x 3, value range [0, 255] 31 | @param severity: Severity of distortion, [1, 5] 32 | @return: Degraded image, H x W x 3, value range [0, 255] 33 | """ 34 | c = [1.0, 0.9, 0.8, 0.6, 0.4][severity - 1] 35 | img = np.array(img) / 255. 36 | img_mean = np.mean(img, axis=(0,1), keepdims=True) 37 | img = 1. / (1 + (img_mean / (img + 1e-12)) ** c) 38 | img = np.uint8(np.clip(img, 0, 1) * 255) 39 | return img 40 | 41 | 42 | def contrast_strengthen_scale(img, severity=1): 43 | """ 44 | Contrast Strengthen by scaling. 45 | severity=[1, 2, 3, 4, 5] corresponding to scale=[1.4, 1.7, 2.1, 2.6, 4.0]. 46 | 47 | @param img: Input image, H x W x 3, value range [0, 255] 48 | @param severity: Severity of distortion, [1, 5] 49 | @return: Degraded image, H x W x 3, value range [0, 255] 50 | """ 51 | c = [1.4, 1.7, 2.1, 2.6, 4.0][severity - 1] 52 | img = Image.fromarray(img) 53 | enhancer = ImageEnhance.Contrast(img) 54 | img = enhancer.enhance(c) 55 | img = np.uint8(np.clip(np.array(img), 0, 255)) 56 | return img 57 | 58 | 59 | def contrast_strengthen_stretch(img, severity=1): 60 | """ 61 | Contrast Strengthen by stretching. 62 | severity=[1, 2, 3, 4, 5] corresponding to scale=[2.0, 4.0, 6.0, 8.0, 10.0]. 63 | severity mainly refer to PieAPP. 64 | 65 | @param img: Input image, H x W x 3, value range [0, 255] 66 | @param severity: Severity of distortion, [1, 5] 67 | @return: Degraded image, H x W x 3, value range [0, 255] 68 | """ 69 | c = [2.0, 4.0, 6.0, 8.0, 10.0][severity - 1] 70 | img = np.array(img) / 255. 71 | img_mean = np.mean(img, axis=(0,1), keepdims=True) 72 | img = 1. / (1 + (img_mean / (img + 1e-12)) ** c) 73 | img = np.uint8(np.clip(img, 0, 1) * 255) 74 | return img 75 | -------------------------------------------------------------------------------- /data/degradation_toolkit/x_distortion/oversharpen.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | 4 | 5 | def oversharpen(img, severity=1): 6 | """ 7 | OverSharpening filter on a NumPy array. 8 | severity = [1, 5] corresponding to amount = [2, 4, 6, 8, 10] 9 | 10 | @param x: Input image as NumPy array, H x W x C, value range [0, 255] 11 | @param severity: Severity of distortion, [1, 5] 12 | @return: Degraded image as NumPy array, H x W x C, value range [0, 255] 13 | """ 14 | assert img.dtype == np.uint8, "Image array should have dtype of np.uint8" 15 | assert severity in [1, 2, 3, 4, 5], 'Severity must be an integer between 1 and 5.' 16 | 17 | amount = [2, 2.8, 4, 6, 8][severity - 1] 18 | 19 | # Setting the kernel size and sigmaX value for Gaussian blur 20 | # In OpenCV's Size(kernel_width, kernel_height), both kernel_width and kernel_height 21 | # should be odd numbers; for example, we can use (2*radius+1, 2*radius+1) 22 | blur_radius = 2 # The radius is the blur radius used to set the size of the Gaussian kernel 23 | sigmaX = 0 24 | 25 | # Create a blurred/smoothed version of the image 26 | blurred = cv2.GaussianBlur(img, (2*blur_radius+1, 2*blur_radius+1), sigmaX) 27 | 28 | # Compute the sharpened image with an enhancement factor of 'amount' 29 | sharpened = cv2.addWeighted(img, 1 + amount, blurred, -amount, 0) 30 | 31 | return sharpened 32 | -------------------------------------------------------------------------------- /data/degradation_toolkit/x_distortion/pixelate.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | from PIL import Image 4 | 5 | 6 | def pixelate(img, severity=1): 7 | """ 8 | Pixelate. 9 | severity=[1, 2, 3, 4, 5] corresponding to sigma=[0.5, 0.4, 0.3, 0.25, 0.2]. 10 | severity mainly refer to Imagecorruptions. 11 | 12 | @param img: Input image, H x W x 3, value range [0, 255] 13 | @param severity: Severity of distortion, [1, 5] 14 | @return: Degraded image, H x W x 3, value range [0, 255] 15 | """ 16 | c = [0.5, 0.4, 0.3, 0.25, 0.2][severity - 1] 17 | h, w = np.array(img).shape[:2] 18 | img = Image.fromarray(img) 19 | img = img.resize((int(w * c), int(h * c)), Image.BOX) 20 | img = img.resize((w, h), Image.NEAREST) 21 | return np.array(img).astype(np.uint8) 22 | -------------------------------------------------------------------------------- /data/degradation_toolkit/x_distortion/quantization.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | from PIL import Image 4 | from skimage.filters import threshold_multiotsu 5 | 6 | 7 | 8 | def quantization_otsu(img, severity=1): 9 | """ 10 | Color Quantization using OTSU method. 11 | severity=[1, 2, 3, 4, 5] corresponding to num_classes=[15, 11, 8, 5, 3]. 12 | severity mainly refer to KADID-10K and Imagecorruptions. 13 | 14 | @param img: Input image, H x W x 3, value range [0, 255] 15 | @param severity: Severity of distortion, [1, 5] 16 | @return: Degraded image, H x W x 3, value range [0, 255] 17 | """ 18 | c = [15, 11, 8, 5, 3][severity - 1] 19 | img = np.array(img).astype(np.float32) 20 | for i in range(img.shape[2]): 21 | img_gray = img[:, :, i] 22 | thresholds = threshold_multiotsu(img_gray, classes=c, nbins=30) # modify skimage 23 | v_max = img_gray.max() 24 | v_min = img_gray.min() 25 | img[:, :, i] = np.digitize(img[:, :, i], bins=thresholds) * (v_max - v_min) / c + v_min 26 | img = np.clip(img, 0, 255) 27 | return img 28 | 29 | 30 | def quantization_median(img, severity=1): 31 | """ 32 | Color Quantization using Histogram Median. 33 | severity=[1, 2, 3, 4, 5] corresponding to num_classes=[20, 15, 10, 6, 3]. 34 | severity mainly refer to KADID-10K and Imagecorruptions. 35 | 36 | @param img: Input image, H x W x 3, value range [0, 255] 37 | @param severity: Severity of distortion, [1, 5] 38 | @return: Degraded image, H x W x 3, value range [0, 255] 39 | """ 40 | c = [20, 15, 10, 6, 3][severity - 1] 41 | for i in range(img.shape[2]): 42 | img_gray = Image.fromarray(img[:, :, i]) 43 | img_gray = img_gray.quantize(colors=c, method=Image.Quantize.MEDIANCUT).convert("L") 44 | img[:, :, i] = np.array(img_gray) 45 | img = np.clip(img, 0, 255) 46 | return img 47 | 48 | 49 | def quantization_hist(img, severity=1): 50 | """ 51 | Color Quantization using Histogram Equalization. 52 | severity=[1, 2, 3, 4, 5] corresponding to num_classes=[24, 16, 8, 6, 4]. 53 | severity mainly refer to KADID-10K and Imagecorruptions. 54 | 55 | @param img: Input image, H x W x 3, value range [0, 255] 56 | @param severity: Severity of distortion, [1, 5] 57 | @return: Degraded image, H x W x 3, value range [0, 255] 58 | """ 59 | c = [24, 16, 8, 6, 4][severity - 1] 60 | hist, _ = np.histogram(img.flatten(), bins=c, range=[0, 255]) 61 | cdf = hist.cumsum() 62 | cdf_m = np.ma.masked_equal(cdf, 0) 63 | cdf_m = (cdf_m - cdf_m.min()) * 255 / (cdf_m.max() - cdf_m.min()) 64 | cdf = np.ma.filled(cdf_m, 0).astype('uint8') 65 | img = np.uint8(np.round(img / 255 * (c - 1))) 66 | img = cdf[img] 67 | img = np.clip(img, 0, 255) 68 | return img 69 | -------------------------------------------------------------------------------- /data/degradation_toolkit/x_distortion/saturate.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | 4 | 5 | def saturate_weaken_HSV(img, severity=1): 6 | """ 7 | Saturate Weaken by scaling S channel in HSV. 8 | severity=[1, 2, 3, 4, 5] corresponding to scale=[0.7, 0.55, 0.4, 0.2, 0.0]. 9 | severity mainly refer to KADID-10K. 10 | 11 | @param img: Input image, H x W x 3, value range [0, 255] 12 | @param severity: Severity of distortion, [1, 5] 13 | @return: Degraded image, H x W x 3, value range [0, 255] 14 | """ 15 | c = [0.7, 0.55, 0.4, 0.2, 0.0][severity - 1] 16 | hsv = np.array(cv2.cvtColor(img, cv2.COLOR_RGB2HSV), dtype=np.float32) 17 | hsv[:, :, 1] = c * hsv[:, :, 1] 18 | hsv = np.uint8(np.clip(hsv, 0, 255)) 19 | img = cv2.cvtColor(hsv, cv2.COLOR_HSV2RGB) 20 | return img 21 | 22 | 23 | def saturate_weaken_YCrCb(img, severity=1): 24 | """ 25 | Saturate Weaken by scaling S channel in YCrCb. 26 | severity=[1, 2, 3, 4, 5] corresponding to scale=[0.6, 0.4, 0.2, 0.1, 0.0]. 27 | severity mainly refer to PieAPP. 28 | 29 | @param img: Input image, H x W x 3, value range [0, 255] 30 | @param severity: Severity of distortion, [1, 5] 31 | @return: Degraded image, H x W x 3, value range [0, 255] 32 | """ 33 | c = [0.6, 0.4, 0.2, 0.1, 0.0][severity - 1] 34 | ycrcb = np.array(cv2.cvtColor(img, cv2.COLOR_RGB2YCR_CB), dtype=np.float32) 35 | ycrcb[:, :, 1] = 128 + (ycrcb[:, :, 1] - 128) * c 36 | ycrcb[:, :, 2] = 128 + (ycrcb[:, :, 2] - 128) * c 37 | ycrcb = np.uint8(np.clip(ycrcb, 0, 255)) 38 | img = cv2.cvtColor(ycrcb, cv2.COLOR_YCR_CB2RGB) 39 | return img 40 | 41 | 42 | def saturate_strengthen_HSV(img, severity=1): 43 | """ 44 | Saturate Strengthen by scaling S channel in HSV. 45 | severity=[1, 2, 3, 4, 5] corresponding to scale=[3.0, 6.0, 12.0, 20.0, 64.0]. 46 | 47 | @param img: Input image, H x W x 3, value range [0, 255] 48 | @param severity: Severity of distortion, [1, 5] 49 | @return: Degraded image, H x W x 3, value range [0, 255] 50 | """ 51 | c = [3.0, 6.0, 12.0, 20.0, 64.0][severity - 1] 52 | hsv = np.array(cv2.cvtColor(img, cv2.COLOR_RGB2HSV), dtype=np.float32) 53 | hsv[:, :, 1] = c * hsv[:, :, 1] 54 | hsv = np.uint8(np.clip(hsv, 0, 255)) 55 | img = cv2.cvtColor(hsv, cv2.COLOR_HSV2RGB) 56 | return img 57 | 58 | 59 | def saturate_strengthen_YCrCb(img, severity=1): 60 | """ 61 | Saturate Strengthen by scaling S channel in YCrCb. 62 | severity=[1, 2, 3, 4, 5] corresponding to scale=[2.0, 3.0, 5.0, 8.0, 16.0]. 63 | severity mainly refer to PieAPP. 64 | 65 | @param img: Input image, H x W x 3, value range [0, 255] 66 | @param severity: Severity of distortion, [1, 5] 67 | @return: Degraded image, H x W x 3, value range [0, 255] 68 | """ 69 | c = [2.0, 3.0, 5.0, 8.0, 16.0][severity - 1] 70 | ycrcb = np.array(cv2.cvtColor(img, cv2.COLOR_RGB2YCR_CB), dtype=np.float32) 71 | ycrcb[:, :, 1] = 128 + (ycrcb[:, :, 1] - 128) * c 72 | ycrcb[:, :, 2] = 128 + (ycrcb[:, :, 2] - 128) * c 73 | ycrcb = np.uint8(np.clip(ycrcb, 0, 255)) 74 | img = cv2.cvtColor(ycrcb, cv2.COLOR_YCR_CB2RGB) 75 | return img 76 | -------------------------------------------------------------------------------- /data/degradation_toolkit/x_distortion/spatter.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | from skimage.filters import gaussian 4 | 5 | def rgb2gray(rgb): 6 | return np.dot(rgb[..., :3], [0.2989, 0.5870, 0.1140]) 7 | 8 | def spatter(x, severity=1): 9 | c = [(0.65, 0.3, 4, 0.69, 0.6, 0), 10 | (0.65, 0.3, 3, 0.68, 0.6, 0), 11 | (0.65, 0.3, 2, 0.68, 0.5, 0), 12 | (0.65, 0.3, 1, 0.65, 1.5, 1), 13 | (0.67, 0.4, 1, 0.65, 1.5, 1)][severity - 1] 14 | x_PIL = x 15 | x = np.array(x, dtype=np.float32) / 255. 16 | 17 | liquid_layer = np.random.normal(size=x.shape[:2], loc=c[0], scale=c[1]) 18 | 19 | liquid_layer = gaussian(liquid_layer, sigma=c[2]) 20 | liquid_layer[liquid_layer < c[3]] = 0 21 | if c[5] == 0: 22 | liquid_layer = (liquid_layer * 255).astype(np.uint8) 23 | dist = 255 - cv2.Canny(liquid_layer, 50, 150) 24 | dist = cv2.distanceTransform(dist, cv2.DIST_L2, 5) 25 | _, dist = cv2.threshold(dist, 20, 20, cv2.THRESH_TRUNC) 26 | dist = cv2.blur(dist, (3, 3)).astype(np.uint8) 27 | dist = cv2.equalizeHist(dist) 28 | ker = np.array([[-2, -1, 0], [-1, 1, 1], [0, 1, 2]]) 29 | dist = cv2.filter2D(dist, cv2.CV_8U, ker) 30 | dist = cv2.blur(dist, (3, 3)).astype(np.float32) 31 | 32 | m = cv2.cvtColor(liquid_layer * dist, cv2.COLOR_GRAY2BGRA) 33 | m /= np.max(m, axis=(0, 1)) 34 | m *= c[4] 35 | # water is pale turqouise 36 | color = np.concatenate((175 / 255. * np.ones_like(m[..., :1]), 37 | 238 / 255. * np.ones_like(m[..., :1]), 38 | 238 / 255. * np.ones_like(m[..., :1])), axis=2) 39 | 40 | color = cv2.cvtColor(color, cv2.COLOR_BGR2BGRA) 41 | 42 | if len(x.shape) < 3 or x.shape[2] < 3: 43 | add_spatter_color = cv2.cvtColor(np.clip(m * color, 0, 1), 44 | cv2.COLOR_BGRA2BGR) 45 | add_spatter_gray = rgb2gray(add_spatter_color) 46 | 47 | return np.clip(x + add_spatter_gray, 0, 1) * 255 48 | 49 | else: 50 | 51 | x = cv2.cvtColor(x, cv2.COLOR_BGR2BGRA) 52 | 53 | return cv2.cvtColor(np.clip(x + m * color, 0, 1), 54 | cv2.COLOR_BGRA2BGR) * 255 55 | else: 56 | m = np.where(liquid_layer > c[3], 1, 0) 57 | m = gaussian(m.astype(np.float32), sigma=c[4]) 58 | m[m < 0.8] = 0 59 | 60 | x_rgb = np.array(x_PIL.convert('RGB')) 61 | 62 | # mud brown 63 | color = np.concatenate((63 / 255. * np.ones_like(x_rgb[..., :1]), 64 | 42 / 255. * np.ones_like(x_rgb[..., :1]), 65 | 20 / 255. * np.ones_like(x_rgb[..., :1])), 66 | axis=2) 67 | color *= m[..., np.newaxis] 68 | if len(x.shape) < 3 or x.shape[2] < 3: 69 | x *= (1 - m) 70 | return np.clip(x + rgb2gray(color), 0, 1) * 255 71 | 72 | else: 73 | x *= (1 - m[..., np.newaxis]) 74 | return np.clip(x + color, 0, 1) * 255 -------------------------------------------------------------------------------- /docs/DATASET.md: -------------------------------------------------------------------------------- 1 | # Graph200K Dataset 2 | 3 | 1. [Introduction](#introduction) 4 | 2. [Usage](#usage) 5 | 3. [Preprocessing](#preprocessing) 6 | 7 | ## Introduction 8 | 9 | In natural language processing, tasks overlap significantly, 10 | facilitating strong cross-task learning ability. In contrast, 11 | visual tasks are inherently distinct, posing challenges for 12 | vision models to achieve similar generalization ability via 13 | instruction tuning. To ease this issue, we introduce a Graph 14 | Structured Multi-Task Dataset, named Graph200K. 15 | 16 | Graph200K is built upon the [Subjects200K](https://huggingface.co/datasets/Yuanshi/Subjects200K) dataset. 17 | Each image is annotated for five meta-tasks, including 18 | **1) conditional generation, 2) image restoration, 3) image editing, 4) IP preservation, and 5) style transfer**. 19 | Using these tasks, we can also combine a wide range of complex 20 | tasks, as shown in the figure below. 21 | 22 | ![xx](https://github.com/lzyhha/VisualCloze/blob/main/figures/graph200k.jpg) 23 | 24 | ## Usage 25 | 26 | The dataset can be downloaded and used through the [Datasets](https://huggingface.co/docs/datasets/index) library, as follows: 27 | 28 | ```python 29 | import datasets 30 | grapth200k = datasets.load_dataset("lzyhha/test") # todo 31 | 32 | train = grapth200k['train'] 33 | test = grapth200k['test'] 34 | 35 | # Reading depth map (PIL.Image) of the first image in the train set 36 | train[0]['depth'].save(f'depth.jpg') 37 | ``` 38 | 39 | In each item of the dataset, there are annotations as follows. Examples can be found in [huggingface](https://huggingface.co/datasets/VisualCloze/Graph200K). 40 | 41 | | Item | Meaning | 42 | | :------------------------ | ------------------------------------------------------------- | 43 | | ref | Inherited from Subjects200K, it depicts the subject object in the target image. | 44 | | target | The original image inherited from Subjects200K. | 45 | | InstantStyle_image_{0-3} | Stylized images with invariant semantics. | 46 | | InstantStyle_ref_{0-3} | Style reference for InstantStyle. | 47 | | ReduxStyle_image_{0-3} | Stylized images with variant semantics. | 48 | | ReduxStyle_ref_{0-3} | Style reference for ReduxStyle. | 49 | | FillEdit_image_{0-5} | Edited image with invariant background. | 50 | | FillEdit_meta | The name and descripation of the new subject object after editing. | 51 | | DepthEdit | Edited image with variant background. | 52 | | qwen_2_5_mask | A high-quality segmentation mask generated by the [Qwen-2.5-VL](https://github.com/QwenLM/Qwen2.5-VL) and [SAM2](https://github.com/facebookresearch/sam2). | 53 | | qwen_2_5_bounding_box | The bounding boxes generated by the [Qwen-2.5-VL](https://github.com/QwenLM/Qwen2.5-VL). | 54 | | qwen_2_5_meta | The coordinate and object name of each bounding box. And the mask color corresponding ro each box. | 55 | | sam2_mask | A mask generated by the [SAM2](https://github.com/facebookresearch/sam2) model. | 56 | | uniformer | The semantic segmentation generated by [UniFormer](https://github.com/Sense-X/UniFormer). | 57 | | foreground | The foreground mask generated by [RMBG-2.0](https://huggingface.co/briaai/RMBG-2.0). | 58 | | normal | Surface normal estimation generated by [DSINE](https://github.com/baegwangbin/DSINE/tree/main) | 59 | | depth | The depth estimation by [Depth Anything V2](https://github.com/DepthAnything/Depth-Anything-V2). | 60 | | canny | Edge detection in images, using the Canny edge detector. | 61 | | hed |Edge detection in images, using the [HED](https://github.com/s9xie/hed) detector. | 62 | | mlsd | Line segments generated using [M-LSD](https://github.com/navervision/mlsd). | 63 | | openpose | Human keypoints generated by [OpenPose](https://github.com/CMU-Perceptual-Computing-Lab/openpose) | 64 | 65 | ## Preprocessing 66 | 67 | To use the Graph200k for training and inference in our VisualCloze, we extract each image fileand generate a json file that record the path and meta information of each file. 68 | 69 | ```bash 70 | python processing.py \ 71 | --target_path "where will the images and the json be saved" \ 72 | --split "train or test" 73 | ``` 74 | -------------------------------------------------------------------------------- /docs/INSTALL.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | Downloading VisualCloze repo from github: 4 | 5 | ```bash 6 | git clone https://github.com/lzyhha/VisualCloze 7 | ``` 8 | 9 | ### 1. Create a conda environment and install PyTorch 10 | 11 | Note: You may want to adjust the CUDA version [according to your driver version](https://docs.nvidia.com/deploy/cuda-compatibility/#default-to-minor-version). 12 | 13 | ```bash 14 | conda create -n visualcloze -y 15 | conda activate visualcloze 16 | conda install python=3.11 pytorch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 pytorch-cuda=12.1 -c pytorch -c nvidia -y 17 | ``` 18 | 19 | ### 2. Install dependencies 20 | 21 | ```bash 22 | pip install -r requirements.txt 23 | ``` 24 | 25 | ### 3. Install flash-attn 26 | 27 | ```bash 28 | pip install flash-attn --no-build-isolation 29 | ``` -------------------------------------------------------------------------------- /exampleA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/exampleA.png -------------------------------------------------------------------------------- /examples/__init__.py: -------------------------------------------------------------------------------- 1 | from .gradio_tasks import dense_prediction_text, conditional_generation_text, process_dense_prediction_tasks, process_conditional_generation_tasks 2 | from .gradio_tasks_restoration import image_restoration_text, process_image_restoration_tasks 3 | from .gradio_tasks_style import style_transfer_text, style_condition_fusion_text, process_style_transfer_tasks, process_style_condition_fusion_tasks 4 | from .gradio_tasks_tryon import tryon_text, process_tryon_tasks 5 | from .gradio_tasks_editing import editing_text, process_editing_tasks 6 | from .gradio_tasks_photodoodle import photodoodle_text, process_photodoodle_tasks 7 | from .gradio_tasks_editing_subject import editing_with_subject_text, process_editing_with_subject_tasks 8 | from .gradio_tasks_relighting import relighting_text, process_relighting_tasks 9 | from .gradio_tasks_unseen import unseen_tasks_text, process_unseen_tasks 10 | from .gradio_tasks_subject import subject_driven_text, condition_subject_fusion_text, condition_subject_style_fusion_text, style_transfer_with_subject_text, \ 11 | image_restoration_with_subject_text, \ 12 | process_subject_driven_tasks, process_image_restoration_with_subject_tasks, process_style_transfer_with_subject_tasks, process_condition_subject_style_fusion_tasks, \ 13 | process_condition_subject_fusion_tasks -------------------------------------------------------------------------------- /examples/degradation_toolkit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/degradation_toolkit/__init__.py -------------------------------------------------------------------------------- /examples/degradation_toolkit/frost/frost1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/degradation_toolkit/frost/frost1.png -------------------------------------------------------------------------------- /examples/degradation_toolkit/frost/frost2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/degradation_toolkit/frost/frost2.png -------------------------------------------------------------------------------- /examples/degradation_toolkit/frost/frost3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/degradation_toolkit/frost/frost3.png -------------------------------------------------------------------------------- /examples/degradation_toolkit/frost/frost4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/degradation_toolkit/frost/frost4.jpg -------------------------------------------------------------------------------- /examples/degradation_toolkit/frost/frost5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/degradation_toolkit/frost/frost5.jpg -------------------------------------------------------------------------------- /examples/degradation_toolkit/frost/frost6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/degradation_toolkit/frost/frost6.jpg -------------------------------------------------------------------------------- /examples/degradation_toolkit/x_distortion/__init__.py: -------------------------------------------------------------------------------- 1 | from .blur import * 2 | from .brightness import * 3 | from .quantization import * 4 | from .compression import * 5 | from .contrast import * 6 | from .noise import * 7 | from .oversharpen import * 8 | from .pixelate import * 9 | from .saturate import * 10 | 11 | 12 | def add_distortion(img, severity=1, distortion_name=None): 13 | """This function returns a distorted version of the given image. 14 | 15 | @param img (np.ndarray, unit8): Input image, H x W x 3, RGB, [0, 255] 16 | @param severity: Severity of distortion, [1, 5] 17 | @distortion_name: 18 | @return: Degraded image (np.ndarray, unit8), H x W x 3, RGB, [0, 255] 19 | """ 20 | 21 | if not isinstance(img, np.ndarray): 22 | raise AttributeError('Expecting type(img) to be numpy.ndarray') 23 | if not (img.dtype.type is np.uint8): 24 | raise AttributeError('Expecting img.dtype.type to be numpy.uint8') 25 | 26 | if not (img.ndim in [2, 3]): 27 | raise AttributeError('Expecting img.shape to be either (h x w) or (h x w x c)') 28 | if img.ndim == 2: 29 | img = np.stack((img,) * 3, axis=-1) 30 | 31 | h, w, c = img.shape 32 | if (h < 32 or w < 32): 33 | raise AttributeError('The (w, h) must be at least 32 pixels') 34 | if not (c in [1, 3]): 35 | raise AttributeError('Expecting img to have either 1 or 3 chennels') 36 | if c == 1: 37 | img = np.stack((np.squeeze(img),) * 3, axis=-1) 38 | 39 | if severity not in [1, 2, 3, 4, 5]: 40 | raise AttributeError('The severity must be an integer in [1, 5]') 41 | 42 | if distortion_name: 43 | img_lq = globals()[distortion_name](img, severity) 44 | else: 45 | raise ValueError("The distortion_name must be passed") 46 | 47 | return np.uint8(img_lq) 48 | 49 | 50 | distortions_dict = { 51 | "blur": [ 52 | "blur_gaussian", 53 | "blur_motion", 54 | "blur_glass", 55 | "blur_lens", 56 | "blur_zoom", 57 | "blur_jitter", 58 | ], 59 | "noise": [ 60 | "noise_gaussian_RGB", 61 | "noise_gaussian_YCrCb", 62 | "noise_speckle", 63 | "noise_spatially_correlated", 64 | "noise_poisson", 65 | "noise_impulse", 66 | ], 67 | "compression": [ 68 | "compression_jpeg", 69 | "compression_jpeg_2000", 70 | ], 71 | "brighten": [ 72 | "brightness_brighten_shfit_HSV", 73 | "brightness_brighten_shfit_RGB", 74 | "brightness_brighten_gamma_HSV", 75 | "brightness_brighten_gamma_RGB", 76 | ], 77 | "darken": [ 78 | "brightness_darken_shfit_HSV", 79 | "brightness_darken_shfit_RGB", 80 | "brightness_darken_gamma_HSV", 81 | "brightness_darken_gamma_RGB", 82 | ], 83 | "contrast_strengthen": [ 84 | "contrast_strengthen_scale", 85 | "contrast_strengthen_stretch", 86 | ], 87 | "contrast_weaken": [ 88 | "contrast_weaken_scale", 89 | "contrast_weaken_stretch", 90 | ], 91 | "saturate_strengthen": [ 92 | "saturate_strengthen_HSV", 93 | "saturate_strengthen_YCrCb", 94 | ], 95 | "saturate_weaken": [ 96 | "saturate_weaken_HSV", 97 | "saturate_weaken_YCrCb", 98 | ], 99 | "oversharpen": [ 100 | "oversharpen", 101 | ], 102 | "pixelate": [ 103 | "pixelate", 104 | ], 105 | "quantization": [ 106 | "quantization_otsu", 107 | "quantization_median", 108 | "quantization_hist", 109 | ], 110 | "spatter": [ 111 | "spatter", 112 | ], 113 | } 114 | 115 | 116 | def get_distortion_names(subset=None): 117 | if subset in distortions_dict: 118 | print(distortions_dict[subset]) 119 | else: 120 | print(distortions_dict) 121 | -------------------------------------------------------------------------------- /examples/degradation_toolkit/x_distortion/compression.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from PIL import Image 3 | from io import BytesIO 4 | 5 | 6 | def compression_jpeg(img, severity=1): 7 | """ 8 | JPEG compression on a NumPy array. 9 | severity=[1,2,3,4,5] corresponding to quality=[25,18,15,10,7]. 10 | from https://github.com/bethgelab/imagecorruptions/blob/master/imagecorruptions/corruptions.py 11 | 12 | @param img: Input image as NumPy array, H x W x C, value range [0, 255] 13 | @param severity: Severity of distortion, [1, 5] 14 | @return: Degraded image as NumPy array, H x W x C, value range [0, 255] 15 | """ 16 | assert img.dtype == np.uint8, "Image array should have dtype of np.uint8" 17 | assert severity in [1, 2, 3, 4, 5], 'Severity must be an integer between 1 and 5.' 18 | 19 | quality = [25, 18, 12, 8, 5][severity - 1] 20 | output = BytesIO() 21 | gray_scale = False 22 | if img.shape[2] == 1: # Check if the image is grayscale 23 | gray_scale = True 24 | # Convert NumPy array to PIL Image 25 | img = Image.fromarray(img) 26 | if gray_scale: 27 | img = img.convert('L') 28 | else: 29 | img = img.convert('RGB') 30 | # Save image to a bytes buffer using JPEG compression 31 | img.save(output, 'JPEG', quality=quality) 32 | output.seek(0) 33 | # Load the compressed image from the bytes buffer 34 | img_lq = Image.open(output) 35 | # Convert PIL Image back to NumPy array 36 | if gray_scale: 37 | img_lq = np.array(img_lq.convert('L')) 38 | img_lq = img_lq.reshape((img_lq.shape[0], img_lq.shape[1], 1)) # Maintaining the original shape (H, W, 1) 39 | else: 40 | img_lq = np.array(img_lq.convert('RGB')) 41 | return img_lq 42 | 43 | 44 | def compression_jpeg_2000(img, severity=1): 45 | """ 46 | JPEG2000 compression on a NumPy array. 47 | severity=[1,2,3,4,5] corresponding to quality=[29,27.5,26,24.5,23], quality_mode='dB'. 48 | 49 | @param x: Input image as NumPy array, H x W x C, value range [0, 255] 50 | @param severity: Severity of distortion, [1, 5] 51 | @return: Degraded image as NumPy array, H x W x C, value range [0, 255] 52 | """ 53 | assert img.dtype == np.uint8, "Image array should have dtype of np.uint8" 54 | assert severity in [1, 2, 3, 4, 5], 'Severity must be an integer between 1 and 5.' 55 | 56 | quality = [29, 27.5, 26, 24.5, 23][severity - 1] 57 | output = BytesIO() 58 | gray_scale = False 59 | if img.shape[2] == 1: # Check if the image is grayscale 60 | gray_scale = True 61 | # Convert NumPy array to PIL Image 62 | img = Image.fromarray(img) 63 | if gray_scale: 64 | img = img.convert('L') 65 | else: 66 | img = img.convert('RGB') 67 | # Save image to a bytes buffer using JPEG compression 68 | img.save(output, 'JPEG2000', quality_mode='dB', quality_layers=[quality]) 69 | output.seek(0) 70 | # Load the compressed image from the bytes buffer 71 | img_lq = Image.open(output) 72 | # Convert PIL Image back to NumPy array 73 | if gray_scale: 74 | img_lq = np.array(img_lq.convert('L')) 75 | img_lq = img_lq.reshape((img_lq.shape[0], img_lq.shape[1], 1)) # Maintaining the original shape (H, W, 1) 76 | else: 77 | img_lq = np.array(img_lq.convert('RGB')) 78 | return img_lq 79 | -------------------------------------------------------------------------------- /examples/degradation_toolkit/x_distortion/contrast.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | from PIL import Image 4 | from PIL import ImageEnhance 5 | 6 | 7 | def contrast_weaken_scale(img, severity=1): 8 | """ 9 | Contrast Weaken by scaling. 10 | severity=[1, 2, 3, 4, 5] corresponding to scale=[0.75, 0.6, 0.45, 0.3, 0.2]. 11 | 12 | @param img: Input image, H x W x 3, value range [0, 255] 13 | @param severity: Severity of distortion, [1, 5] 14 | @return: Degraded image, H x W x 3, value range [0, 255] 15 | """ 16 | c = [0.75, 0.6, 0.45, 0.3, 0.2][severity - 1] 17 | img = Image.fromarray(img) 18 | enhancer = ImageEnhance.Contrast(img) 19 | img = enhancer.enhance(c) 20 | img = np.uint8(np.clip(np.array(img), 0, 255)) 21 | return img 22 | 23 | 24 | def contrast_weaken_stretch(img, severity=1): 25 | """ 26 | Contrast Weaken by stretching. 27 | severity=[1, 2, 3, 4, 5] corresponding to scale=[1.0, 0.9, 0.8, 0.6, 0.4]. 28 | severity mainly refer to PieAPP. 29 | 30 | @param img: Input image, H x W x 3, value range [0, 255] 31 | @param severity: Severity of distortion, [1, 5] 32 | @return: Degraded image, H x W x 3, value range [0, 255] 33 | """ 34 | c = [1.0, 0.9, 0.8, 0.6, 0.4][severity - 1] 35 | img = np.array(img) / 255. 36 | img_mean = np.mean(img, axis=(0,1), keepdims=True) 37 | img = 1. / (1 + (img_mean / (img + 1e-12)) ** c) 38 | img = np.uint8(np.clip(img, 0, 1) * 255) 39 | return img 40 | 41 | 42 | def contrast_strengthen_scale(img, severity=1): 43 | """ 44 | Contrast Strengthen by scaling. 45 | severity=[1, 2, 3, 4, 5] corresponding to scale=[1.4, 1.7, 2.1, 2.6, 4.0]. 46 | 47 | @param img: Input image, H x W x 3, value range [0, 255] 48 | @param severity: Severity of distortion, [1, 5] 49 | @return: Degraded image, H x W x 3, value range [0, 255] 50 | """ 51 | c = [1.4, 1.7, 2.1, 2.6, 4.0][severity - 1] 52 | img = Image.fromarray(img) 53 | enhancer = ImageEnhance.Contrast(img) 54 | img = enhancer.enhance(c) 55 | img = np.uint8(np.clip(np.array(img), 0, 255)) 56 | return img 57 | 58 | 59 | def contrast_strengthen_stretch(img, severity=1): 60 | """ 61 | Contrast Strengthen by stretching. 62 | severity=[1, 2, 3, 4, 5] corresponding to scale=[2.0, 4.0, 6.0, 8.0, 10.0]. 63 | severity mainly refer to PieAPP. 64 | 65 | @param img: Input image, H x W x 3, value range [0, 255] 66 | @param severity: Severity of distortion, [1, 5] 67 | @return: Degraded image, H x W x 3, value range [0, 255] 68 | """ 69 | c = [2.0, 4.0, 6.0, 8.0, 10.0][severity - 1] 70 | img = np.array(img) / 255. 71 | img_mean = np.mean(img, axis=(0,1), keepdims=True) 72 | img = 1. / (1 + (img_mean / (img + 1e-12)) ** c) 73 | img = np.uint8(np.clip(img, 0, 1) * 255) 74 | return img 75 | -------------------------------------------------------------------------------- /examples/degradation_toolkit/x_distortion/oversharpen.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | 4 | 5 | def oversharpen(img, severity=1): 6 | """ 7 | OverSharpening filter on a NumPy array. 8 | severity = [1, 5] corresponding to amount = [2, 4, 6, 8, 10] 9 | 10 | @param x: Input image as NumPy array, H x W x C, value range [0, 255] 11 | @param severity: Severity of distortion, [1, 5] 12 | @return: Degraded image as NumPy array, H x W x C, value range [0, 255] 13 | """ 14 | assert img.dtype == np.uint8, "Image array should have dtype of np.uint8" 15 | assert severity in [1, 2, 3, 4, 5], 'Severity must be an integer between 1 and 5.' 16 | 17 | amount = [2, 2.8, 4, 6, 8][severity - 1] 18 | 19 | # Setting the kernel size and sigmaX value for Gaussian blur 20 | # In OpenCV's Size(kernel_width, kernel_height), both kernel_width and kernel_height 21 | # should be odd numbers; for example, we can use (2*radius+1, 2*radius+1) 22 | blur_radius = 2 # The radius is the blur radius used to set the size of the Gaussian kernel 23 | sigmaX = 0 24 | 25 | # Create a blurred/smoothed version of the image 26 | blurred = cv2.GaussianBlur(img, (2*blur_radius+1, 2*blur_radius+1), sigmaX) 27 | 28 | # Compute the sharpened image with an enhancement factor of 'amount' 29 | sharpened = cv2.addWeighted(img, 1 + amount, blurred, -amount, 0) 30 | 31 | return sharpened 32 | -------------------------------------------------------------------------------- /examples/degradation_toolkit/x_distortion/pixelate.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | from PIL import Image 4 | 5 | 6 | def pixelate(img, severity=1): 7 | """ 8 | Pixelate. 9 | severity=[1, 2, 3, 4, 5] corresponding to sigma=[0.5, 0.4, 0.3, 0.25, 0.2]. 10 | severity mainly refer to Imagecorruptions. 11 | 12 | @param img: Input image, H x W x 3, value range [0, 255] 13 | @param severity: Severity of distortion, [1, 5] 14 | @return: Degraded image, H x W x 3, value range [0, 255] 15 | """ 16 | c = [0.5, 0.4, 0.3, 0.25, 0.2][severity - 1] 17 | h, w = np.array(img).shape[:2] 18 | img = Image.fromarray(img) 19 | img = img.resize((int(w * c), int(h * c)), Image.BOX) 20 | img = img.resize((w, h), Image.NEAREST) 21 | return np.array(img).astype(np.uint8) 22 | -------------------------------------------------------------------------------- /examples/degradation_toolkit/x_distortion/quantization.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | from PIL import Image 4 | from skimage.filters import threshold_multiotsu 5 | 6 | 7 | 8 | def quantization_otsu(img, severity=1): 9 | """ 10 | Color Quantization using OTSU method. 11 | severity=[1, 2, 3, 4, 5] corresponding to num_classes=[15, 11, 8, 5, 3]. 12 | severity mainly refer to KADID-10K and Imagecorruptions. 13 | 14 | @param img: Input image, H x W x 3, value range [0, 255] 15 | @param severity: Severity of distortion, [1, 5] 16 | @return: Degraded image, H x W x 3, value range [0, 255] 17 | """ 18 | c = [15, 11, 8, 5, 3][severity - 1] 19 | img = np.array(img).astype(np.float32) 20 | for i in range(img.shape[2]): 21 | img_gray = img[:, :, i] 22 | thresholds = threshold_multiotsu(img_gray, classes=c, nbins=30) # modify skimage 23 | v_max = img_gray.max() 24 | v_min = img_gray.min() 25 | img[:, :, i] = np.digitize(img[:, :, i], bins=thresholds) * (v_max - v_min) / c + v_min 26 | img = np.clip(img, 0, 255) 27 | return img 28 | 29 | 30 | def quantization_median(img, severity=1): 31 | """ 32 | Color Quantization using Histogram Median. 33 | severity=[1, 2, 3, 4, 5] corresponding to num_classes=[20, 15, 10, 6, 3]. 34 | severity mainly refer to KADID-10K and Imagecorruptions. 35 | 36 | @param img: Input image, H x W x 3, value range [0, 255] 37 | @param severity: Severity of distortion, [1, 5] 38 | @return: Degraded image, H x W x 3, value range [0, 255] 39 | """ 40 | c = [20, 15, 10, 6, 3][severity - 1] 41 | for i in range(img.shape[2]): 42 | img_gray = Image.fromarray(img[:, :, i]) 43 | img_gray = img_gray.quantize(colors=c, method=Image.Quantize.MEDIANCUT).convert("L") 44 | img[:, :, i] = np.array(img_gray) 45 | img = np.clip(img, 0, 255) 46 | return img 47 | 48 | 49 | def quantization_hist(img, severity=1): 50 | """ 51 | Color Quantization using Histogram Equalization. 52 | severity=[1, 2, 3, 4, 5] corresponding to num_classes=[24, 16, 8, 6, 4]. 53 | severity mainly refer to KADID-10K and Imagecorruptions. 54 | 55 | @param img: Input image, H x W x 3, value range [0, 255] 56 | @param severity: Severity of distortion, [1, 5] 57 | @return: Degraded image, H x W x 3, value range [0, 255] 58 | """ 59 | c = [24, 16, 8, 6, 4][severity - 1] 60 | hist, _ = np.histogram(img.flatten(), bins=c, range=[0, 255]) 61 | cdf = hist.cumsum() 62 | cdf_m = np.ma.masked_equal(cdf, 0) 63 | cdf_m = (cdf_m - cdf_m.min()) * 255 / (cdf_m.max() - cdf_m.min()) 64 | cdf = np.ma.filled(cdf_m, 0).astype('uint8') 65 | img = np.uint8(np.round(img / 255 * (c - 1))) 66 | img = cdf[img] 67 | img = np.clip(img, 0, 255) 68 | return img 69 | -------------------------------------------------------------------------------- /examples/degradation_toolkit/x_distortion/saturate.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | 4 | 5 | def saturate_weaken_HSV(img, severity=1): 6 | """ 7 | Saturate Weaken by scaling S channel in HSV. 8 | severity=[1, 2, 3, 4, 5] corresponding to scale=[0.7, 0.55, 0.4, 0.2, 0.0]. 9 | severity mainly refer to KADID-10K. 10 | 11 | @param img: Input image, H x W x 3, value range [0, 255] 12 | @param severity: Severity of distortion, [1, 5] 13 | @return: Degraded image, H x W x 3, value range [0, 255] 14 | """ 15 | c = [0.7, 0.55, 0.4, 0.2, 0.0][severity - 1] 16 | hsv = np.array(cv2.cvtColor(img, cv2.COLOR_RGB2HSV), dtype=np.float32) 17 | hsv[:, :, 1] = c * hsv[:, :, 1] 18 | hsv = np.uint8(np.clip(hsv, 0, 255)) 19 | img = cv2.cvtColor(hsv, cv2.COLOR_HSV2RGB) 20 | return img 21 | 22 | 23 | def saturate_weaken_YCrCb(img, severity=1): 24 | """ 25 | Saturate Weaken by scaling S channel in YCrCb. 26 | severity=[1, 2, 3, 4, 5] corresponding to scale=[0.6, 0.4, 0.2, 0.1, 0.0]. 27 | severity mainly refer to PieAPP. 28 | 29 | @param img: Input image, H x W x 3, value range [0, 255] 30 | @param severity: Severity of distortion, [1, 5] 31 | @return: Degraded image, H x W x 3, value range [0, 255] 32 | """ 33 | c = [0.6, 0.4, 0.2, 0.1, 0.0][severity - 1] 34 | ycrcb = np.array(cv2.cvtColor(img, cv2.COLOR_RGB2YCR_CB), dtype=np.float32) 35 | ycrcb[:, :, 1] = 128 + (ycrcb[:, :, 1] - 128) * c 36 | ycrcb[:, :, 2] = 128 + (ycrcb[:, :, 2] - 128) * c 37 | ycrcb = np.uint8(np.clip(ycrcb, 0, 255)) 38 | img = cv2.cvtColor(ycrcb, cv2.COLOR_YCR_CB2RGB) 39 | return img 40 | 41 | 42 | def saturate_strengthen_HSV(img, severity=1): 43 | """ 44 | Saturate Strengthen by scaling S channel in HSV. 45 | severity=[1, 2, 3, 4, 5] corresponding to scale=[3.0, 6.0, 12.0, 20.0, 64.0]. 46 | 47 | @param img: Input image, H x W x 3, value range [0, 255] 48 | @param severity: Severity of distortion, [1, 5] 49 | @return: Degraded image, H x W x 3, value range [0, 255] 50 | """ 51 | c = [3.0, 6.0, 12.0, 20.0, 64.0][severity - 1] 52 | hsv = np.array(cv2.cvtColor(img, cv2.COLOR_RGB2HSV), dtype=np.float32) 53 | hsv[:, :, 1] = c * hsv[:, :, 1] 54 | hsv = np.uint8(np.clip(hsv, 0, 255)) 55 | img = cv2.cvtColor(hsv, cv2.COLOR_HSV2RGB) 56 | return img 57 | 58 | 59 | def saturate_strengthen_YCrCb(img, severity=1): 60 | """ 61 | Saturate Strengthen by scaling S channel in YCrCb. 62 | severity=[1, 2, 3, 4, 5] corresponding to scale=[2.0, 3.0, 5.0, 8.0, 16.0]. 63 | severity mainly refer to PieAPP. 64 | 65 | @param img: Input image, H x W x 3, value range [0, 255] 66 | @param severity: Severity of distortion, [1, 5] 67 | @return: Degraded image, H x W x 3, value range [0, 255] 68 | """ 69 | c = [2.0, 3.0, 5.0, 8.0, 16.0][severity - 1] 70 | ycrcb = np.array(cv2.cvtColor(img, cv2.COLOR_RGB2YCR_CB), dtype=np.float32) 71 | ycrcb[:, :, 1] = 128 + (ycrcb[:, :, 1] - 128) * c 72 | ycrcb[:, :, 2] = 128 + (ycrcb[:, :, 2] - 128) * c 73 | ycrcb = np.uint8(np.clip(ycrcb, 0, 255)) 74 | img = cv2.cvtColor(ycrcb, cv2.COLOR_YCR_CB2RGB) 75 | return img 76 | -------------------------------------------------------------------------------- /examples/degradation_toolkit/x_distortion/spatter.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | from skimage.filters import gaussian 4 | 5 | def rgb2gray(rgb): 6 | return np.dot(rgb[..., :3], [0.2989, 0.5870, 0.1140]) 7 | 8 | def spatter(x, severity=1): 9 | c = [(0.65, 0.3, 4, 0.69, 0.6, 0), 10 | (0.65, 0.3, 3, 0.68, 0.6, 0), 11 | (0.65, 0.3, 2, 0.68, 0.5, 0), 12 | (0.65, 0.3, 1, 0.65, 1.5, 1), 13 | (0.67, 0.4, 1, 0.65, 1.5, 1)][severity - 1] 14 | x_PIL = x 15 | x = np.array(x, dtype=np.float32) / 255. 16 | 17 | liquid_layer = np.random.normal(size=x.shape[:2], loc=c[0], scale=c[1]) 18 | 19 | liquid_layer = gaussian(liquid_layer, sigma=c[2]) 20 | liquid_layer[liquid_layer < c[3]] = 0 21 | if c[5] == 0: 22 | liquid_layer = (liquid_layer * 255).astype(np.uint8) 23 | dist = 255 - cv2.Canny(liquid_layer, 50, 150) 24 | dist = cv2.distanceTransform(dist, cv2.DIST_L2, 5) 25 | _, dist = cv2.threshold(dist, 20, 20, cv2.THRESH_TRUNC) 26 | dist = cv2.blur(dist, (3, 3)).astype(np.uint8) 27 | dist = cv2.equalizeHist(dist) 28 | ker = np.array([[-2, -1, 0], [-1, 1, 1], [0, 1, 2]]) 29 | dist = cv2.filter2D(dist, cv2.CV_8U, ker) 30 | dist = cv2.blur(dist, (3, 3)).astype(np.float32) 31 | 32 | m = cv2.cvtColor(liquid_layer * dist, cv2.COLOR_GRAY2BGRA) 33 | m /= np.max(m, axis=(0, 1)) 34 | m *= c[4] 35 | # water is pale turqouise 36 | color = np.concatenate((175 / 255. * np.ones_like(m[..., :1]), 37 | 238 / 255. * np.ones_like(m[..., :1]), 38 | 238 / 255. * np.ones_like(m[..., :1])), axis=2) 39 | 40 | color = cv2.cvtColor(color, cv2.COLOR_BGR2BGRA) 41 | 42 | if len(x.shape) < 3 or x.shape[2] < 3: 43 | add_spatter_color = cv2.cvtColor(np.clip(m * color, 0, 1), 44 | cv2.COLOR_BGRA2BGR) 45 | add_spatter_gray = rgb2gray(add_spatter_color) 46 | 47 | return np.clip(x + add_spatter_gray, 0, 1) * 255 48 | 49 | else: 50 | 51 | x = cv2.cvtColor(x, cv2.COLOR_BGR2BGRA) 52 | 53 | return cv2.cvtColor(np.clip(x + m * color, 0, 1), 54 | cv2.COLOR_BGRA2BGR) * 255 55 | else: 56 | m = np.where(liquid_layer > c[3], 1, 0) 57 | m = gaussian(m.astype(np.float32), sigma=c[4]) 58 | m[m < 0.8] = 0 59 | 60 | x_rgb = np.array(x_PIL.convert('RGB')) 61 | 62 | # mud brown 63 | color = np.concatenate((63 / 255. * np.ones_like(x_rgb[..., :1]), 64 | 42 / 255. * np.ones_like(x_rgb[..., :1]), 65 | 20 / 255. * np.ones_like(x_rgb[..., :1])), 66 | axis=2) 67 | color *= m[..., np.newaxis] 68 | if len(x.shape) < 3 or x.shape[2] < 3: 69 | x *= (1 - m) 70 | return np.clip(x + rgb2gray(color), 0, 1) * 255 71 | 72 | else: 73 | x *= (1 - m[..., np.newaxis]) 74 | return np.clip(x + color, 0, 1) * 255 -------------------------------------------------------------------------------- /examples/examples/012cd3921e1f97d761eeff580f918ff9/012cd3921e1f97d761eeff580f918ff9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/012cd3921e1f97d761eeff580f918ff9/012cd3921e1f97d761eeff580f918ff9.jpg -------------------------------------------------------------------------------- /examples/examples/012cd3921e1f97d761eeff580f918ff9/012cd3921e1f97d761eeff580f918ff9_ben2-background-removal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/012cd3921e1f97d761eeff580f918ff9/012cd3921e1f97d761eeff580f918ff9_ben2-background-removal.jpg -------------------------------------------------------------------------------- /examples/examples/012cd3921e1f97d761eeff580f918ff9/012cd3921e1f97d761eeff580f918ff9_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/012cd3921e1f97d761eeff580f918ff9/012cd3921e1f97d761eeff580f918ff9_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/012cd3921e1f97d761eeff580f918ff9/012cd3921e1f97d761eeff580f918ff9_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/012cd3921e1f97d761eeff580f918ff9/012cd3921e1f97d761eeff580f918ff9_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/012cd3921e1f97d761eeff580f918ff9/012cd3921e1f97d761eeff580f918ff9_dsine_normal_map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/012cd3921e1f97d761eeff580f918ff9/012cd3921e1f97d761eeff580f918ff9_dsine_normal_map.jpg -------------------------------------------------------------------------------- /examples/examples/012cd3921e1f97d761eeff580f918ff9/012cd3921e1f97d761eeff580f918ff9_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/012cd3921e1f97d761eeff580f918ff9/012cd3921e1f97d761eeff580f918ff9_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/012cd3921e1f97d761eeff580f918ff9/012cd3921e1f97d761eeff580f918ff9_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/012cd3921e1f97d761eeff580f918ff9/012cd3921e1f97d761eeff580f918ff9_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/0fdaecdb7906a1bf0d6e202363f15de3/0fdaecdb7906a1bf0d6e202363f15de3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/0fdaecdb7906a1bf0d6e202363f15de3/0fdaecdb7906a1bf0d6e202363f15de3.jpg -------------------------------------------------------------------------------- /examples/examples/0fdaecdb7906a1bf0d6e202363f15de3/0fdaecdb7906a1bf0d6e202363f15de3_instantx-style_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/0fdaecdb7906a1bf0d6e202363f15de3/0fdaecdb7906a1bf0d6e202363f15de3_instantx-style_0.jpg -------------------------------------------------------------------------------- /examples/examples/0fdaecdb7906a1bf0d6e202363f15de3/0fdaecdb7906a1bf0d6e202363f15de3_instantx-style_0_style.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/0fdaecdb7906a1bf0d6e202363f15de3/0fdaecdb7906a1bf0d6e202363f15de3_instantx-style_0_style.jpg -------------------------------------------------------------------------------- /examples/examples/0fdaecdb7906a1bf0d6e202363f15de3/0fdaecdb7906a1bf0d6e202363f15de3_qwen2_5_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/0fdaecdb7906a1bf0d6e202363f15de3/0fdaecdb7906a1bf0d6e202363f15de3_qwen2_5_mask.jpg -------------------------------------------------------------------------------- /examples/examples/10d7dcae5240b8cc8c9427e876b4f462/10d7dcae5240b8cc8c9427e876b4f462.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/10d7dcae5240b8cc8c9427e876b4f462/10d7dcae5240b8cc8c9427e876b4f462.jpg -------------------------------------------------------------------------------- /examples/examples/10d7dcae5240b8cc8c9427e876b4f462/10d7dcae5240b8cc8c9427e876b4f462_instantx-style_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/10d7dcae5240b8cc8c9427e876b4f462/10d7dcae5240b8cc8c9427e876b4f462_instantx-style_0.jpg -------------------------------------------------------------------------------- /examples/examples/10d7dcae5240b8cc8c9427e876b4f462/10d7dcae5240b8cc8c9427e876b4f462_instantx-style_0_style.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/10d7dcae5240b8cc8c9427e876b4f462/10d7dcae5240b8cc8c9427e876b4f462_instantx-style_0_style.jpg -------------------------------------------------------------------------------- /examples/examples/10d7dcae5240b8cc8c9427e876b4f462/10d7dcae5240b8cc8c9427e876b4f462_qwen2_5_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/10d7dcae5240b8cc8c9427e876b4f462/10d7dcae5240b8cc8c9427e876b4f462_qwen2_5_mask.jpg -------------------------------------------------------------------------------- /examples/examples/2b74476568f7562a6aa832d423132ed3/2b74476568f7562a6aa832d423132ed3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2b74476568f7562a6aa832d423132ed3/2b74476568f7562a6aa832d423132ed3.jpg -------------------------------------------------------------------------------- /examples/examples/2b74476568f7562a6aa832d423132ed3/2b74476568f7562a6aa832d423132ed3_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2b74476568f7562a6aa832d423132ed3/2b74476568f7562a6aa832d423132ed3_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/2b74476568f7562a6aa832d423132ed3/2b74476568f7562a6aa832d423132ed3_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2b74476568f7562a6aa832d423132ed3/2b74476568f7562a6aa832d423132ed3_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/2b74476568f7562a6aa832d423132ed3/2b74476568f7562a6aa832d423132ed3_dsine_normal_map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2b74476568f7562a6aa832d423132ed3/2b74476568f7562a6aa832d423132ed3_dsine_normal_map.jpg -------------------------------------------------------------------------------- /examples/examples/2b74476568f7562a6aa832d423132ed3/2b74476568f7562a6aa832d423132ed3_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2b74476568f7562a6aa832d423132ed3/2b74476568f7562a6aa832d423132ed3_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/2b74476568f7562a6aa832d423132ed3/2b74476568f7562a6aa832d423132ed3_openpose_fullres_nohand.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2b74476568f7562a6aa832d423132ed3/2b74476568f7562a6aa832d423132ed3_openpose_fullres_nohand.jpg -------------------------------------------------------------------------------- /examples/examples/2b74476568f7562a6aa832d423132ed3/2b74476568f7562a6aa832d423132ed3_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2b74476568f7562a6aa832d423132ed3/2b74476568f7562a6aa832d423132ed3_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de.jpg -------------------------------------------------------------------------------- /examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_ben2-background-removal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_ben2-background-removal.jpg -------------------------------------------------------------------------------- /examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_dsine_normal_map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_dsine_normal_map.jpg -------------------------------------------------------------------------------- /examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_instantx-style_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_instantx-style_0.jpg -------------------------------------------------------------------------------- /examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_instantx-style_0_style.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_instantx-style_0_style.jpg -------------------------------------------------------------------------------- /examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/2c4e256fa512cb7e7f433f4c7f9101de/2c4e256fa512cb7e7f433f4c7f9101de_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a.jpg -------------------------------------------------------------------------------- /examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_ben2-background-removal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_ben2-background-removal.jpg -------------------------------------------------------------------------------- /examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_dsine_normal_map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_dsine_normal_map.jpg -------------------------------------------------------------------------------- /examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_instantx-style_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_instantx-style_0.jpg -------------------------------------------------------------------------------- /examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_instantx-style_0_style.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_instantx-style_0_style.jpg -------------------------------------------------------------------------------- /examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/53b3f413257bee9e499b823b44623b1a/53b3f413257bee9e499b823b44623b1a_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/5bf755ed9dbb9b3e223e7ba35232b06e/5bf755ed9dbb9b3e223e7ba35232b06e.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/5bf755ed9dbb9b3e223e7ba35232b06e/5bf755ed9dbb9b3e223e7ba35232b06e.jpg -------------------------------------------------------------------------------- /examples/examples/5bf755ed9dbb9b3e223e7ba35232b06e/5bf755ed9dbb9b3e223e7ba35232b06e_ben2-background-removal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/5bf755ed9dbb9b3e223e7ba35232b06e/5bf755ed9dbb9b3e223e7ba35232b06e_ben2-background-removal.jpg -------------------------------------------------------------------------------- /examples/examples/5bf755ed9dbb9b3e223e7ba35232b06e/5bf755ed9dbb9b3e223e7ba35232b06e_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/5bf755ed9dbb9b3e223e7ba35232b06e/5bf755ed9dbb9b3e223e7ba35232b06e_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/5bf755ed9dbb9b3e223e7ba35232b06e/5bf755ed9dbb9b3e223e7ba35232b06e_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/5bf755ed9dbb9b3e223e7ba35232b06e/5bf755ed9dbb9b3e223e7ba35232b06e_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/5bf755ed9dbb9b3e223e7ba35232b06e/5bf755ed9dbb9b3e223e7ba35232b06e_dsine_normal_map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/5bf755ed9dbb9b3e223e7ba35232b06e/5bf755ed9dbb9b3e223e7ba35232b06e_dsine_normal_map.jpg -------------------------------------------------------------------------------- /examples/examples/5bf755ed9dbb9b3e223e7ba35232b06e/5bf755ed9dbb9b3e223e7ba35232b06e_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/5bf755ed9dbb9b3e223e7ba35232b06e/5bf755ed9dbb9b3e223e7ba35232b06e_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a.jpg -------------------------------------------------------------------------------- /examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_ben2-background-removal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_ben2-background-removal.jpg -------------------------------------------------------------------------------- /examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_dsine_normal_map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_dsine_normal_map.jpg -------------------------------------------------------------------------------- /examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_edge.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_edge.jpg -------------------------------------------------------------------------------- /examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_instantx-style_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_instantx-style_0.jpg -------------------------------------------------------------------------------- /examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_instantx-style_0_style.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_instantx-style_0_style.jpg -------------------------------------------------------------------------------- /examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_openpose_fullres_nohand.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_openpose_fullres_nohand.jpg -------------------------------------------------------------------------------- /examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/78dc6506367d7aa43fe42a898abbfe4a/78dc6506367d7aa43fe42a898abbfe4a_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b.jpg -------------------------------------------------------------------------------- /examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_ben2-background-removal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_ben2-background-removal.jpg -------------------------------------------------------------------------------- /examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_dsine_normal_map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_dsine_normal_map.jpg -------------------------------------------------------------------------------- /examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_instantx-style_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_instantx-style_0.jpg -------------------------------------------------------------------------------- /examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_instantx-style_0_style.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_instantx-style_0_style.jpg -------------------------------------------------------------------------------- /examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/79f2ee632f1be3ad64210a641c4e201b/79f2ee632f1be3ad64210a641c4e201b_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4.jpg -------------------------------------------------------------------------------- /examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_ben2-background-removal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_ben2-background-removal.jpg -------------------------------------------------------------------------------- /examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_dsine_normal_map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_dsine_normal_map.jpg -------------------------------------------------------------------------------- /examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_instantx-style_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_instantx-style_0.jpg -------------------------------------------------------------------------------- /examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_instantx-style_0_style.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_instantx-style_0_style.jpg -------------------------------------------------------------------------------- /examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_openpose_fullres_nohand.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_openpose_fullres_nohand.jpg -------------------------------------------------------------------------------- /examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/88d0ba30e2c0bc4401cf2633cac162d4/88d0ba30e2c0bc4401cf2633cac162d4_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2.jpg -------------------------------------------------------------------------------- /examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2_ben2-background-removal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2_ben2-background-removal.jpg -------------------------------------------------------------------------------- /examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2_dsine_normal_map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2_dsine_normal_map.jpg -------------------------------------------------------------------------------- /examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2_openpose_fullres_nohand.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2_openpose_fullres_nohand.jpg -------------------------------------------------------------------------------- /examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/93bc1c43af2d6c91ac2fc966bf7725a2/93bc1c43af2d6c91ac2fc966bf7725a2_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/9c565b1aad76b22f5bb836744a93561a/9c565b1aad76b22f5bb836744a93561a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/9c565b1aad76b22f5bb836744a93561a/9c565b1aad76b22f5bb836744a93561a.jpg -------------------------------------------------------------------------------- /examples/examples/9c565b1aad76b22f5bb836744a93561a/9c565b1aad76b22f5bb836744a93561a_ben2-background-removal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/9c565b1aad76b22f5bb836744a93561a/9c565b1aad76b22f5bb836744a93561a_ben2-background-removal.jpg -------------------------------------------------------------------------------- /examples/examples/9c565b1aad76b22f5bb836744a93561a/9c565b1aad76b22f5bb836744a93561a_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/9c565b1aad76b22f5bb836744a93561a/9c565b1aad76b22f5bb836744a93561a_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/9c565b1aad76b22f5bb836744a93561a/9c565b1aad76b22f5bb836744a93561a_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/9c565b1aad76b22f5bb836744a93561a/9c565b1aad76b22f5bb836744a93561a_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/9c565b1aad76b22f5bb836744a93561a/9c565b1aad76b22f5bb836744a93561a_dsine_normal_map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/9c565b1aad76b22f5bb836744a93561a/9c565b1aad76b22f5bb836744a93561a_dsine_normal_map.jpg -------------------------------------------------------------------------------- /examples/examples/9c565b1aad76b22f5bb836744a93561a/9c565b1aad76b22f5bb836744a93561a_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/9c565b1aad76b22f5bb836744a93561a/9c565b1aad76b22f5bb836744a93561a_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/9c565b1aad76b22f5bb836744a93561a/9c565b1aad76b22f5bb836744a93561a_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/9c565b1aad76b22f5bb836744a93561a/9c565b1aad76b22f5bb836744a93561a_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/9d39f75f1f728e097efeaff39acb4710/9d39f75f1f728e097efeaff39acb4710.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/9d39f75f1f728e097efeaff39acb4710/9d39f75f1f728e097efeaff39acb4710.jpg -------------------------------------------------------------------------------- /examples/examples/9d39f75f1f728e097efeaff39acb4710/9d39f75f1f728e097efeaff39acb4710_ben2-background-removal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/9d39f75f1f728e097efeaff39acb4710/9d39f75f1f728e097efeaff39acb4710_ben2-background-removal.jpg -------------------------------------------------------------------------------- /examples/examples/9d39f75f1f728e097efeaff39acb4710/9d39f75f1f728e097efeaff39acb4710_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/9d39f75f1f728e097efeaff39acb4710/9d39f75f1f728e097efeaff39acb4710_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/9d39f75f1f728e097efeaff39acb4710/9d39f75f1f728e097efeaff39acb4710_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/9d39f75f1f728e097efeaff39acb4710/9d39f75f1f728e097efeaff39acb4710_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/9d39f75f1f728e097efeaff39acb4710/9d39f75f1f728e097efeaff39acb4710_dsine_normal_map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/9d39f75f1f728e097efeaff39acb4710/9d39f75f1f728e097efeaff39acb4710_dsine_normal_map.jpg -------------------------------------------------------------------------------- /examples/examples/9d39f75f1f728e097efeaff39acb4710/9d39f75f1f728e097efeaff39acb4710_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/9d39f75f1f728e097efeaff39acb4710/9d39f75f1f728e097efeaff39acb4710_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/9d39f75f1f728e097efeaff39acb4710/9d39f75f1f728e097efeaff39acb4710_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/9d39f75f1f728e097efeaff39acb4710/9d39f75f1f728e097efeaff39acb4710_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/de5a8b250bf407aa7e04913562dcba90/de5a8b250bf407aa7e04913562dcba90.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/de5a8b250bf407aa7e04913562dcba90/de5a8b250bf407aa7e04913562dcba90.jpg -------------------------------------------------------------------------------- /examples/examples/de5a8b250bf407aa7e04913562dcba90/de5a8b250bf407aa7e04913562dcba90_ben2-background-removal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/de5a8b250bf407aa7e04913562dcba90/de5a8b250bf407aa7e04913562dcba90_ben2-background-removal.jpg -------------------------------------------------------------------------------- /examples/examples/de5a8b250bf407aa7e04913562dcba90/de5a8b250bf407aa7e04913562dcba90_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/de5a8b250bf407aa7e04913562dcba90/de5a8b250bf407aa7e04913562dcba90_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/de5a8b250bf407aa7e04913562dcba90/de5a8b250bf407aa7e04913562dcba90_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/de5a8b250bf407aa7e04913562dcba90/de5a8b250bf407aa7e04913562dcba90_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/de5a8b250bf407aa7e04913562dcba90/de5a8b250bf407aa7e04913562dcba90_dsine_normal_map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/de5a8b250bf407aa7e04913562dcba90/de5a8b250bf407aa7e04913562dcba90_dsine_normal_map.jpg -------------------------------------------------------------------------------- /examples/examples/de5a8b250bf407aa7e04913562dcba90/de5a8b250bf407aa7e04913562dcba90_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/de5a8b250bf407aa7e04913562dcba90/de5a8b250bf407aa7e04913562dcba90_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/de5a8b250bf407aa7e04913562dcba90/de5a8b250bf407aa7e04913562dcba90_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/de5a8b250bf407aa7e04913562dcba90/de5a8b250bf407aa7e04913562dcba90_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/env/1_source.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/env/1_source.jpg -------------------------------------------------------------------------------- /examples/examples/env/1_target.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/env/1_target.jpg -------------------------------------------------------------------------------- /examples/examples/env/2_source.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/env/2_source.jpg -------------------------------------------------------------------------------- /examples/examples/env/2_target.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/env/2_target.jpg -------------------------------------------------------------------------------- /examples/examples/env/3_source.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/env/3_source.jpg -------------------------------------------------------------------------------- /examples/examples/env/3_target.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/env/3_target.jpg -------------------------------------------------------------------------------- /examples/examples/face/2ef6aa5a-e751-4bf2-a302-0237ab460627/face_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/face/2ef6aa5a-e751-4bf2-a302-0237ab460627/face_1.jpg -------------------------------------------------------------------------------- /examples/examples/face/2ef6aa5a-e751-4bf2-a302-0237ab460627/face_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/face/2ef6aa5a-e751-4bf2-a302-0237ab460627/face_6.jpg -------------------------------------------------------------------------------- /examples/examples/face/2ef6aa5a-e751-4bf2-a302-0237ab460627/face_8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/face/2ef6aa5a-e751-4bf2-a302-0237ab460627/face_8.jpg -------------------------------------------------------------------------------- /examples/examples/face/34e1633a-369f-4324-86c3-3e6418ec00be/face_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/face/34e1633a-369f-4324-86c3-3e6418ec00be/face_0.jpg -------------------------------------------------------------------------------- /examples/examples/face/34e1633a-369f-4324-86c3-3e6418ec00be/face_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/face/34e1633a-369f-4324-86c3-3e6418ec00be/face_1.jpg -------------------------------------------------------------------------------- /examples/examples/face/34e1633a-369f-4324-86c3-3e6418ec00be/face_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/face/34e1633a-369f-4324-86c3-3e6418ec00be/face_2.jpg -------------------------------------------------------------------------------- /examples/examples/face/cb5d403a-f1bb-4392-8302-24846893a797/face_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/face/cb5d403a-f1bb-4392-8302-24846893a797/face_0.jpg -------------------------------------------------------------------------------- /examples/examples/face/cb5d403a-f1bb-4392-8302-24846893a797/face_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/face/cb5d403a-f1bb-4392-8302-24846893a797/face_1.jpg -------------------------------------------------------------------------------- /examples/examples/face/cb5d403a-f1bb-4392-8302-24846893a797/face_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/face/cb5d403a-f1bb-4392-8302-24846893a797/face_2.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_dsine-normal-map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_dsine-normal-map.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_instantx-style_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_instantx-style_0.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_instantx-style_0_style.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_instantx-style_0_style.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_reference.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_reference.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_target.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00004-of-00022-7170/data-00004-of-00022-7170_target.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_dsine-normal-map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_dsine-normal-map.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_instantx-style_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_instantx-style_0.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_instantx-style_0_style.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_instantx-style_0_style.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_reference.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_reference.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_target.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00005-of-00022-4396/data-00005-of-00022-4396_target.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_dsine-normal-map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_dsine-normal-map.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_instantx-style_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_instantx-style_0.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_instantx-style_0_style.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_instantx-style_0_style.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_reference.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_reference.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_target.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00013-of-00022-4696/data-00013-of-00022-4696_target.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_dsine-normal-map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_dsine-normal-map.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_instantx-style_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_instantx-style_0.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_instantx-style_0_style.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_instantx-style_0_style.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_reference.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_reference.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_target.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00017-of-00022-8377/data-00017-of-00022-8377_target.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_canny_100_200_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_canny_100_200_512.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_depth-anything-v2_Large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_depth-anything-v2_Large.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_dsine-normal-map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_dsine-normal-map.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_hed_512.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_hed_512.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_instantx-style_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_instantx-style_0.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_instantx-style_0_style.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_instantx-style_0_style.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_reference.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_reference.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_sam2_mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_sam2_mask.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_target.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/data-00018-of-00022-4948/data-00018-of-00022-4948_target.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/editing/data-00004-of-00022-3633/data-00004-of-00022-3633_qwen_subject_replacement_1737373818845_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/editing/data-00004-of-00022-3633/data-00004-of-00022-3633_qwen_subject_replacement_1737373818845_1.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/editing/data-00004-of-00022-3633/data-00004-of-00022-3633_reference.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/editing/data-00004-of-00022-3633/data-00004-of-00022-3633_reference.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/editing/data-00004-of-00022-3633/data-00004-of-00022-3633_target.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/editing/data-00004-of-00022-3633/data-00004-of-00022-3633_target.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/editing/data-00004-of-00022-5419/data-00004-of-00022-5419_qwen_subject_replacement_1737377830929_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/editing/data-00004-of-00022-5419/data-00004-of-00022-5419_qwen_subject_replacement_1737377830929_2.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/editing/data-00004-of-00022-5419/data-00004-of-00022-5419_reference.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/editing/data-00004-of-00022-5419/data-00004-of-00022-5419_reference.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/editing/data-00004-of-00022-5419/data-00004-of-00022-5419_target.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/editing/data-00004-of-00022-5419/data-00004-of-00022-5419_target.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/editing/data-00012-of-00022-8475/data-00012-of-00022-8475_qwen_subject_replacement_1737410088010_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/editing/data-00012-of-00022-8475/data-00012-of-00022-8475_qwen_subject_replacement_1737410088010_2.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/editing/data-00012-of-00022-8475/data-00012-of-00022-8475_reference.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/editing/data-00012-of-00022-8475/data-00012-of-00022-8475_reference.jpg -------------------------------------------------------------------------------- /examples/examples/graph200k/editing/data-00012-of-00022-8475/data-00012-of-00022-8475_target.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/graph200k/editing/data-00012-of-00022-8475/data-00012-of-00022-8475_target.jpg -------------------------------------------------------------------------------- /examples/examples/omniedit/task_obj_add_273266.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/omniedit/task_obj_add_273266.jpg -------------------------------------------------------------------------------- /examples/examples/omniedit/task_obj_add_273266_edit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/omniedit/task_obj_add_273266_edit.jpg -------------------------------------------------------------------------------- /examples/examples/omniedit/task_obj_add_528329.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/omniedit/task_obj_add_528329.jpg -------------------------------------------------------------------------------- /examples/examples/omniedit/task_obj_add_528329_edit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/omniedit/task_obj_add_528329_edit.jpg -------------------------------------------------------------------------------- /examples/examples/omniedit/task_obj_remove_855511.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/omniedit/task_obj_remove_855511.jpg -------------------------------------------------------------------------------- /examples/examples/omniedit/task_obj_remove_855511_edit.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/omniedit/task_obj_remove_855511_edit.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksedgeeffect/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksedgeeffect/1.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksedgeeffect/1_blend.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksedgeeffect/1_blend.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksedgeeffect/34.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksedgeeffect/34.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksedgeeffect/34_blend.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksedgeeffect/34_blend.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksmagiceffects/24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksmagiceffects/24.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksmagiceffects/24_blend.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksmagiceffects/24_blend.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksmagiceffects/29.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksmagiceffects/29.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksmagiceffects/29_blend.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksmagiceffects/29_blend.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksmagiceffects/50.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksmagiceffects/50.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksmagiceffects/50_blend.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksmagiceffects/50_blend.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksmonstercalledlulu/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksmonstercalledlulu/5.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksmonstercalledlulu/5_blend.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksmonstercalledlulu/5_blend.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksmonstercalledlulu/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksmonstercalledlulu/6.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksmonstercalledlulu/6_blend.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksmonstercalledlulu/6_blend.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksmonstercalledlulu/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksmonstercalledlulu/9.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/sksmonstercalledlulu/9_blend.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/sksmonstercalledlulu/9_blend.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/skspaintingeffects/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/skspaintingeffects/12.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/skspaintingeffects/12_blend.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/skspaintingeffects/12_blend.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/skspaintingeffects/35.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/skspaintingeffects/35.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/skspaintingeffects/35_blend.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/skspaintingeffects/35_blend.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/skspaintingeffects/37.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/skspaintingeffects/37.jpg -------------------------------------------------------------------------------- /examples/examples/photodoodle/skspaintingeffects/37_blend.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/photodoodle/skspaintingeffects/37_blend.jpg -------------------------------------------------------------------------------- /examples/examples/property/1_source.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/property/1_source.jpg -------------------------------------------------------------------------------- /examples/examples/property/1_target.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/property/1_target.jpg -------------------------------------------------------------------------------- /examples/examples/property/2_source.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/property/2_source.jpg -------------------------------------------------------------------------------- /examples/examples/property/2_target.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/property/2_target.jpg -------------------------------------------------------------------------------- /examples/examples/property/3_source.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/property/3_source.jpg -------------------------------------------------------------------------------- /examples/examples/property/3_target.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/property/3_target.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02aee2a8df8f6e6f16ca4ec278203543656cecf1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02aee2a8df8f6e6f16ca4ec278203543656cecf1.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02aee2a8df8f6e6f16ca4ec278203543656cecf1_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02aee2a8df8f6e6f16ca4ec278203543656cecf1_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02af06c41208b31248e94da13166a675c862b003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02af06c41208b31248e94da13166a675c862b003.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02af06c41208b31248e94da13166a675c862b003_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02af06c41208b31248e94da13166a675c862b003_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02af9925c86c22b379e4e6d4f2762d66966ee281.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02af9925c86c22b379e4e6d4f2762d66966ee281.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02af9925c86c22b379e4e6d4f2762d66966ee281_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02af9925c86c22b379e4e6d4f2762d66966ee281_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02af99b6765a77a8f2ac87aa42d2f2453dcd590f.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02af99b6765a77a8f2ac87aa42d2f2453dcd590f.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02af99b6765a77a8f2ac87aa42d2f2453dcd590f_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02af99b6765a77a8f2ac87aa42d2f2453dcd590f_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02af9fa52ff41e64de8e3212683c9ed43bd91010.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02af9fa52ff41e64de8e3212683c9ed43bd91010.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02af9fa52ff41e64de8e3212683c9ed43bd91010_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02af9fa52ff41e64de8e3212683c9ed43bd91010_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02af9fa52ff41e64de8e3212683c9ed43bd91010_depth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02af9fa52ff41e64de8e3212683c9ed43bd91010_depth.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02afbcf084a1e35bda34c26d2271d56b6a1c621e.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02afbcf084a1e35bda34c26d2271d56b6a1c621e.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02afbcf084a1e35bda34c26d2271d56b6a1c621e_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02afbcf084a1e35bda34c26d2271d56b6a1c621e_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02b02e2916bf2eb3608f5a806dc3b7ecbed3b649.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02b02e2916bf2eb3608f5a806dc3b7ecbed3b649.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02b02e2916bf2eb3608f5a806dc3b7ecbed3b649_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02b02e2916bf2eb3608f5a806dc3b7ecbed3b649_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c02535d741e8800bf5fca514a85c29f7b4d115.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c02535d741e8800bf5fca514a85c29f7b4d115.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c02535d741e8800bf5fca514a85c29f7b4d115_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c02535d741e8800bf5fca514a85c29f7b4d115_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c032354830e33b94b50dee9a55113d91dae87b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c032354830e33b94b50dee9a55113d91dae87b.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c032354830e33b94b50dee9a55113d91dae87b_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c032354830e33b94b50dee9a55113d91dae87b_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c0359af5386b96429b8239783921088e007347.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c0359af5386b96429b8239783921088e007347.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c0359af5386b96429b8239783921088e007347_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c0359af5386b96429b8239783921088e007347_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c063fcc7f36018f6b55d26c6d4e05d43474d70.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c063fcc7f36018f6b55d26c6d4e05d43474d70.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c063fcc7f36018f6b55d26c6d4e05d43474d70_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c063fcc7f36018f6b55d26c6d4e05d43474d70_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c3760bf08f00d9e2163248e2864f5e1a70d709.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c3760bf08f00d9e2163248e2864f5e1a70d709.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c3760bf08f00d9e2163248e2864f5e1a70d709_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c3760bf08f00d9e2163248e2864f5e1a70d709_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c39e8e82f4be91d24252c8bfbfdef033ec8a32.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c39e8e82f4be91d24252c8bfbfdef033ec8a32.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c39e8e82f4be91d24252c8bfbfdef033ec8a32_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c39e8e82f4be91d24252c8bfbfdef033ec8a32_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c466ad25faefb2a8bbe84d20d5ca1beb323a6d.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c466ad25faefb2a8bbe84d20d5ca1beb323a6d.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c466ad25faefb2a8bbe84d20d5ca1beb323a6d_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c466ad25faefb2a8bbe84d20d5ca1beb323a6d_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c5200cac1d0f19256232a09708ac47f6ddfab3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c5200cac1d0f19256232a09708ac47f6ddfab3.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c5200cac1d0f19256232a09708ac47f6ddfab3_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c5200cac1d0f19256232a09708ac47f6ddfab3_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c53f12ec3d4a9a16d9b0ca3f7773ad2222100c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c53f12ec3d4a9a16d9b0ca3f7773ad2222100c.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c53f12ec3d4a9a16d9b0ca3f7773ad2222100c_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c53f12ec3d4a9a16d9b0ca3f7773ad2222100c_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c5cc03d46ce15494caaf3d65a2b2c7e09089f2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c5cc03d46ce15494caaf3d65a2b2c7e09089f2.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c5cc03d46ce15494caaf3d65a2b2c7e09089f2_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c5cc03d46ce15494caaf3d65a2b2c7e09089f2_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c6c0f92a672110ff86bd12f4aa0d0083c9cf6b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c6c0f92a672110ff86bd12f4aa0d0083c9cf6b.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c6c0f92a672110ff86bd12f4aa0d0083c9cf6b_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c6c0f92a672110ff86bd12f4aa0d0083c9cf6b_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c73157a981e0ee669ca8125018efbdda1e1483.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c73157a981e0ee669ca8125018efbdda1e1483.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c73157a981e0ee669ca8125018efbdda1e1483_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c73157a981e0ee669ca8125018efbdda1e1483_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c77b643fbdaec82912634655426553f3d7a537.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c77b643fbdaec82912634655426553f3d7a537.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c77b643fbdaec82912634655426553f3d7a537_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c77b643fbdaec82912634655426553f3d7a537_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c7df6c0decd3d542e25089a0af6afe1e070b6a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c7df6c0decd3d542e25089a0af6afe1e070b6a.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02c7df6c0decd3d542e25089a0af6afe1e070b6a_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02c7df6c0decd3d542e25089a0af6afe1e070b6a_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02daa50ac59bb9eabcbe0d5304af880d941bffc3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02daa50ac59bb9eabcbe0d5304af880d941bffc3.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02daa50ac59bb9eabcbe0d5304af880d941bffc3_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02daa50ac59bb9eabcbe0d5304af880d941bffc3_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02daa93f44c11ebbe5942cc0b781c12e125a6c65.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02daa93f44c11ebbe5942cc0b781c12e125a6c65.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02daa93f44c11ebbe5942cc0b781c12e125a6c65_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02daa93f44c11ebbe5942cc0b781c12e125a6c65_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dac14fc596c51077015d280ea564faa1f735b5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dac14fc596c51077015d280ea564faa1f735b5.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dac14fc596c51077015d280ea564faa1f735b5_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dac14fc596c51077015d280ea564faa1f735b5_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dad6943d2033198a89c1d5f222db2eacb293c6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dad6943d2033198a89c1d5f222db2eacb293c6.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dad6943d2033198a89c1d5f222db2eacb293c6_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dad6943d2033198a89c1d5f222db2eacb293c6_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dad6943d2033198a89c1d5f222db2eacb293c6_depth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dad6943d2033198a89c1d5f222db2eacb293c6_depth.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dafead46f6d59172d8df216c1f5ad11f9899b5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dafead46f6d59172d8df216c1f5ad11f9899b5.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dafead46f6d59172d8df216c1f5ad11f9899b5_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dafead46f6d59172d8df216c1f5ad11f9899b5_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02db22466eb3bc19d6a10195e1b48fff696c1582.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02db22466eb3bc19d6a10195e1b48fff696c1582.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02db22466eb3bc19d6a10195e1b48fff696c1582_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02db22466eb3bc19d6a10195e1b48fff696c1582_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02db31cb32e74620523955b70807b3e11815451c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02db31cb32e74620523955b70807b3e11815451c.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02db31cb32e74620523955b70807b3e11815451c_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02db31cb32e74620523955b70807b3e11815451c_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02db31cb32e74620523955b70807b3e11815451c_depth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02db31cb32e74620523955b70807b3e11815451c_depth.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02db5a81c222483058fecd76d62c5f7246b06ee4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02db5a81c222483058fecd76d62c5f7246b06ee4.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02db5a81c222483058fecd76d62c5f7246b06ee4_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02db5a81c222483058fecd76d62c5f7246b06ee4_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02db80670789cc6722f78747cf6ab8c292a898ab.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02db80670789cc6722f78747cf6ab8c292a898ab.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02db80670789cc6722f78747cf6ab8c292a898ab_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02db80670789cc6722f78747cf6ab8c292a898ab_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02db8a5f38464943d496bd3b475c36a3d65e7095.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02db8a5f38464943d496bd3b475c36a3d65e7095.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02db8a5f38464943d496bd3b475c36a3d65e7095_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02db8a5f38464943d496bd3b475c36a3d65e7095_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02db96d3ce2531dc4d51dda52492b78cf3577c56.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02db96d3ce2531dc4d51dda52492b78cf3577c56.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02db96d3ce2531dc4d51dda52492b78cf3577c56_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02db96d3ce2531dc4d51dda52492b78cf3577c56_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dc3e2cf9541a7d7ebff79cbf1fb0d95b4911e8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dc3e2cf9541a7d7ebff79cbf1fb0d95b4911e8.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dc3e2cf9541a7d7ebff79cbf1fb0d95b4911e8_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dc3e2cf9541a7d7ebff79cbf1fb0d95b4911e8_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dc42496c4ffdb2a8e101ed82943b26fc2d9d24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dc42496c4ffdb2a8e101ed82943b26fc2d9d24.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dc42496c4ffdb2a8e101ed82943b26fc2d9d24_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dc42496c4ffdb2a8e101ed82943b26fc2d9d24_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dc4ebfd90dc80dbc0f4174679ff3828605ec9c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dc4ebfd90dc80dbc0f4174679ff3828605ec9c.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dc4ebfd90dc80dbc0f4174679ff3828605ec9c_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dc4ebfd90dc80dbc0f4174679ff3828605ec9c_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dc6ca122863a582306a4f146b7bccb721a49e0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dc6ca122863a582306a4f146b7bccb721a49e0.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dc6ca122863a582306a4f146b7bccb721a49e0_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dc6ca122863a582306a4f146b7bccb721a49e0_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dca7ccfad757fd596d33563d06b3ab7836d5af.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dca7ccfad757fd596d33563d06b3ab7836d5af.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dca7ccfad757fd596d33563d06b3ab7836d5af_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dca7ccfad757fd596d33563d06b3ab7836d5af_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dcc762ae13127e3975ec043f13342490f61cf8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dcc762ae13127e3975ec043f13342490f61cf8.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dcc762ae13127e3975ec043f13342490f61cf8_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dcc762ae13127e3975ec043f13342490f61cf8_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dcc762ae13127e3975ec043f13342490f61cf8_depth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dcc762ae13127e3975ec043f13342490f61cf8_depth.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dcd82122ffe344c8d7c289dc770febb5121153.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dcd82122ffe344c8d7c289dc770febb5121153.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dcd82122ffe344c8d7c289dc770febb5121153_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dcd82122ffe344c8d7c289dc770febb5121153_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dd0f49dceaf611e0173319e26b4e6e1b7a6dd4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dd0f49dceaf611e0173319e26b4e6e1b7a6dd4.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dd0f49dceaf611e0173319e26b4e6e1b7a6dd4_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dd0f49dceaf611e0173319e26b4e6e1b7a6dd4_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dd0f49dceaf611e0173319e26b4e6e1b7a6dd4_depth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dd0f49dceaf611e0173319e26b4e6e1b7a6dd4_depth.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dd1c7c81e77e22ddba378a121fc371afcc9657.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dd1c7c81e77e22ddba378a121fc371afcc9657.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dd1c7c81e77e22ddba378a121fc371afcc9657_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dd1c7c81e77e22ddba378a121fc371afcc9657_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dd1c7c81e77e22ddba378a121fc371afcc9657_depth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dd1c7c81e77e22ddba378a121fc371afcc9657_depth.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dd6a91d0d1d17a9f06e999654b541b555da242.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dd6a91d0d1d17a9f06e999654b541b555da242.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dd6a91d0d1d17a9f06e999654b541b555da242_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dd6a91d0d1d17a9f06e999654b541b555da242_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dd6f77ccab6d63e7f2d7795f5d03180b46621c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dd6f77ccab6d63e7f2d7795f5d03180b46621c.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dd6f77ccab6d63e7f2d7795f5d03180b46621c_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dd6f77ccab6d63e7f2d7795f5d03180b46621c_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dd6f77ccab6d63e7f2d7795f5d03180b46621c_Left_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dd6f77ccab6d63e7f2d7795f5d03180b46621c_Left_2.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dd79a669a4522f1d5631d75c14243f927848b8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dd79a669a4522f1d5631d75c14243f927848b8.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dd79a669a4522f1d5631d75c14243f927848b8_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dd79a669a4522f1d5631d75c14243f927848b8_Left.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dd9913f85a62d9c1587b00f610cc753ebad649.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dd9913f85a62d9c1587b00f610cc753ebad649.jpg -------------------------------------------------------------------------------- /examples/examples/relighting/02dd9913f85a62d9c1587b00f610cc753ebad649_Left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/relighting/02dd9913f85a62d9c1587b00f610cc753ebad649_Left.jpg -------------------------------------------------------------------------------- /examples/examples/tryon/00555_00.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/tryon/00555_00.jpg -------------------------------------------------------------------------------- /examples/examples/tryon/00555_00_tryon_catvton_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/tryon/00555_00_tryon_catvton_0.jpg -------------------------------------------------------------------------------- /examples/examples/tryon/00700_00.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/tryon/00700_00.jpg -------------------------------------------------------------------------------- /examples/examples/tryon/00700_00_tryon_catvton_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/tryon/00700_00_tryon_catvton_0.jpg -------------------------------------------------------------------------------- /examples/examples/tryon/03673_00.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/tryon/03673_00.jpg -------------------------------------------------------------------------------- /examples/examples/tryon/12265_00.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/examples/examples/tryon/12265_00.jpg -------------------------------------------------------------------------------- /examples/gradio_tasks_editing.py: -------------------------------------------------------------------------------- 1 | import os 2 | from .prefix_instruction import get_image_prompt, get_task_instruction, get_layout_instruction, get_content_instruction 3 | import random 4 | from PIL import Image 5 | 6 | 7 | task_instruction = "In each row, a logical task is demonstrated to achieve [IMAGE2] a high-aesthetic image based on [IMAGE1] an aesthetically pleasing photograph. Each row shows a process to edit the image with the given editing instruction." 8 | editing_instruction = "The editing instruction in the last row is: " 9 | editing = [ 10 | dict( 11 | name='add', 12 | images=[ 13 | os.path.join('examples/examples/omniedit/task_obj_add_273266.jpg'), 14 | os.path.join('examples/examples/omniedit/task_obj_add_273266_edit.jpg'), 15 | os.path.join('examples/examples/omniedit/task_obj_add_528329.jpg'), 16 | os.path.join('examples/examples/omniedit/task_obj_add_528329_edit.jpg'), 17 | ], 18 | grid_h=2, 19 | grid_w=2, 20 | task_prompt=task_instruction + " " + editing_instruction + " Add a large hawk perched on a branch in the foreground. <\editing instruction>", 21 | content_prompt="", 22 | ), 23 | dict( 24 | name='remove', 25 | images=[ 26 | os.path.join('examples/examples/omniedit/task_obj_add_528329_edit.jpg'), 27 | os.path.join('examples/examples/omniedit/task_obj_add_528329.jpg'), 28 | os.path.join('examples/examples/omniedit/task_obj_remove_855511_edit.jpg'), 29 | os.path.join('examples/examples/omniedit/task_obj_remove_855511.jpg'), 30 | ], 31 | grid_h=2, 32 | grid_w=2, 33 | task_prompt=task_instruction + " " + editing_instruction + " Remove a small, orange and white monkey with black face sitting on a branch in the tree. <\editing instruction>", 34 | content_prompt="", 35 | ), 36 | ] 37 | editing_text = [[x['name']] for x in editing] 38 | 39 | 40 | def process_editing_tasks(x): 41 | for task in editing: 42 | if task['name'] == x[0]: 43 | task_prompt = task['task_prompt'] 44 | content_prompt = task['content_prompt'] 45 | 46 | images = task['images'] 47 | rets = [] 48 | for image in images: 49 | rets.append(Image.open(image)) 50 | 51 | grid_h = task['grid_h'] 52 | grid_w = task['grid_w'] 53 | mask = task.get('mask', [0 for _ in range(grid_w - 1)] + [1]) 54 | layout_prompt = get_layout_instruction(grid_w, grid_h) 55 | 56 | upsampling_noise = None 57 | steps = None 58 | outputs = [mask, grid_h, grid_w, layout_prompt, task_prompt, content_prompt, upsampling_noise, steps] + rets 59 | break 60 | 61 | return outputs 62 | 63 | def process_editing_tasks_w(x,grid_w,grid_h,c_prompt): 64 | for task in editing: 65 | if task['name'] == x[0]: 66 | task_prompt = task_instruction + " " + editing_instruction + f" {c_prompt}. <\editing instruction>" 67 | content_prompt = task['content_prompt'] 68 | 69 | 70 | mask = task.get('mask', [0 for _ in range(grid_w - 1)] + [1]) 71 | layout_prompt = get_layout_instruction(grid_w, grid_h) 72 | 73 | upsampling_noise = None 74 | steps = None 75 | outputs = [mask,layout_prompt, task_prompt, content_prompt, upsampling_noise, steps] 76 | break 77 | 78 | return outputs -------------------------------------------------------------------------------- /examples/gradio_tasks_tryon.py: -------------------------------------------------------------------------------- 1 | import os 2 | from .prefix_instruction import get_image_prompt, get_task_instruction, get_layout_instruction, get_content_instruction 3 | import random 4 | from PIL import Image 5 | 6 | 7 | task_instruction = "Each row shows a virtual try-on process that aims to put [IMAGE2] the clothing onto [IMAGE1] the person, producing [IMAGE3] the person wearing the new clothing." 8 | content_instruction = "" 9 | tryon = [ 10 | dict( 11 | name='Virtual Try-On', 12 | images=[ 13 | os.path.join('examples/examples/tryon/00700_00.jpg'), 14 | os.path.join('examples/examples/tryon/03673_00.jpg'), 15 | os.path.join('examples/examples/tryon/00700_00_tryon_catvton_0.jpg'), 16 | os.path.join('examples/examples/tryon/00555_00.jpg'), 17 | os.path.join('examples/examples/tryon/12265_00.jpg'), 18 | os.path.join('examples/examples/tryon/00555_00_tryon_catvton_0.jpg'), 19 | ], 20 | grid_h=2, 21 | grid_w=3, 22 | task_prompt=task_instruction, 23 | content_prompt=content_instruction, 24 | ), 25 | ] 26 | tryon_text = [[x['name']] for x in tryon] 27 | 28 | 29 | def process_tryon_tasks(x): 30 | for task in tryon: 31 | if task['name'] == x[0]: 32 | task_prompt = task['task_prompt'] 33 | content_prompt = task['content_prompt'] 34 | 35 | images = task['images'] 36 | rets = [] 37 | for image in images: 38 | rets.append(Image.open(image)) 39 | 40 | grid_h = task['grid_h'] 41 | grid_w = task['grid_w'] 42 | mask = task.get('mask', [0 for _ in range(grid_w - 1)] + [1]) 43 | layout_prompt = get_layout_instruction(grid_w, grid_h) 44 | 45 | upsampling_noise = None 46 | steps = None 47 | outputs = [mask, grid_h, grid_w, layout_prompt, task_prompt, content_prompt, upsampling_noise, steps] + rets 48 | break 49 | 50 | return outputs 51 | 52 | def process_tryon_tasks_w(x,grid_w, grid_h): 53 | for task in tryon: 54 | if task['name'] == x[0]: 55 | task_prompt = task['task_prompt'] 56 | content_prompt = task['content_prompt'] 57 | 58 | # images = task['images'] 59 | # rets = [] 60 | # for image in images: 61 | # rets.append(Image.open(image)) 62 | 63 | # grid_h = task['grid_h'] 64 | # grid_w = task['grid_w'] 65 | mask = task.get('mask', [0 for _ in range(grid_w - 1)] + [1]) 66 | layout_prompt = get_layout_instruction(grid_w, grid_h) 67 | 68 | upsampling_noise = None 69 | steps = None 70 | outputs = [mask, layout_prompt, task_prompt, content_prompt, upsampling_noise, steps] 71 | break 72 | 73 | return outputs 74 | -------------------------------------------------------------------------------- /exps/sample.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | guidance_scale=30.0 4 | seed=0 5 | steps=30 6 | solver=euler 7 | train_steps=0010000 8 | lora_rank=256 9 | resolution=384 10 | model_name=flux-dev-fill-lora 11 | 12 | exp_name=visualcloze_1x8_bs16_mbs2_rank256_lr1e-4_384 13 | model_path=output/${exp_name}/checkpoints/${train_steps}/consolidated.00-of-01.pth 14 | data_path=dataset/test/data.json 15 | output_path=output/${exp_name}/samples 16 | 17 | python -u sample.py --model_path ${model_path} \ 18 | --image_save_path ${output_path} \ 19 | --solver ${solver} --num_sampling_steps ${steps} \ 20 | --data_path ${data_path} \ 21 | --seed ${seed} \ 22 | --guidance_scale ${guidance_scale} \ 23 | --batch_size 1 \ 24 | --model_name ${model_name} \ 25 | --lora_rank ${lora_rank} \ 26 | --resolution ${resolution} -------------------------------------------------------------------------------- /exps/train.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | model_name=flux-dev-fill-lora 4 | train_data_root='configs/data/visualcloze.yaml' 5 | gpu_num=8 6 | node_num=1 7 | batch_size=16 8 | micro_batch_size=2 9 | lr=1e-4 10 | precision=bf16 11 | lora_rank=256 12 | snr_type=lognorm 13 | training_type="lora" 14 | grid_resolution=384 15 | exp_name=visualcloze_${node_num}x${gpu_num}_bs${batch_size}_mbs${micro_batch_size}_rank${lora_rank}_lr${lr}_${grid_resolution} 16 | results_dir=./output/${exp_name} 17 | mkdir -p ${results_dir} 18 | 19 | torchrun --nproc_per_node=${gpu_num} --nnodes=${node_num} --master_port 29339 train.py \ 20 | --global_bs ${batch_size} \ 21 | --micro_bs ${micro_batch_size} \ 22 | --data_path ${train_data_root} \ 23 | --results_dir ${results_dir} \ 24 | --lr ${lr} \ 25 | --grad_clip 2.0 \ 26 | --grid_resolution ${grid_resolution} \ 27 | --lora_rank ${lora_rank} \ 28 | --data_parallel fsdp \ 29 | --max_steps 1000000 \ 30 | --ckpt_every 5000 \ 31 | --log_every 1 \ 32 | --precision ${precision} \ 33 | --grad_precision fp32 \ 34 | --global_seed 20240826 \ 35 | --num_workers 4 \ 36 | --snr_type ${snr_type} \ 37 | --training_type ${training_type} \ 38 | --debug \ 39 | --load_t5 \ 40 | --load_clip \ 41 | --model_name ${model_name} \ 42 | --checkpointing 43 | -------------------------------------------------------------------------------- /figures/consolidate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/figures/consolidate.jpg -------------------------------------------------------------------------------- /figures/face.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/figures/face.jpg -------------------------------------------------------------------------------- /figures/graph200k.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/figures/graph200k.jpg -------------------------------------------------------------------------------- /figures/reverse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/figures/reverse.jpg -------------------------------------------------------------------------------- /figures/seen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/figures/seen.jpg -------------------------------------------------------------------------------- /figures/unseen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/figures/unseen.jpg -------------------------------------------------------------------------------- /figures/visualcloze.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smthemex/ComfyUI_VisualCloze/01018972e9b13b312ac074e413aaf82ff84bbb16/figures/visualcloze.png -------------------------------------------------------------------------------- /inference.py: -------------------------------------------------------------------------------- 1 | from visualcloze import VisualClozeModel 2 | import os 3 | from PIL import Image 4 | import argparse 5 | 6 | 7 | def get_example(): 8 | """ 9 | An example of Virtual Try-On. 10 | """ 11 | layout_prompt = "6 images are organized into a grid of 2 rows and 3 columns, evenly spaced." 12 | task_prompt = "Each row shows a virtual try-on process that aims to put [IMAGE2] the clothing onto [IMAGE1] the person, producing [IMAGE3] the person wearing the new clothing." 13 | content_prompt = "" # There is no content prompt in virtual try-on. 14 | prompts = [layout_prompt, task_prompt, content_prompt] 15 | # Given one in-context example, the grid_h is set to 2 (one in-context example and the current query). 16 | grid_h = 2 17 | # This task involves three images, including a person image, a cloth image, and the person wearing the new clothing, thus grid_w is set as 3. 18 | grid_w = 3 19 | grid = [ 20 | [ 21 | os.path.join('examples/examples/tryon/00700_00.jpg'), 22 | os.path.join('examples/examples/tryon/03673_00.jpg'), 23 | os.path.join('examples/examples/tryon/00700_00_tryon_catvton_0.jpg'), 24 | ], 25 | [ 26 | os.path.join('examples/examples/tryon/00555_00.jpg'), 27 | os.path.join('examples/examples/tryon/12265_00.jpg'), 28 | os.path.join('examples/examples/tryon/00555_00_tryon_catvton_0.jpg'), # The target image. 29 | ] 30 | ] 31 | images = [] 32 | for row in grid: 33 | images.append([]) 34 | for name in row: 35 | images[-1].append(Image.open(name)) 36 | images[-1][-1] = None # The target image is set as None. 37 | return images, prompts, grid_h, grid_w 38 | 39 | 40 | def parse_args(): 41 | parser = argparse.ArgumentParser() 42 | parser.add_argument("--model_path", type=str, required=True) 43 | parser.add_argument("--resolution", type=int, default=384) 44 | return parser.parse_args() 45 | 46 | 47 | if __name__ == '__main__': 48 | args = parse_args() 49 | 50 | images, prompts, grid_h, grid_w = get_example() 51 | 52 | model = VisualClozeModel( 53 | model_path=args.model_path, 54 | resolution=args.resolution, 55 | lora_rank=256 56 | ) 57 | ''' 58 | grid_h: 59 | The number of in-context examples + 1. It should be set to 1 when no in-context example. 60 | 61 | grid_w: 62 | The number of images involved in a task. For example, it should be 2 in depth-to-image, and 3 in virtual try-on. 63 | ''' 64 | model.set_grid_size(grid_h, grid_w) 65 | 66 | ''' 67 | images: 68 | List[List[PIL.Image.Image]]. A grid-layout image collection, each row represents an in-context example or the current query, where the current query should be placed in the last row. 69 | The target image should be None, and the other images should be the PIL Image class (Image.Image). 70 | 71 | prompts: 72 | List[str]. Three prompts, representing the layout prompt, task prompt, and content prompt, respectively. 73 | ''' 74 | result = model.process_images( 75 | images, 76 | prompts, 77 | )[-1] # return PIL.Image.Image 78 | 79 | result.save('example.jpg') -------------------------------------------------------------------------------- /models/__init__.py: -------------------------------------------------------------------------------- 1 | try: 2 | from ._version import ( 3 | version as __version__, # type: ignore 4 | version_tuple, 5 | ) 6 | except ImportError: 7 | __version__ = "unknown (no version information available)" 8 | version_tuple = (0, 0, "unknown", "noinfo") 9 | 10 | from pathlib import Path 11 | 12 | PACKAGE = __package__.replace("_", "-") 13 | PACKAGE_ROOT = Path(__file__).parent 14 | -------------------------------------------------------------------------------- /models/modules/conditioner.py: -------------------------------------------------------------------------------- 1 | from torch import Tensor, nn 2 | from transformers import CLIPTextModel, CLIPTokenizer, T5EncoderModel, T5Tokenizer 3 | 4 | 5 | class HFEmbedder(nn.Module): 6 | def __init__(self, version: str, max_length: int, **hf_kwargs): 7 | super().__init__() 8 | self.is_clip = version.startswith("openai") 9 | self.max_length = max_length 10 | self.output_key = "pooler_output" if self.is_clip else "last_hidden_state" 11 | 12 | if self.is_clip: 13 | self.tokenizer: CLIPTokenizer = CLIPTokenizer.from_pretrained(version, max_length=max_length) 14 | self.hf_module: CLIPTextModel = CLIPTextModel.from_pretrained(version, **hf_kwargs) 15 | else: 16 | self.tokenizer: T5Tokenizer = T5Tokenizer.from_pretrained(version, max_length=max_length) 17 | self.hf_module: T5EncoderModel = T5EncoderModel.from_pretrained(version, **hf_kwargs) 18 | 19 | self.hf_module = self.hf_module.eval().requires_grad_(False) 20 | 21 | def forward(self, text: list[str]) -> Tensor: 22 | batch_encoding = self.tokenizer( 23 | text, 24 | truncation=True, 25 | max_length=self.max_length, 26 | return_length=False, 27 | return_overflowing_tokens=False, 28 | padding="max_length", 29 | return_tensors="pt", 30 | ) 31 | 32 | outputs = self.hf_module( 33 | input_ids=batch_encoding["input_ids"].to(self.hf_module.device), 34 | attention_mask=None, 35 | output_hidden_states=False, 36 | ) 37 | return outputs[self.output_key] 38 | -------------------------------------------------------------------------------- /models/modules/image_embedders.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import cv2 4 | import numpy as np 5 | import torch 6 | from einops import rearrange, repeat 7 | from PIL import Image 8 | from safetensors.torch import load_file as load_sft 9 | from torch import nn 10 | from transformers import AutoModelForDepthEstimation, AutoProcessor, SiglipImageProcessor, SiglipVisionModel 11 | 12 | from ..util import print_load_warning 13 | 14 | 15 | class DepthImageEncoder: 16 | depth_model_name = "LiheYoung/depth-anything-large-hf" 17 | 18 | def __init__(self, device): 19 | self.device = device 20 | self.depth_model = AutoModelForDepthEstimation.from_pretrained(self.depth_model_name).to(device) 21 | self.processor = AutoProcessor.from_pretrained(self.depth_model_name) 22 | 23 | def __call__(self, img: torch.Tensor) -> torch.Tensor: 24 | hw = img.shape[-2:] 25 | 26 | img = torch.clamp(img, -1.0, 1.0) 27 | img_byte = ((img + 1.0) * 127.5).byte() 28 | 29 | img = self.processor(img_byte, return_tensors="pt")["pixel_values"] 30 | depth = self.depth_model(img.to(self.device)).predicted_depth 31 | depth = repeat(depth, "b h w -> b 3 h w") 32 | depth = torch.nn.functional.interpolate(depth, hw, mode="bicubic", antialias=True) 33 | 34 | depth = depth / 127.5 - 1.0 35 | return depth 36 | 37 | 38 | class CannyImageEncoder: 39 | def __init__( 40 | self, 41 | device, 42 | min_t: int = 50, 43 | max_t: int = 200, 44 | ): 45 | self.device = device 46 | self.min_t = min_t 47 | self.max_t = max_t 48 | 49 | def __call__(self, img: torch.Tensor) -> torch.Tensor: 50 | assert img.shape[0] == 1, "Only batch size 1 is supported" 51 | 52 | img = rearrange(img[0], "c h w -> h w c") 53 | img = torch.clamp(img, -1.0, 1.0) 54 | img_np = ((img + 1.0) * 127.5).numpy().astype(np.uint8) 55 | 56 | # Apply Canny edge detection 57 | canny = cv2.Canny(img_np, self.min_t, self.max_t) 58 | 59 | # Convert back to torch tensor and reshape 60 | canny = torch.from_numpy(canny).float() / 127.5 - 1.0 61 | canny = rearrange(canny, "h w -> 1 1 h w") 62 | canny = repeat(canny, "b 1 ... -> b 3 ...") 63 | return canny.to(self.device) 64 | 65 | 66 | class ReduxImageEncoder(nn.Module): 67 | siglip_model_name = "google/siglip-so400m-patch14-384" 68 | 69 | def __init__( 70 | self, 71 | device, 72 | redux_dim: int = 1152, 73 | txt_in_features: int = 4096, 74 | redux_path: str | None = os.getenv("FLUX_REDUX"), 75 | dtype=torch.bfloat16, 76 | ) -> None: 77 | assert redux_path is not None, "Redux path must be provided" 78 | 79 | super().__init__() 80 | 81 | self.redux_dim = redux_dim 82 | self.device = device if isinstance(device, torch.device) else torch.device(device) 83 | self.dtype = dtype 84 | 85 | with self.device: 86 | self.redux_up = nn.Linear(redux_dim, txt_in_features * 3, dtype=dtype) 87 | self.redux_down = nn.Linear(txt_in_features * 3, txt_in_features, dtype=dtype) 88 | 89 | sd = load_sft(redux_path, device=str(device)) 90 | missing, unexpected = self.load_state_dict(sd, strict=False, assign=True) 91 | print_load_warning(missing, unexpected) 92 | 93 | self.siglip = SiglipVisionModel.from_pretrained(self.siglip_model_name).to(dtype=dtype) 94 | self.normalize = SiglipImageProcessor.from_pretrained(self.siglip_model_name) 95 | 96 | def __call__(self, x: Image.Image) -> torch.Tensor: 97 | imgs = self.normalize.preprocess(images=[x], do_resize=True, return_tensors="pt", do_convert_rgb=True) 98 | 99 | _encoded_x = self.siglip(**imgs.to(device=self.device, dtype=self.dtype)).last_hidden_state 100 | 101 | projected_x = self.redux_down(nn.functional.silu(self.redux_up(_encoded_x))) 102 | 103 | return projected_x 104 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "visualcloze" 3 | description = "VisualCloze: A Universal Image Generation Framework via Visual In-Context Learning,you can use it in ComfyUI" 4 | version = "1.0.0" 5 | license = {file = "LICENSE"} 6 | dependencies = ["torchdiffeq", "numpy", "diffusers", "fairscale", "accelerate", "transformers", "huggingface-hub", "tensorboard", "gradio", "click", "opencv-python", "scikit-image", "numba", "scipy", "tqdm", "einops", "sentencepiece"] 7 | 8 | [project.urls] 9 | Repository = "https://github.com/smthemex/ComfyUI_VisualCloze" 10 | # Used by Comfy Registry https://comfyregistry.org 11 | 12 | [tool.comfy] 13 | PublisherId = "smthemex" 14 | DisplayName = "ComfyUI_VisualCloze" 15 | Icon = "" 16 | -------------------------------------------------------------------------------- /transport/__init__.py: -------------------------------------------------------------------------------- 1 | from .transport import ModelType, PathType, Sampler, Transport, WeightType 2 | 3 | 4 | def create_transport( 5 | path_type="Linear", 6 | prediction="velocity", 7 | loss_weight=None, 8 | train_eps=None, 9 | sample_eps=None, 10 | snr_type="uniform", 11 | loss_type="mse", 12 | do_shift=True, 13 | ): 14 | """function for creating Transport object 15 | **Note**: model prediction defaults to velocity 16 | Args: 17 | - path_type: type of path to use; default to linear 18 | - learn_score: set model prediction to score 19 | - learn_noise: set model prediction to noise 20 | - velocity_weighted: weight loss by velocity weight 21 | - likelihood_weighted: weight loss by likelihood weight 22 | - train_eps: small epsilon for avoiding instability during training 23 | - sample_eps: small epsilon for avoiding instability during sampling 24 | """ 25 | 26 | if prediction == "noise": 27 | model_type = ModelType.NOISE 28 | elif prediction == "score": 29 | model_type = ModelType.SCORE 30 | else: 31 | model_type = ModelType.VELOCITY 32 | 33 | path_choice = { 34 | "Linear": PathType.LINEAR, 35 | "GVP": PathType.GVP, 36 | "VP": PathType.VP, 37 | } 38 | 39 | path_type = path_choice[path_type] 40 | 41 | if path_type in [PathType.VP]: 42 | train_eps = 1e-5 if train_eps is None else train_eps 43 | sample_eps = 1e-3 if sample_eps is None else sample_eps 44 | elif path_type in [PathType.GVP, PathType.LINEAR] and model_type != ModelType.VELOCITY: 45 | train_eps = 1e-3 if train_eps is None else train_eps 46 | sample_eps = 1e-3 if sample_eps is None else sample_eps 47 | else: # velocity & [GVP, LINEAR] is stable everywhere 48 | train_eps = 0 49 | sample_eps = 0 50 | 51 | # create flow state 52 | state = Transport( 53 | model_type=model_type, 54 | path_type=path_type, 55 | train_eps=train_eps, 56 | sample_eps=sample_eps, 57 | snr_type=snr_type, 58 | loss_type=loss_type, 59 | do_shift=do_shift, 60 | ) 61 | 62 | return state 63 | -------------------------------------------------------------------------------- /transport/integrators.py: -------------------------------------------------------------------------------- 1 | import torch as th 2 | from torchdiffeq import odeint 3 | from .utils import time_shift, get_lin_function 4 | 5 | class sde: 6 | """SDE solver class""" 7 | 8 | def __init__( 9 | self, 10 | drift, 11 | diffusion, 12 | *, 13 | t0, 14 | t1, 15 | num_steps, 16 | sampler_type, 17 | ): 18 | assert t0 < t1, "SDE sampler has to be in forward time" 19 | 20 | self.num_timesteps = num_steps 21 | self.t = th.linspace(t0, t1, num_steps) 22 | self.dt = self.t[1] - self.t[0] 23 | self.drift = drift 24 | self.diffusion = diffusion 25 | self.sampler_type = sampler_type 26 | 27 | def __Euler_Maruyama_step(self, x, mean_x, t, model, **model_kwargs): 28 | w_cur = th.randn(x.size()).to(x) 29 | t = th.ones(x.size(0)).to(x) * t 30 | dw = w_cur * th.sqrt(self.dt) 31 | drift = self.drift(x, t, model, **model_kwargs) 32 | diffusion = self.diffusion(x, t) 33 | mean_x = x + drift * self.dt 34 | x = mean_x + th.sqrt(2 * diffusion) * dw 35 | return x, mean_x 36 | 37 | def __Heun_step(self, x, _, t, model, **model_kwargs): 38 | w_cur = th.randn(x.size()).to(x) 39 | dw = w_cur * th.sqrt(self.dt) 40 | t_cur = th.ones(x.size(0)).to(x) * t 41 | diffusion = self.diffusion(x, t_cur) 42 | xhat = x + th.sqrt(2 * diffusion) * dw 43 | K1 = self.drift(xhat, t_cur, model, **model_kwargs) 44 | xp = xhat + self.dt * K1 45 | K2 = self.drift(xp, t_cur + self.dt, model, **model_kwargs) 46 | return ( 47 | xhat + 0.5 * self.dt * (K1 + K2), 48 | xhat, 49 | ) # at last time point we do not perform the heun step 50 | 51 | def __forward_fn(self): 52 | """TODO: generalize here by adding all private functions ending with steps to it""" 53 | sampler_dict = { 54 | "Euler": self.__Euler_Maruyama_step, 55 | "Heun": self.__Heun_step, 56 | } 57 | 58 | try: 59 | sampler = sampler_dict[self.sampler_type] 60 | except: 61 | raise NotImplementedError("Smapler type not implemented.") 62 | 63 | return sampler 64 | 65 | def sample(self, init, model, **model_kwargs): 66 | """forward loop of sde""" 67 | x = init 68 | mean_x = init 69 | samples = [] 70 | sampler = self.__forward_fn() 71 | for ti in self.t[:-1]: 72 | with th.no_grad(): 73 | x, mean_x = sampler(x, mean_x, ti, model, **model_kwargs) 74 | samples.append(x) 75 | 76 | return samples 77 | 78 | 79 | class ode: 80 | """ODE solver class""" 81 | 82 | def __init__( 83 | self, 84 | drift, 85 | *, 86 | t0, 87 | t1, 88 | sampler_type, 89 | num_steps, 90 | atol, 91 | rtol, 92 | do_shift=True, 93 | time_shifting_factor=None, 94 | ): 95 | assert t0 < t1, "ODE sampler has to be in forward time" 96 | 97 | self.drift = drift 98 | self.do_shift = do_shift 99 | self.t = th.linspace(t0, t1, num_steps) 100 | if time_shifting_factor: 101 | self.t = self.t / (self.t + time_shifting_factor - time_shifting_factor * self.t) 102 | self.atol = atol 103 | self.rtol = rtol 104 | self.sampler_type = sampler_type 105 | 106 | def sample(self, x, model, model_kwargs): 107 | device = x[0].device if isinstance(x, tuple) else x.device 108 | def _fn(t, x): 109 | t = th.ones(x[0].size(0)).to(device) * t if isinstance(x, tuple) else th.ones(x.size(0)).to(device) * t 110 | model_output = self.drift(x, t, model, **model_kwargs) 111 | return model_output 112 | 113 | t = self.t.to(device) 114 | if self.do_shift: 115 | mu = get_lin_function(y1=0.5, y2=1.15)(x.shape[1]) 116 | t = time_shift(mu, 1.0, t) 117 | atol = [self.atol] * len(x) if isinstance(x, tuple) else [self.atol] 118 | rtol = [self.rtol] * len(x) if isinstance(x, tuple) else [self.rtol] 119 | samples = odeint(_fn, x, t, method=self.sampler_type, atol=atol, rtol=rtol) 120 | return samples 121 | -------------------------------------------------------------------------------- /transport/utils.py: -------------------------------------------------------------------------------- 1 | import torch as th 2 | import math 3 | 4 | class EasyDict: 5 | def __init__(self, sub_dict): 6 | for k, v in sub_dict.items(): 7 | setattr(self, k, v) 8 | 9 | def __getitem__(self, key): 10 | return getattr(self, key) 11 | 12 | 13 | def mean_flat(x): 14 | """ 15 | Take the mean over all non-batch dimensions. 16 | """ 17 | return th.mean(x, dim=list(range(1, len(x.size())))) 18 | 19 | 20 | def log_state(state): 21 | result = [] 22 | 23 | sorted_state = dict(sorted(state.items())) 24 | for key, value in sorted_state.items(): 25 | # Check if the value is an instance of a class 26 | if "= 2 * image_size: 14 | pil_image = pil_image.resize(tuple(x // 2 for x in pil_image.size), resample=Image.BOX) 15 | 16 | scale = image_size / min(*pil_image.size) 17 | pil_image = pil_image.resize(tuple(round(x * scale) for x in pil_image.size), resample=Image.BICUBIC) 18 | 19 | arr = np.array(pil_image) 20 | crop_y = (arr.shape[0] - image_size) // 2 21 | crop_x = (arr.shape[1] - image_size) // 2 22 | return Image.fromarray(arr[crop_y : crop_y + image_size, crop_x : crop_x + image_size]) 23 | 24 | 25 | def center_crop(pil_image, crop_size): 26 | while pil_image.size[0] >= 2 * crop_size[0] and pil_image.size[1] >= 2 * crop_size[1]: 27 | pil_image = pil_image.resize(tuple(x // 2 for x in pil_image.size), resample=Image.BOX) 28 | 29 | scale = max(crop_size[0] / pil_image.size[0], crop_size[1] / pil_image.size[1]) 30 | pil_image = pil_image.resize(tuple(round(x * scale) for x in pil_image.size), resample=Image.BICUBIC) 31 | 32 | crop_left = random.randint(0, pil_image.size[0] - crop_size[0]) 33 | crop_upper = random.randint(0, pil_image.size[1] - crop_size[1]) 34 | crop_right = crop_left + crop_size[0] 35 | crop_lower = crop_upper + crop_size[1] 36 | return pil_image.crop(box=(crop_left, crop_upper, crop_right, crop_lower)) 37 | 38 | 39 | def pad(pil_image, pad_size): 40 | while pil_image.size[0] >= 2 * pad_size[0] and pil_image.size[1] >= 2 * pad_size[1]: 41 | pil_image = pil_image.resize(tuple(x // 2 for x in pil_image.size), resample=Image.BOX) 42 | 43 | scale = min(pad_size[0] / pil_image.size[0], pad_size[1] / pil_image.size[1]) 44 | pil_image = pil_image.resize(tuple(round(x * scale) for x in pil_image.size), resample=Image.BICUBIC) 45 | 46 | new_image = Image.new('RGB', pad_size, (255, 255, 255)) 47 | new_image.paste(pil_image, (0, 0)) 48 | return new_image 49 | 50 | 51 | def var_center_crop(pil_image, crop_size_list, random_top_k=4): 52 | w, h = pil_image.size 53 | rem_percent = [min(cw / w, ch / h) / max(cw / w, ch / h) for cw, ch in crop_size_list] 54 | crop_size = random.choice( 55 | sorted(((x, y) for x, y in zip(rem_percent, crop_size_list)), reverse=True)[:random_top_k] 56 | )[1] 57 | return center_crop(pil_image, crop_size) 58 | 59 | 60 | def var_pad(pil_image, pad_size_list, random_top_k=4): 61 | w, h = pil_image.size 62 | rem_percent = [min(cw / w, ch / h) / max(cw / w, ch / h) for cw, ch in pad_size_list] 63 | crop_size = random.choice( 64 | sorted(((x, y) for x, y in zip(rem_percent, pad_size_list)), reverse=True)[:random_top_k] 65 | )[1] 66 | return pad(pil_image, crop_size) 67 | 68 | 69 | def match_size(w, h, crop_size_list, random_top_k=4): 70 | rem_percent = [min(cw / w, ch / h) / max(cw / w, ch / h) for cw, ch in crop_size_list] 71 | crop_size = random.choice( 72 | sorted(((x, y) for x, y in zip(rem_percent, crop_size_list)), reverse=True)[:random_top_k] 73 | )[1] 74 | return crop_size 75 | 76 | 77 | def generate_crop_size_list(num_patches, patch_size, max_ratio=4.0, step_size=1): 78 | assert max_ratio >= 1.0 79 | crop_size_list = [] 80 | wp, hp = num_patches, step_size 81 | while wp > 0: 82 | if max(wp, hp) / min(wp, hp) <= max_ratio: 83 | crop_size_list.append((wp * patch_size, hp * patch_size)) 84 | if (hp + step_size) * wp <= num_patches: 85 | hp += step_size 86 | else: 87 | wp -= step_size 88 | return crop_size_list 89 | 90 | def to_rgb_if_rgba(img: Image.Image): 91 | if img.mode.upper() == "RGBA": 92 | rgb_img = Image.new("RGB", img.size, (255, 255, 255)) 93 | rgb_img.paste(img, mask=img.split()[3]) # 3 is the alpha channel 94 | return rgb_img 95 | else: 96 | return img 97 | -------------------------------------------------------------------------------- /util/parallel.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import datetime 4 | import os 5 | import subprocess 6 | from time import sleep 7 | 8 | import fairscale.nn.model_parallel.initialize as fs_init 9 | import torch 10 | import torch.distributed as dist 11 | 12 | 13 | def _setup_dist_env_from_slurm(args): 14 | while not os.environ.get("MASTER_ADDR", ""): 15 | os.environ["MASTER_ADDR"] = ( 16 | subprocess.check_output( 17 | "sinfo -Nh -n %s | head -n 1 | awk '{print $1}'" % os.environ["SLURM_NODELIST"], 18 | shell=True, 19 | ) 20 | .decode() 21 | .strip() 22 | ) 23 | sleep(1) 24 | os.environ["MASTER_PORT"] = str(args.master_port) 25 | os.environ["RANK"] = os.environ["SLURM_PROCID"] 26 | os.environ["WORLD_SIZE"] = os.environ["SLURM_NPROCS"] 27 | os.environ["LOCAL_RANK"] = os.environ["SLURM_LOCALID"] 28 | os.environ["LOCAL_WORLD_SIZE"] = os.environ["SLURM_NTASKS_PER_NODE"] 29 | 30 | 31 | _INTRA_NODE_PROCESS_GROUP, _INTER_NODE_PROCESS_GROUP = None, None 32 | _LOCAL_RANK, _LOCAL_WORLD_SIZE = -1, -1 33 | 34 | 35 | def get_local_rank() -> int: 36 | return _LOCAL_RANK 37 | 38 | 39 | def get_local_world_size() -> int: 40 | return _LOCAL_WORLD_SIZE 41 | 42 | 43 | def distributed_init(args): 44 | if any([x not in os.environ for x in ["RANK", "WORLD_SIZE", "MASTER_PORT", "MASTER_ADDR"]]): 45 | _setup_dist_env_from_slurm(args) 46 | 47 | dist.init_process_group("nccl", timeout=datetime.timedelta(seconds=2 * 60 * 60)) 48 | fs_init.initialize_model_parallel(args.model_parallel_size) 49 | torch.cuda.set_device(dist.get_rank() % torch.cuda.device_count()) 50 | 51 | global _LOCAL_RANK, _LOCAL_WORLD_SIZE 52 | _LOCAL_RANK = int(os.environ["LOCAL_RANK"]) 53 | _LOCAL_WORLD_SIZE = int(os.environ["LOCAL_WORLD_SIZE"]) 54 | 55 | global _INTRA_NODE_PROCESS_GROUP, _INTER_NODE_PROCESS_GROUP 56 | local_ranks, local_world_sizes = [ 57 | torch.empty([dist.get_world_size()], dtype=torch.long, device="cuda") for _ in (0, 1) 58 | ] 59 | dist.all_gather_into_tensor(local_ranks, torch.tensor(get_local_rank(), device="cuda")) 60 | dist.all_gather_into_tensor(local_world_sizes, torch.tensor(get_local_world_size(), device="cuda")) 61 | local_ranks, local_world_sizes = local_ranks.tolist(), local_world_sizes.tolist() 62 | node_ranks = [[0]] 63 | for i in range(1, dist.get_world_size()): 64 | if len(node_ranks[-1]) == local_world_sizes[i - 1]: 65 | node_ranks.append([]) 66 | else: 67 | assert local_world_sizes[i] == local_world_sizes[i - 1] 68 | node_ranks[-1].append(i) 69 | for ranks in node_ranks: 70 | group = dist.new_group(ranks) 71 | if dist.get_rank() in ranks: 72 | assert _INTRA_NODE_PROCESS_GROUP is None 73 | _INTRA_NODE_PROCESS_GROUP = group 74 | assert _INTRA_NODE_PROCESS_GROUP is not None 75 | 76 | if min(local_world_sizes) == max(local_world_sizes): 77 | for i in range(get_local_world_size()): 78 | group = dist.new_group(list(range(i, dist.get_world_size(), get_local_world_size()))) 79 | if i == get_local_rank(): 80 | assert _INTER_NODE_PROCESS_GROUP is None 81 | _INTER_NODE_PROCESS_GROUP = group 82 | assert _INTER_NODE_PROCESS_GROUP is not None 83 | 84 | 85 | def get_intra_node_process_group(): 86 | assert _INTRA_NODE_PROCESS_GROUP is not None, "Intra-node process group is not initialized." 87 | return _INTRA_NODE_PROCESS_GROUP 88 | 89 | 90 | def get_inter_node_process_group(): 91 | assert _INTRA_NODE_PROCESS_GROUP is not None, "Intra- and inter-node process groups are not initialized." 92 | return _INTER_NODE_PROCESS_GROUP 93 | --------------------------------------------------------------------------------