
- Prompt

- Prompt

- Prompt

- Prompt

- Prompt

- Prompt

- Prompt

- Prompt

- Prompt

- Prompt

- Prompt

- Prompt

- Prompt

- Prompt

- Prompt
UltraFlux: DataโModel Co-Design for Native 4K, Multi-AR Text-to-Image
GitHub Code: https://github.com/W2GenAI-Lab/UltraFlux/tree/main
UltraFlux is a Flux-based diffusion transformer for native 4K text-to-image generation with consistent quality across diverse aspect ratios (square, portrait, ultra-wide, etc.).
It couples a 4K-optimized DiT backbone with a curated MultiAspect-4K-1M dataset, VAE post-training, and 4K-aware objectives so that data, architecture, and loss are co-designed rather than tuned in isolation.
๐ Links
- GitHub (training & inference code): https://github.com/W2GenAI-Lab/UltraFlux/tree/main
- Tech Report (UltraFlux details): UltraFlux-v1 TechReport
- Model weights (this page):
Owen777/UltraFlux-v1
๐ Inference Quickstart (Diffusers)
Minimal example using the UltraFlux transformer + VAE from this repo:
from pathlib import Path
from typing import Dict, List, Optional, Tuple
import torch
from PIL import Image
from ultraflux.pipeline_flux import FluxPipeline
from ultraflux.transformer_flux_visionyarn import FluxTransformer2DModel
from ultraflux.autoencoder_kl import AutoencoderKL
import os
local_vae = AutoencoderKL.from_pretrained("Owen777/UltraFlux-v1",subfolder="vae", torch_dtype=torch.bfloat16)
transformer = FluxTransformer2DModel.from_pretrained("Owen777/UltraFlux-v1",subfolder="transformer",torch_dtype=torch.bfloat16)
# transformer = FluxTransformer2DModel.from_pretrained("Owen777/UltraFlux-v1-1-Transformer",torch_dtype=torch.bfloat16) # NOTE:uncomment this line to use UltraFlux-v1.1
pipe = FluxPipeline.from_pretrained("Owen777/UltraFlux-v1", vae=local_vae, torch_dtype=torch.bfloat16, transformer=transformer)
from diffusers import FlowMatchEulerDiscreteScheduler
pipe.scheduler.config.use_dynamic_shifting = False
pipe.scheduler.config.time_shift = 4
pipe = pipe.to("cuda")
os.makedirs("results", exist_ok=True)
prompts = [
"A vast rocky landscape dominated by towering, weathered stone formations, bathed in the ethereal glow of a vibrant night sky filled with a sea of stars, the Milky Way stretching across the heavens, captured from a low angle to emphasize the immense scale of the rocks against the expansive cosmos above. The scene is illuminated by soft, cool moonlight, casting long, dramatic shadows on the textured rock surfaces. The color palette is rich with deep blues, purples, and silvery whites, creating a serene, otherworldly atmosphere.",
"A breathtaking scene of snow-capped mountains encircling a serene lake, their towering peaks perfectly mirrored in the still water under a twilight sky adorned with soft, colorful clouds. The gentle mist rises from the lake's surface, adding a mystical touch to the tranquil landscape, with the golden hues of the setting sun casting a warm glow over the scene. The composition captures the vastness of the mountains, the calm water, and the ethereal atmosphere, with a focus on soft, natural lighting and a cool color palette that enhances the peaceful mood.",
"A serene snow-covered countryside unfolds in soft morning light, where a small group of woolly sheep graze in the crisp foreground, their breath visible in the cold air, while in the gently blurred midground, a charming, snow-dusted church with a stone steeple rises among rustic timber houses nestled among tall pine trees, all bathed in a pale blue winter palette under an overcast sky, captured with a 50mm lens for a shallow depth of field and a cinematic, filmic warmth.",
"A confident woman with short, dark hair stands in a lush forest, her black dress flowing slightly in the breeze. She holds an owl with large, outstretched wings, its feathers sharp and detailed against the dappled sunlight. The light filters softly through the tall trees above, casting intricate shadows on her skin and highlighting her intricate tattoo along her arm. The forest around her feels serene and mystical, with the air thick with the scents of nature. The color palette blends deep greens, earthy browns, and the rich contrast of black and white.",
]
from pathlib import Path
for idx, prompt in enumerate(prompts, start=1):
out_path = Path("results") / f"ultra_flux_{idx:02d}.jpeg"
image = pipe(
prompt,
height=4096,
width=4096,
guidance_scale=4,
num_inference_steps=50,
max_sequence_length=512,
generator=torch.Generator("cpu").manual_seed(0)
).images[0]
image.save(f"results/ultra_flux_{idx:02d}.jpeg")
- Downloads last month
- 40
Model tree for Owen777/UltraFlux-v1
Base model
black-forest-labs/FLUX.1-dev