update example
Browse filesFiles changed (21)
- app.py+85-11
- imgs/demo_cases.pngAdded
- imgs/demo_cases/AI_Pioneers.jpgAdded
- imgs/demo_cases/edit.pngAdded
- imgs/demo_cases/entity.pngAdded
- imgs/demo_cases/reasoning.pngAdded
- imgs/demo_cases/same_pose.pngAdded
- imgs/demo_cases/skeletal.pngAdded
- imgs/demo_cases/skeletal2img.pngAdded
- imgs/demo_cases/t2i_woman_with_book.pngAdded
- imgs/overall.jpgAdded
- imgs/test_cases/cat.jpegAdded
- imgs/test_cases/control.jpgAdded
- imgs/test_cases/lecun.pngAdded
- imgs/test_cases/pose.pngAdded
- imgs/test_cases/two_man.jpgAdded
- imgs/test_cases/watch.jpgAdded
- imgs/test_cases/woman.pngAdded
- imgs/test_cases/yifei2.pngAdded
- imgs/test_cases/young_musk.jpgAdded
- imgs/test_cases/young_trump.jpegAdded
46 unmodified lines4748495050515253545556565758585960616261626364656667676869697071727374757677787980818272738384858687888990919293949596979899100101102103104105751061071081091101111121131141151161171181191201217812212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716846 unmodified linesdef get_example(): case = [ [ "A woman holds a bouquet of flowers and faces the camera.", "A vintage camera placed on the ground, ejecting a swirling cloud of Polaroid-style photographs into the air. The photos, showing landscapes, wildlife, and travel scenes, seem to defy gravity, floating upward in a vortex of motion. The camera emits a glowing, smoky light from within, enhancing the magical, surreal atmosphere. The dark background contrasts with the illuminated photos and camera, creating a dreamlike, nostalgic scene filled with vibrant colors and dynamic movement. Scattered photos are visible on the ground, further contributing to the idea of an explosion of captured memories.", None, None, None, 1024, 1024, 3.0, 2.5, 50, 42, 0, ], [ "A woman holds a bouquet of flowers and faces the camera. Thw woman is the one in <img><|image_1|></img>.", "./imgs/test_cases/liuyifei.png", "A woman <img><|image_1|></img> in a wedding dress. Next to her is a black-haired man.", "./imgs/test_cases/yifei2.png", None, None, 1024, 1024, 3.0, 2.5, 50, 42, 0, ], [ "A man in a black shirt is reading a book. The man is the right man in <img><|image_1|></img>.", "./imgs/test_cases/two_man.jpg", None, None, 1024, 1024, 2.5, 50, 0, ], [ "Three zebras are standing side by side on a vibrant savannah, each showcasing unique patterns and characteristics that highlight their individuality. The zebra on the left has a strikingly bold black and white stripe pattern, with wider stripes that create a dramatic contrast against its sleek body. In the middle, the zebra features a more subtle stripe arrangement, with thinner stripes that blend seamlessly into a slightly sandy-colored coat, giving it a softer appearance. On the right, the zebra's stripes are more irregular, with a distinct patch of brown fur near its shoulder, adding a layer of uniqueness to its overall look. Together, these zebras create a captivating scene, each representing the diverse beauty of their species in the wild. The right zebras is the zebras from <img><|image_1|></img>. The center zebras is from <img><|image_2|></img>. The left zebras is the zebras from <img><|image_3|></img>.", "./imgs/test_cases/img1.jpg", "Two men are celebrating with raised glasses in a restaurant. A man is <img><|image_1|></img>. The other man is <img><|image_2|></img>.", "./imgs/test_cases/young_musk.jpg", "./imgs/test_cases/img2.jpg", None, 1024, 1024, 2.5, 50, 0, ], [ "<img><|image_1|><img>\n Remove the woman's earrings. Replace the mug with a clear glass filled with sparkling iced cola.", "./imgs/demo_cases/t2i_woman_with_book.png", None, None, 1024, 1024, 2.5, 50, 222, ], [ "Detect the skeleton of human in this image: <img><|image_1|></img>.", "./imgs/test_cases/img3.jpg", "./imgs/test_cases/control.jpg", None, None, 1024, 1024, 2.0, 50, 0, ], [ "Generate a new photo using the following picture and text as conditions: <img><|image_1|><img>\n A young boy is sitting on a sofa in the library, holding a book. His hair is neatly combed, and a faint smile plays on his lips, with a few freckles scattered across his cheeks. The library is quiet, with rows of shelves filled with books stretching out behind him.", "./imgs/demo_cases/skeletal.png", None, None, 1024, 1024, 3.0, 2, 50, 42, ], [ "Following the pose of this image <img><|image_1|><img>, generate a new photo: A young boy is sitting on a sofa in the library, holding a book. His hair is neatly combed, and a faint smile plays on his lips, with a few freckles scattered across his cheeks. The library is quiet, with rows of shelves filled with books stretching out behind him.", "./imgs/demo_cases/edit.png", None, None, 1024, 1024, 2.0, 50, 123, ], [ "<img><|image_1|><\/img> What item can be used to see the current time? Please remove it.", "./imgs/test_cases/watch.jpg", None, None, 1024, 1024, 2.5, 50, 0, ], ] return case
def run_for_examples(text, img1, img2, img3, height, width, guidance_scale, inference_steps, seed): return generate_image(text, img1, img2, img3, height, width, guidance_scale, inference_steps, seed)
description = """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 example, use a 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>.""""
# Gradio ζ₯ε£with gr.Blocks() as demo: gr.Markdown("# OmniGen: Unified Image Generation [paper](https://arxiv.org/abs/2409.11340) [code](https://github.com/VectorSpaceLab/OmniGen)") gr.Markdown(description) with gr.Row(): with gr.Column(): # ζζ¬θΎε
₯ζ‘app.py+85-11
imgs/demo_cases.pngAdded

