hazxone / img2img-vg

Img2Img diffusion in the style of Van Gogh

  • Public
  • 342 runs
  • Paper
Iterate in playground

Input

image
string
Shift + Return to add a new line

Input prompt

Default: "A fantasy landscape, trending on artstation"

string
Shift + Return to add a new line

The prompt NOT to guide the image generation. Ignored when not using guidance

*file

Inital image to generate variations of.

integer

Width of output image. Maximum size is 1024x768 or 768x1024 because of memory limits

Default: 512

integer

Height of output image. Maximum size is 1024x768 or 768x1024 because of memory limits

Default: 512

number

Prompt strength when providing the image. 1.0 corresponds to full destruction of information in init image

Default: 0.8

integer
(minimum: 1, maximum: 8)

Number of images to output. Higher number of outputs may OOM.

Default: 1

integer
(minimum: 1, maximum: 500)

Number of denoising steps

Default: 25

number
(minimum: 1, maximum: 20)

Scale for classifier-free guidance

Default: 7.5

string

Choose a scheduler.

Default: "DPMSolverMultistep"

integer

Random seed. Leave blank to randomize the seed

Output

output
Generated in

This output was created using a different version of the model, hazxone/img2img-vg:76b75995.

Run time and cost

This model costs approximately $0.040 to run on Replicate, or 25 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 T4 GPU hardware. Predictions typically complete within 3 minutes. The predict time for this model varies significantly based on the inputs.

Readme

Replicate img2img model in the style of Van Gogh

This is an img2img in the style of Van Gogh. It was written in cog format to be push to replicate.com

[Replicate version 3edc1fe] This diffusion model was made from training 58 images of Van Gogh paintings (https://huggingface.co/hazwan/vg-session). It is a mix of portrait and landscape.

This model does not look visually appealing because the original painting is more abstract compared to the Loving Vincent model below which trained on a movie that carefully made in the style of Van Gogh

[Replicate version 76b7599] The diffusion model is from https://huggingface.co/dallinmackay/Van-Gogh-diffusion

cog.yaml specify the dependencies and python libraries

predict.py is to consume input (image and prompt) and run the input through the diffusion model

 

Cog process

To initialize the directory

cog init

 

To build locally and do inference to the image balloon.jpg

cog predict -i prompt="vangh, man" -i image=@imgs/man_1.jpg"

 

Next add credential and push the build to replicate.com

cog login
cog push r8.im/hazxone/img2img-vg

 

Inference process

Head over to https://replicate.com/hazxone/img2img-vg to try the web demo

For the 3edc1fe model, use ‘vangh’ as the trigger word

For the 76b7599 model, use ‘lvngvncnt’ in the beginning of the prompt.