fix add_grain.py for ramdom grain in batch images
This commit is contained in:
+3
-3
@@ -33,9 +33,9 @@ class AddGrain:
|
||||
|
||||
ret_images = []
|
||||
|
||||
for i in image:
|
||||
_canvas = tensor2pil(torch.unsqueeze(i, 0)).convert('RGB')
|
||||
_canvas = image_add_grain(_canvas, grain_scale, grain_power, grain_sat, toe=0, seed=int(time.time()))
|
||||
for i in range(len(image)):
|
||||
_canvas = tensor2pil(torch.unsqueeze(image[i], 0)).convert('RGB')
|
||||
_canvas = image_add_grain(_canvas, grain_scale, grain_power, grain_sat, toe=0, seed=int(time.time()) + i)
|
||||
ret_images.append(pil2tensor(_canvas))
|
||||
|
||||
log(f"{self.NODE_NAME} Processed {len(ret_images)} image(s).", message_type='finish')
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui_layerstyle"
|
||||
description = "A set of nodes for ComfyUI it generate image like Adobe Photoshop's Layer Style. the Drop Shadow is first completed node, and follow-up work is in progress."
|
||||
version = "2.0.12"
|
||||
version = "2.0.13"
|
||||
license = "MIT"
|
||||
dependencies = ["numpy", "pillow", "torch", "matplotlib", "Scipy", "scikit_image", "scikit_learn", "opencv-contrib-python", "pymatting", "timm", "colour-science", "transformers", "blend_modes", "huggingface_hub", "loguru"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user