logerzhu / ad-inpaint

Product advertising image generator

  • Public
  • 542.5K runs
  • A100 (80GB)

Input

image_path
*file

input image

string

Max product size

Default: "Original"

*string
Shift + Return to add a new line

Product name or prompt

string
Shift + Return to add a new line

Anything you don't want in the photo

Default: "low quality, out of frame, illustration, 3d, sepia, painting, cartoons, sketch, watermark, text, Logo, advertisement"

string
Shift + Return to add a new line

OpenAI api_key, enhance prompt with ChatGPT if provided

string

image total pixel

Default: "512 * 512"

integer
(minimum: 0, maximum: 4)

Factor to scale image by (maximum: 4)

Default: 3

integer
(minimum: 0, maximum: 4)

Number of image to generate

Default: 1

number

Guidance Scale

Default: 7.5

integer

Inference Steps

Default: 20

integer

Manual Seed

Default: -1

Output

outputoutputoutputoutputoutput
Generated in

Run time and cost

This model costs approximately $0.056 to run on Replicate, or 17 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 A100 (80GB) GPU hardware. Predictions typically complete within 40 seconds. The predict time for this model varies significantly based on the inputs.

Readme

Automatically generate product advertising image.

This is a Demo based on stable-diffusion-2-inpainting and ControlNet, repaint the product background.

  • It is recommended to use Product png images with a transparent background. Non-transparent image will use the product image extracted by Tracer-B7 Networks.

  • prompt / negative_prompt uses the compel library for embedding, supporting the format of “Weighting + - (word)0.9”.