Large File Pointer Details
- SHA256: 0517c97c947f8226f0f39b4ca2ac61b058e52faa59ec5085668062d0162dd21e
- Pointer size: 132 Bytes
- Size of remote file: 3.42 MB
imgs/demo_cases/AI_Pioneers.jpgAdded

Large File Pointer Details
- SHA256: 0b7f51ae11a11781027d1f9e1e8d566438f937508e16c627bfb60acca5b1d7c0
- Pointer size: 131 Bytes
- Size of remote file: 101 kB
imgs/demo_cases/edit.pngAdded

Large File Pointer Details
- SHA256: 889f3da462745ffdb4c3300099ea941d0a75db3259e8eaa1dbc95f8a28f11c70
- Pointer size: 132 Bytes
- Size of remote file: 1.24 MB
imgs/demo_cases/entity.pngAdded

Large File Pointer Details
- SHA256: f99af692215c6292ab64b26450bb1eb2b7bc6d5c2f450f21a9953e37455fe1b5
- Pointer size: 132 Bytes
- Size of remote file: 1.27 MB
imgs/demo_cases/reasoning.pngAdded

Large File Pointer Details
- SHA256: 0df9b7aab47e59d792bf5148f1797eea966064dbf6fec3ba8b169facf51c09d7
- Pointer size: 132 Bytes
- Size of remote file: 1.24 MB
imgs/demo_cases/same_pose.pngAdded

Large File Pointer Details
- SHA256: 2359fe0b95233c418f554e2dd98c39d9bc79053be0242569286f90d50201313a
- Pointer size: 132 Bytes
- Size of remote file: 1.36 MB
imgs/demo_cases/skeletal.pngAdded

Large File Pointer Details
- SHA256: 7f05a79ce9ae0179fe4948568cb71dc3fbc8e9f6b2ecf5a839fa255dfce0aaf6
- Pointer size: 131 Bytes
- Size of remote file: 105 kB
imgs/demo_cases/skeletal2img.pngAdded

Large File Pointer Details
- SHA256: 3d538579f45fce26053f2af83a7aea5be12f2270fba2282a17e9d3bae0c2e91d
- Pointer size: 132 Bytes
- Size of remote file: 1.32 MB
imgs/demo_cases/t2i_woman_with_book.pngAdded

Large File Pointer Details
- SHA256: 624ae749478b4ced358c6482385fd35271cbfe25eea0581d2a323bffebde8b39
- Pointer size: 132 Bytes
- Size of remote file: 1.25 MB
imgs/overall.jpgAdded

Large File Pointer Details
- SHA256: ffa229632ac0bb248eee87cf823a0dc18c22c0a81a57d4c639e7fb1986d4e029
- Pointer size: 132 Bytes
- Size of remote file: 1.13 MB
imgs/test_cases/cat.jpegAdded

Large File Pointer Details
- SHA256: 076d8d520f68d1cf2f6a66366721e03ad20cf9d385839f5c26b3d2060bb6d789
- Pointer size: 129 Bytes
- Size of remote file: 6.11 kB
imgs/test_cases/control.jpgAdded

Large File Pointer Details
- SHA256: 5ca485995cb5f4b1b792e39a99e9647745291f92689eb40f1da925f19dfdc1b5
- Pointer size: 132 Bytes
- Size of remote file: 1.32 MB
imgs/test_cases/lecun.pngAdded

Large File Pointer Details
- SHA256: 99d66323fe33f81d561c481fce08eb43f03d110fdbe54b237f7f985f54d9102a
- Pointer size: 131 Bytes
- Size of remote file: 294 kB
imgs/test_cases/pose.pngAdded

Large File Pointer Details
- SHA256: 9ef21d4a7117fd14a2057f653fa48e4a31f3fc849787fa188a8c1656657706d0
- Pointer size: 130 Bytes
- Size of remote file: 97.4 kB
imgs/test_cases/two_man.jpgAdded

Large File Pointer Details
- SHA256: 7c940253b06b1b32d472375b445474571bd7838a01fcd069b2ae34fb3e5d8d1f
- Pointer size: 132 Bytes
- Size of remote file: 1.28 MB
imgs/test_cases/watch.jpgAdded

Large File Pointer Details
- SHA256: f930542af14fc7816e32cc429cbd7855d4420ad797e1ff72aa523b61778ee9f4
- Pointer size: 131 Bytes
- Size of remote file: 493 kB
imgs/test_cases/woman.pngAdded

Large File Pointer Details
- SHA256: 911f596d617d89bde63ecb8aaf1fde71d1fa183d4ac0cdac770a9fc8627a3b50
- Pointer size: 132 Bytes
- Size of remote file: 1.48 MB
imgs/test_cases/yifei2.pngAdded

Large File Pointer Details
- SHA256: a0087233e61184829ab345d6be2991918e85727076e0d4f8c7bbfc865ca4d6d0
- Pointer size: 131 Bytes
- Size of remote file: 101 kB
imgs/test_cases/young_musk.jpgAdded

Large File Pointer Details
- SHA256: 91290c822c51d51302ae2d4e67b924d329b9b7faa767ca238f9b58736c0610f7
- Pointer size: 130 Bytes
- Size of remote file: 43.3 kB
imgs/test_cases/young_trump.jpegAdded

Large File Pointer Details
- SHA256: 4329fdb452774bf0517e19c91065ea7e87e4d2e874c6e3da2d5ee8a64093b4a0
- Pointer size: 131 Bytes
- Size of remote file: 320 kB