Skip to content

feat: add SenseNova U1.5 support - #1935

Open
Maphist0 wants to merge 8 commits into
leejet:masterfrom
Maphist0:dev-u1
Open

feat: add SenseNova U1.5 support#1935
Maphist0 wants to merge 8 commits into
leejet:masterfrom
Maphist0:dev-u1

Conversation

@Maphist0

@Maphist0 Maphist0 commented Sep 4, 2026

Copy link
Copy Markdown

Summary

Add SenseNova U1.5 8B MoT support for non-thinking text-to-image generation.

SenseNova U1.5 performs flow matching directly in RGB pixel space, so it does not require a separate text encoder or VAE. This PR adds:

  • loading for the model's root-level sharded Safetensors checkpoint;
  • a dedicated SenseNova U1.5 tokenizer and prompt template;
  • model-local weight-based configuration detection;
  • vision patch/downsample embeddings and progressive PixelShuffle RGB decoding;
  • separate understanding and generation MoT branches with grouped-query attention and three-axis RoPE;
  • prefix K/V caching across denoising steps;
  • shifted-flow Euler sampling and the model-specific unconditional prompt path; and
  • user documentation with a reproducible CUDA invocation.

The implementation supports non-thinking text-to-image generation only. Thinking-mode prompt expansion, image editing, visual understanding, and interleaved generation are outside this PR.

Related Issue / Discussion

Related #1841 #1894

Additional Information

cmake -S . -B build \
  -DSD_BUILD_SHARED_LIBS=ON \
  -DGGML_NATIVE=OFF \
  -DSD_BUILD_SHARED_GGML_LIB=ON \
  -DGGML_BACKEND_DL=ON \
  -DGGML_CPU_ALL_VARIANTS=ON \
  -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
  -DCMAKE_INSTALL_RPATH='$ORIGIN'
cmake --build build --config Release
ctest --test-dir build --output-on-failure
./build/bin/sd-cli --help

Native generation was compared with the pinned official implementation using the same checkpoint, prompt, empty negative prompt, seed, dimensions, Euler sampler, CFG, flow shift, and BF16 precision.

./build/bin/sd-cli \
  --model /path/to/SenseNova-U1.5-8B-MoT \
  --prompt "a red cube on a white background" \
  --width 2048 \
  --height 2048 \
  --steps 50 \
  --cfg-scale 4 \
  --flow-shift 3 \
  --seed 42 \
  --sampling-method euler \
  --rng cuda \
  --fa \
  --output output.png

The one-step output is nearly pixel-identical. Differences accumulate over the full 50-step run because the official pipeline uses SDPA while the sdcpp invocation uses the ggml CUDA flash-attention path.

Sample output:

The (long) prompt that generates the following image
Create a polished English-language infographic titled SenseNova-U1.5 in a modern minimalist technology-matrix style, closely following the visual structure of the official SenseNova-U infographic. Use a wide 16:9 horizontal three-column grid on premium matte-white paper with a very pale silver-gray dot pattern. Use strict alignment, generous whitespace, thin charcoal borders, crisp bold sans-serif headings, and clear modern body type. Make it colorful yet professional: sapphire blue for the left column, violet and indigo for the center, emerald green for the right column, with soft pastel gradient panels and richly colored line icons. Keep every visible word in English only.

At the top center, place the exact large title SenseNova-U1.5. Directly below it, place the exact subtitle NEXT-GENERATION END-TO-END UNIFIED MULTIMODAL MODEL.

Divide the body into three equal vertical sections separated by ample whitespace.

The left section is titled OVERVIEW with a blue magnifying-glass-and-gear icon. Arrange three vertical points. First: a colorful document-and-photo icon, the heading UNIFIED MULTIMODAL FAMILY, and the caption Text & Image Understanding and Generation. Second: an interlocking-ring architecture icon, the heading NEO-UNIFY ARCHITECTURE, and the caption End-to-End Unified Understanding and Generation. Third: crossed-out eye and funnel icons, the heading NO VE · NO VAE, and the caption No Separate Visual or Variational Encoder.

The center section is titled MODEL FAMILY with a violet branching-network icon. Place two large stacked rounded cards with subtle blue-to-violet gradients. The first card contains a dense geometric cube icon, the exact model name SenseNova-U1.5-8B-MoT, and the caption 8B MoT Post-Trained Model. The second card contains a glowing neural-brain icon with a lightning bolt, the exact model name SenseNova-U1.5-8B-MoT-SFT, and the caption 8B MoT Supervised Fine-Tuned Model. Below the cards place two small badges: OPEN WEIGHTS with a smiling face icon, and TECHNICAL REPORT with a document icon.

The right section is titled HIGHLIGHTS with an emerald rising-chart icon. Arrange four separate rounded rectangular cards with pale mint, cyan, lavender, and warm coral backgrounds. Card one has a Möbius-loop icon, heading NATIVE UNIFIED ARCHITECTURE, caption No VE · No VAE. Card two has a trophy icon, heading UNDERSTAND & GENERATE, caption One Unified Model. Card three has interleaved text-and-image icons, heading INTERLEAVED REASONING, caption Native Image Generation During Reasoning. Card four has a detailed pie-chart icon, heading INFOGRAPHIC SYNTHESIS, caption Text-Rich Diagrams and Complex Charts.
sensenova-u1 5-official-style-english-color-2720x1536-v1

Checklist

Support root-level sharded Safetensors directories while preserving Diffusers directory precedence.

Detect SenseNova U1.5 using independent tensor markers for its MoT generation branch, vision input path, and pixel-flow output head. Register the architecture as a DiT model and ignore checkpoint tensors that are unused by the text-to-image runtime.
Add a dedicated SenseNova tokenizer built on the Qwen2 BPE
implementation.
Add model-local configuration detection, checkpoint-layout
convolutions, timestep and vision embeddings, and the progressive
PixelShuffle RGB decoder.
Add separate understanding and generation transformer branches with
three-axis RoPE and grouped-query attention.
Register the U1 conditioner, MoT runner, and full-resolution RGB path.

Add shifted-flow Euler sampling, pass prompt token IDs to the diffusion
runner, and route CFG negatives through the U1-specific unconditional
prompt builder.
Copy per-layer prefix K/V tensors into dedicated graph outputs so ggml
keeps their buffers alive until the runner migrates them into persistent
cache storage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant