Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
dba4f3b4
Commit
dba4f3b4
authored
Nov 19, 2023
by
comfyanonymous
Browse files
Add a RepeatImageBatch node.
parent
d9d8702d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
comfy_extras/nodes_images.py
comfy_extras/nodes_images.py
+15
-0
No files found.
comfy_extras/nodes_images.py
View file @
dba4f3b4
...
@@ -23,7 +23,22 @@ class ImageCrop:
...
@@ -23,7 +23,22 @@ class ImageCrop:
img
=
image
[:,
y
:
to_y
,
x
:
to_x
,
:]
img
=
image
[:,
y
:
to_y
,
x
:
to_x
,
:]
return
(
img
,)
return
(
img
,)
class
RepeatImageBatch
:
@
classmethod
def
INPUT_TYPES
(
s
):
return
{
"required"
:
{
"image"
:
(
"IMAGE"
,),
"amount"
:
(
"INT"
,
{
"default"
:
1
,
"min"
:
1
,
"max"
:
64
}),
}}
RETURN_TYPES
=
(
"IMAGE"
,)
FUNCTION
=
"repeat"
CATEGORY
=
"image/batch"
def
repeat
(
self
,
image
,
amount
):
s
=
image
.
repeat
((
amount
,
1
,
1
,
1
))
return
(
s
,)
NODE_CLASS_MAPPINGS
=
{
NODE_CLASS_MAPPINGS
=
{
"ImageCrop"
:
ImageCrop
,
"ImageCrop"
:
ImageCrop
,
"RepeatImageBatch"
:
RepeatImageBatch
,
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment