Views
No views yet

1from inference_solver import FlexARInferenceSolver
2from PIL import Image
3
4# ******************** Image Generation ********************
5inference_solver = FlexARInferenceSolver(
6 model_path="Kr1sJ/iMontage", # Use this Hugging Face model
7 precision="bf16",
8 target_size=768, # Ensure target_size is consistent with the checkpoint
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]
25
26# Display or save the image
27new_image.show()
28# new_image.save("generated_dog.png")| Task Type | Input | Prompt | Output |
|---|---|---|---|
| image_editing | ![]() | Change the material of the lava to silver. | ![]() |
| cref | ![]() ![]() ![]() | Confucius from the first image, Moses from the second… | ![]() |
| conditioned_cref | ![]() ![]() | depth | ![]() |
| sref | ![]() ![]() | (empty) | ![]() |
| multiview | ![]() | 1. Shift left; 2. Look up; 3. Zoom out. | ![]() ![]() ![]() |
| storyboard | ![]() ![]() | Vintage film: 1. Hepburn carrying the yellow bag… | ![]() ![]() ![]() |
1@article{fu2025iMontage,
2 title={iMontage: Unified, Versatile, Highly Dynamic Many-to-many Image Generation},
3 author={Zhoujie Fu and Xianfang Zeng and Jinghong Lan and Xinyao Liao and Cheng Chen and Junyi Chen and Jiacheng Wei and Wei Cheng and Shiyu Liu and Yunuo Chen and Gang Yu and Guosheng Lin},
4 journal={arXiv preprint arXiv:2511.20635},
5 year={2025},
6}