OmniGen: Unified Image Generation paper code

OmniGen is a unified image generation model that you can use to perform various tasks, including but not limited to text-to-image generation, subject-driven generation, Identity-Preserving Generation, and image-conditioned generation.

For multi-modal to image generation, you should pass a string as prompt, and a list of image paths as input_images. The placeholder in the prompt should be in the format of <img><|image_*|></img> (for the first image, the placeholder is <|image_1|>. for the second image, the the placeholder is <|image_2|>). For example, use an image of a woman to generate a new image: prompt = "A woman holds a bouquet of flowers and faces the camera. Thw woman is <img><|image_1|></img>."

Tips:

  • Oversaturated: If the image appears oversaturated, please reduce the guidance_scale.
  • Low-quality: More detailed prompt will lead to better results.
  • Animate Style: If the genereate images is in animate style, you can try to add photo to the prompt`.
  • Edit generated image. If you generate a image by omnigen and then want to edit it, you cannot use the same seed to edit this image. For example, use seed=0 to generate image, and should use seed=1 to edit this image.
  • For image editing tasks, we recommend placing the image before the editing instruction. For example, use <img><|image_1|></img> remove suit, rather than remove suit <img><|image_1|></img>.
256 2048
256 2048
1 5
1 2
1 100
0 2147483647
Examples
Enter your prompt, use <img><|image_i|></img> to represent i-th input image <img><|image_1|></img> <img><|image_2|></img> <img><|image_3|></img> Height Width Guidance Scale img_guidance_scale Inference Steps Seed
Pages: