GPU deploy isn't supported for this model type.
bash envs/init.shbash inference/inference_single_image.shpython inference/app.py1from inference_solver import FlexARInferenceSolver
2from PIL import Image
3
4# ******************** Image Generation ********************
5inference_solver = FlexARInferenceSolver(
6 model_path="Alpha-VLLM/Lumina-mGPT-7B-768",
7 precision="bf16",
8 target_size=768,
9)
10
11q1 = f"Generate an image of 768x768 according to the following prompt:
12"
13 f"Image of a dog playing water, and a waterfall is in the background."
14
15# generated: tuple of (generated response, list of generated images)
16generated = inference_solver.generate(
17 images=[],
18 qas=[[q1, None]],
19 max_gen_len=8192,
20 temperature=1.0,
21 logits_processor=inference_solver.create_logits_processor(cfg=4.0, image_top_k=2000),
22)
23
24a1, new_image = generated[0], generated[1][0]1@inproceedings{huang2024realcustom,
2 title={RealCustom: narrowing real text word for real-time open-domain text-to-image customization},
3 author={Huang, Mengqi and Mao, Zhendong and Liu, Mingcong and He, Qian and Zhang, Yongdong},
4 booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
5 pages={7476--7485},
6 year={2024}
7}
8@article{mao2024realcustom++,
9 title={Realcustom++: Representing images as real-word for real-time customization},
10 author={Mao, Zhendong and Huang, Mengqi and Ding, Fei and Liu, Mingcong and He, Qian and Zhang, Yongdong},
11 journal={arXiv preprint arXiv:2408.09744},
12 year={2024}
13}