Downloads Β· 30 days
10
20% of all-time downloads
remyxai/panorama-flux-modular
panorama-flux-modular is a machine learning model from remyxai. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for diffusers. The card lists the license as other.
π€ Hub: remyxai/panorama-flux-modular Β· π Paper: arXiv:2302.08113 Β· π» Reference: omerbt/MultiDiffusion (unlicensed β see the clean-room note) Β· π¦ Monorepo: flux-recipes
Downloads Β· 30 days
10
20% of all-time downloads
All-time downloads
49
Public
Repo size
4.9 MB
Likes
1
Public
Click a slice to open those files.
.png4.9 MB Β· 100%
From the Hugging Face model README
π€ Hub: remyxai/panorama-flux-modular Β· π Paper: arXiv:2302.08113 Β· π» Reference: omerbt/MultiDiffusion (unlicensed β see the clean-room note) Β· π¦ Monorepo: flux-recipes
Generate ultra-wide / panoramic images well beyond FLUX's native aspect β no training, no extra weights β as a Modular Diffusers custom block. Implements MultiDiffusion (arXiv:2302.08113): the wide latent is denoised through overlapping native-resolution windows, and each window's prediction is averaged back into the shared canvas every step, so the fused panorama is one globally coherent scene rather than stitched tiles.

<sub>A single coherent wide scene β no repetition or seams at the window boundaries. Training-free.</sub>
import torch
from diffusers import ModularPipeline
pipe = ModularPipeline.from_pretrained("remyxai/panorama-flux-modular", trust_remote_code=True)
pipe.load_components(dtype=torch.bfloat16)
pipe.to("cuda")
panorama = pipe(
prompt="a sweeping mountain ridge at golden hour, alpine lake in the foreground",
height=1024, width=3072, # 3:1 β go to 4096 for a full wrap
window=1024, stride=512, # native tile + 50% overlap
num_inference_steps=28,
).images[0]
panorama.save("panorama.png")
height/width are the full canvas; the window/stride knobs control the tiling. Everything must be
a multiple of 16.
One wide latent is the canvas. At every denoise step the canvas is cut into overlapping windows and the FLUX transformer runs once per window; each window's velocity is scattered back into an accumulator and divided by how many windows covered that position (per-pixel mean β the MultiDiffusion fusion rule). The scheduler then advances the whole canvas once. Because windows overlap and are fused before the step, content crosses window boundaries freely: no visible seams, no repeated subject per tile.
Two details make it work on FLUX flow-matching:
img_ids. Each window gets native 2D position ids offset to its origin in the
canvas, so local coordinates stay in-distribution while the offsets carry the global geometry.mu must be shifted by the window's sequence length.This is exactly the failure the windowed design avoids: denoising a single 3072-wide latent stretches the position ids and the flow-match schedule far out of distribution, producing a smeared, textured "woven blob". MultiDiffusion keeps every window at native resolution β the schedule stays sane, and the image gets wide instead of mushy.
The transformer is never mutated (no attention-processor, hook, or pos_embed swap), so there is nothing to restore after a run. VRAM stays near a native 1024Γ1024 generation per window; the wide latent is held once. The VAE decode uses tiling (a 4K-class decode otherwise dominates memory).
| arg | default | meaning |
|---|---|---|
width | 3072 | full canvas width (ultra-wide: 2048β4096; multiple of 16) |
height | 1024 | full canvas height (multiple of 16) |
window | 1024 | window side in px β keep at FLUX's native 1024 |
stride | 512 | window step in px; overlap = window - stride |
window_height | None | window height in px; None = square windowΓwindow tiles |
guidance_scale | 3.5 | FLUX guidance |
num_inference_steps | 28 | denoise steps (applied to the whole canvas) |
Tuning: the overlap is the quality lever. stride=512 (50% of a 1024 window) is a good, fast
default; raise the overlap (lower the stride) if you see repeated content or a faint tonal band at a
boundary β barely-overlapping windows repeat, and lightly-overlapping ones can leave a soft exposure
step. Cost scales with the number of windows: a 3072Γ1024 canvas at 1024/512 is 5 window passes per
step, roughly 5Γ a native 1024Γ1024 step. For the smoothest result (the hero above): stride=256
(75% overlap) with guidance_scale=3.0 β the extra overlap plus slightly lower guidance removes the
faint between-window banding, at ~2Γ the passes.
diffusers (main / β₯ 0.40), transformers, accelerate, sentencepiece, protobuf. No extra
weights, no fine-tuning, no preprocessing models.
MultiDiffusion by Bar-Tal, Yariv, Lipman and Dekel. Clean-room implementation: the reference repo omerbt/MultiDiffusion carries no license, so none of its code was read or copied β this block was written from the paper's description alone (the method itself is not copyrightable). The same fusion rule is cited in our regional-prompting card.
Authored with AI assistance (Claude) and validated by the Remyx AI team; method credit to the MultiDiffusion authors. Uses FLUX.1-dev under its non-commercial license β this derivative inherits that restriction.
@misc{bartal2023multidiffusion,
title={MultiDiffusion: Fusing Diffusion Paths for Controlled Image Generation},
author={Bar-Tal, Dana and Yariv, Lior and Lipman, Yaron and Dekel, Tali},
year={2023}, eprint={2302.08113}, archivePrefix={arXiv}, primaryClass={cs.CV},
url={https://arxiv.org/abs/2302.08113}
}