Sponsored by
Vmake Labs Video Enhancer
-Vmake Labs Video Enhancer uses AI to improve video quality, restore details, reduce blur, and upscale videos to 8K.
OmniGen is a unified image generation model that can generate a wide range of images from multi-modal prompts. It is designed to be simple, flexible and easy to use. We provide
inference code
so that everyone can explore more functionalities of OmniGen.
Existing image generation models often require loading several additional network modules (such as ControlNet, IP-Adapter, Reference-Net, etc.) and performing extra preprocessing steps (e.g., face detection, pose estimation, cropping, etc.) to generate a satisfactory image. However,
we believe that the future image generation paradigm should be more simple and flexible, that is, generating various images directly through arbitrarily multi-modal instructions without the need for additional plugins and operations, similar to how GPT works in language generation.
Due to the limited resources, OmniGen still has room for improvement. We will continue to optimize it, and hope it inspire more universal image generation models. You can also easily fine-tune OmniGen without worrying about designing networks for specific tasks; you just need to prepare the corresponding data, and then run the
script
. Imagination is no longer limited; everyone can construct any image generation task, and perhaps we can achieve very interesting, wonderful and creative things.
If you have any questions, ideas or interesting tasks you want OmniGen to accomplish, feel free to discuss with us:
[email protected]
,
[email protected]
,
[email protected]
. We welcome any feedback to help us improve the model.
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, image editing, and image-conditioned generation.
OmniGen don't need additional plugins or operations, it can automatically identify the features (e.g., required object, human pose, depth mapping) in input images according the text prompt.
We showcase some examples in
inference.ipynb
. And in
inference_demo.ipynb
, we show a insteresting pipeline to generate and modify a image.
If you are not entirely satisfied with certain functionalities or wish to add new capabilities, you can try
fine-tuning OmniGen
.
5. Quick Start
Using OmniGen
Install via Github(Recommend):
git clone https://github.com/staoxiao/OmniGen.git
cd OmniGen
pip install -e .
or via pypi:
pip install OmniGen
Here are some examples:
from OmniGen import OmniGenPipeline
pipe = OmniGenPipeline.from_pretrained("Shitao/OmniGen-v1")
# Text to Image
images = pipe(
prompt="A curly-haired man in a red shirt is drinking tea.",
height=1024,
width=1024,
guidance_scale=2.5,
seed=0,
)
images[0].save("example_t2i.png") # save output PIL Image# Multi-modal to Image# In prompt, we use the placeholder to represent the image. The image placeholder should be in the format of <img><|image_*|></img># You can add multiple images in the input_images. Please ensure that each image has its placeholder. For example, for the list input_images [img1_path, img2_path], the prompt needs to have two placeholders: <img><|image_1|></img>, <img><|image_2|></img>.
images = pipe(
prompt="A man in a black shirt is reading a book. The man is the right man in <img><|image_1|></img>."
input_images=["./imgs/test_cases/two_man.jpg"]
height=1024,
width=1024,
separate_cfg_infer=False, # if OOM, you can set separate_cfg_infer=True
guidance_scale=3,
img_guidance_scale=1.6
)
images[0].save("example_ti2i.png") # save output PIL image
If you find this repository useful, please consider giving a star ⭐ and citation
@article{xiao2024omnigen,
title={Omnigen: Unified image generation},
author={Xiao, Shitao and Wang, Yueze and Zhou, Junjie and Yuan, Huaying and Xing, Xingrun and Yan, Ruiran and Wang, Shuting and Huang, Tiejun and Liu, Zheng},
journal={arXiv preprint arXiv:2409.11340},
year={2024}
}
Runs of silveroxides OmniGen-V1-fp8_e4m3fn on huggingface.co
46
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
31
30-day runs
More Information About OmniGen-V1-fp8_e4m3fn huggingface.co Model
OmniGen-V1-fp8_e4m3fn huggingface.co is an AI model on huggingface.co that provides OmniGen-V1-fp8_e4m3fn's model effect (), which can be used instantly with this silveroxides OmniGen-V1-fp8_e4m3fn model. huggingface.co supports a free trial of the OmniGen-V1-fp8_e4m3fn model, and also provides paid use of the OmniGen-V1-fp8_e4m3fn. Support call OmniGen-V1-fp8_e4m3fn model through api, including Node.js, Python, http.
OmniGen-V1-fp8_e4m3fn huggingface.co is an online trial and call api platform, which integrates OmniGen-V1-fp8_e4m3fn's modeling effects, including api services, and provides a free online trial of OmniGen-V1-fp8_e4m3fn, you can try OmniGen-V1-fp8_e4m3fn online for free by clicking the link below.
silveroxides OmniGen-V1-fp8_e4m3fn online free url in huggingface.co:
OmniGen-V1-fp8_e4m3fn is an open source model from GitHub that offers a free installation service, and any user can find OmniGen-V1-fp8_e4m3fn on GitHub to install. At the same time, huggingface.co provides the effect of OmniGen-V1-fp8_e4m3fn install, users can directly use OmniGen-V1-fp8_e4m3fn installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
OmniGen-V1-fp8_e4m3fn install url in huggingface.co: