Sample photo for 替換照片中的天空 in PictorX

Open a photo with a sky, or use the sample, then click Start. Pick a sky; the clouds, edge and light change at once.

More about AI models

替換照片中的天空

「天空替換」會用在您裝置上執行的 AI 模型找出天空,因此照片不會被上傳。可挑選藍天、夕陽、金色時光、黃昏、夜晚或暴風雨,設定雲朵和邊緣,風景也會被重新打光以配合新的光線。結果會以兩個圖層開啟:新天空和風景,因此您可以繼續分別編輯其中一個。 Open a photo with a sky, or use the sample, then click Start. Pick a sky; the clouds, edge and light change at once.

How it works

  1. 開啟一張帶有天空的照片,例如風景、天際線或建築物,或使用樣本。
  2. 點一下「開始」。裝置端 AI 會找出天空,並修飾樹木、電線和屋頂周圍的邊緣。
  3. 挑選一種天空,設定「雲朵」、「雲朵大小」、「邊緣柔化」和「重新打光」,再儲存圖片,或在編輯器中以圖層開啟。

天空會在您的裝置上找出

天空分割模型(U²-Net,MIT licence)會在瀏覽器中以 WebGPU 或 WebAssembly 執行。其遮罩接著會在照片本身上用引導濾鏡修飾,讓樹葉、枝幹、電線和屋頂輪廓都保留細節。舊天空的顏色會從邊緣像素中去除,因此風景周圍不會留下灰色或白色光暈。天空只會偵測一次:之後更改天空、雲朵或光線都是即時的。

新的天空,以及相配的光線

「藍天」、「晴空」、「多雲」、「夕陽」、「金色時光」、「黃昏」、「夜晚」和「暴風雨」各自會畫出帶有專屬漸層、透視雲層,以及太陽、月亮或星星的天空。「雲朵」設定雲有多少,「雲朵大小」設定它們有多大。「自訂」則使用您自己的「頂部顏色」和「地平線顏色」。「重新打光」會把風景朝新天空的方向著色並變暗,因此夕陽天空會帶來溫暖的場景,夜空則是偏暗、偏冷的場景。「在編輯器中套用」會把天空和風景加為兩個分開的圖層。

Frequently asked questions

How do I replace the sky in a photo?

Open a photo with some sky in it and click Start. On-device AI finds the sky and replaces it with a new one. Try the Blue sky, Sunset, Golden hour, Dusk, Night and Storm presets, set the clouds and the light, then save the picture. The same tool is in the editor under AI → Background → Sky replacement.

How do I get a clean edge around trees and buildings?

The edge is refined on the photo itself, and the old sky's colour is taken out of the edge pixels, so most photos need nothing more. Edge softness sets the transition: lower it for crisp rooftops and towers, raise it for dense leaves or hair-thin branches against a bright sky.

什麼樣的照片效果最好?

Landscapes, skylines, buildings, beaches and street scenes with a visible sky. Flat grey, white or overexposed skies are the classic case. Fine detail such as tree branches and wires is kept by the edge refinement; Edge softness makes the transition softer or harder.

What does Relight do?

Relight tints the landscape towards the colour of the new sky and darkens it for dusk and night skies, so the scene looks lit by the new sky. Set it to 0 to keep the landscape exactly as it was.

Can I edit the sky and the landscape separately?

Yes. Apply in the editor, or the pencil on this page, gives two layers: the new sky and the landscape with the old sky cut out. Move, blur or recolour the sky, or put your own photo of a sky under the landscape.

Ready to try it?

Open PictorX in your browser — no install, no credit card required to start.

前往編輯器