fofr / image-merger

Merge two images, with an optional third for controlnet. (Updated 1 year, 4 months ago)

  • Public
  • 6.6K runs
  • GitHub
  • License
Iterate in playground

Input

*file
Preview
image_1
number
(minimum: 0, maximum: 1)

The strength of the first image

Default: 1

*file
Preview
image_2
number
(minimum: 0, maximum: 1)

The strength of the second image

Default: 1

string

The mode to use for merging the images

Default: "full"

string
Shift + Return to add a new line

A prompt to guide the image merging

Default: "a photo"

string
Shift + Return to add a new line

Things you do not want in the merged image

Default: "ugly, broken, distorted"

integer

Default: 768

integer

Default: 768

integer

Default: 20

file
Preview
control_image

An optional image to use with control net to influence the merging

integer

Fix the random seed for reproducibility

boolean

Default: false

integer

The number of steps per controlnet tile

Default: 20

boolean

Animate merging from one image to the other. Only the video is returned.

Default: false

integer

The number of frames to generate for the animation

Default: 24

boolean

Return any temporary files, such as preprocessed controlnet images. Useful for debugging.

Default: false

Output

output
Generated in

Run time and cost

This model costs approximately $0.012 to run on Replicate, or 83 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia L40S GPU hardware. Predictions typically complete within 13 seconds. The predict time for this model varies significantly based on the inputs.

Readme

A ComfyUI based model: https://github.com/fofr/cog-comfyui-image-merge

You can merge two images and use an optional third as a controlnet input.

Merge options include: full – each image applies to the whole image left_right - first on left, second on right top_bottom – first on top, second on bottom

When using controlnet, openpose, depth and canny nets are applied.

The 2x upscaler uses controlnet tile to upscale.