Stable Diffusion 光影控制小技巧

偶然看到油管大神Sebastian Kamph關于stable diffusion光影控制的小技巧,自測了下,發(fā)現(xiàn)效果還不錯~
給小伙伴們來一波兒實測分享o(* ̄︶ ̄*)o
首先用 text-image隨便跑一張圖:

我這張的基本信息如下,需要copy的小伙伴們隨意:
Tiny cute cow toy, reading a book, standing character, soft smooth lighting, soft pastel colors, skottie young, 3D blender render, polycount, modular constructivism, pop surrealism, physically based rendering, square image, 1girl, cute face, pink hair, anime style
Negative prompt: out of frame, lowres, text, error, cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, username, watermark, signature,
Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 866942899, Face restoration: CodeFormer, Size: 512x512, Model hash: 812cd9f9d9, Model: anythingV3_fp16
出來的圖是這樣的:

然后點擊send to img2img按鈕,點開ControlNet,將剛剛那張圖同樣放進ControlNet里面來,注意紅框內(nèi)的選項,這個選擇相對效果較好,大家也可以嘗試其他選項~

上面圖生圖的地方,將之前那張圖刪掉, 然后上傳一張光源圖:

點擊生成:

可以看到,生成的圖在保留大部分原圖的基礎上,根據(jù)提供的光源圖,修改了光影效果,雖然不能做到100%,但是相較于很多時候通過prompt文字修改來控制光源要方便直觀很多O(∩_∩)O哈哈~
還可以通過邊上這個小鉛筆按鈕,來調(diào)整光源的位置:

比如這樣:

然后出來的效果是這樣的,會有一些細微的區(qū)別:

當然,為了達到不同的光影效果,光源圖也可以采用比較多樣的,這里有幾個現(xiàn)成的,需要的小伙伴們可以自取哈:









另外還有一個小Tips需要注意一下,#1 確保Seed是同一個,然后Denoising這里0.9會比較合適,當然,大家也可以嘗試其他數(shù)值。

當然,調(diào)整controlnet里面的參數(shù),models也可以有不同的效果,這個就留給小伙伴們自己嘗試啦~有驚喜的話也可以在評論區(qū)和大家分享哇^_^