Skip to content

feat: enable circular RoPE for qwen2.1 - #2036

Closed
stduhpf wants to merge 2 commits into
leejet:masterfrom
stduhpf:qwen-circular
Closed

stduhpf wants to merge 2 commits into
leejet:masterfrom
stduhpf:qwen-circular

Conversation

@stduhpf

@stduhpf stduhpf commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Improve support for --circular, --circularx, and --circulary flags with Qwen-Image 2.1.

Related Issue / Discussion

#914

Additional Information

sd-cli.exe --diffusion-model models\qwen_image_2.1-Q8_0.gguf --llm 'models\Qwen\Qwen3-VL-8B-Instruct-Q4_K_M.gguf' --llm_vision 'models\Qwen\mmproj-Qwen3VL-8B-Instruct-Q8_0.gguf' --vae models\vae\wan-qwen\qwen_image_2.1_vae_bf16.safetensors --cfg-scale 3.5 --steps 20 --seed 42 --vae-conv-direct --prompt-file prompt-file.txt -r assets\cat_with_sd_cpp_42.png -W 1024 -H 512 --diffusion-fa --extra-sample-args guidance_schedule=1x7

prompt-file.txt:

将这张图片转换为完整的 360°沉浸式全景图,采用标准 Equirectangular 等距柱状投影,2:1画幅。

保持原图中的人物、场景、物体、服装、材质、色彩、光影和整体视觉风格不变。

将原本有限的视野扩展为完整的 360°水平环绕视角 + 180°垂直视角,补全原图视野之外的环境,使前后左右以及上下空间自然连续。

画面必须具有完整的空间连续性,避免重复物体、断裂结构、拼接痕迹、明显变形和透视错误。

确保全景图首尾能够无缝连接,左右边缘内容自然衔接,地面、墙壁、建筑、人物和环境结构保持连续。

输出为真实完整的360°VR全景图,Equirectangular Projection,2:1,seamless 360 panorama,immersive panoramic environment,consistent lighting and geometry。)

Without --circularx, visible seam as expected
output - Copy (587)
téléchargement (1)

Master branch, with --circularx, lots of artifacts around the seam, even more visible
output
téléchargement

PR, with --circularx, seamless
output - Copy (586)
téléchargement (2)

Note that the overall quality of the generation is slightly degraded, the room no longer has 4 nice straight walls when cirular tiling is enabled, but artifacts and seams are gone.

Checklist

@leejet

leejet commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Thanks for your contribution! This has been superseded by #2039.

Having to modify RoPE every time to accommodate the circular logic was getting pretty cumbersome, so I abstracted it into a generic post-processing step instead. This should make integrating new models much easier.

@leejet leejet closed this Sep 23, 2026
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.

2 participants