Loading...
アイコン

vishal

チャンネル登録者数 121人

42 回視聴 ・ 2いいね ・ 2024/12/11

In this video, I implement negative prompting in Stable Diffusion by modifying the basic diffusion loop. Starting with standard classifier-free guidance, I show how to replace the unconditional noise prediction with a negative prompt to steer generation away from undesired attributes. Using examples, I demonstrate how different guidance scales affect the final image.

Colab notebook: colab.research.google.com/drive/1GdTZGkQ-LDdW5hK8t…

Blog post (with additional failed implementations): vishalbakshi.github.io/blog/posts/2024-11-20-negat…

diffusers Implementation: github.com/huggingface/diffusers/blob/43534a8d1fd4…

00:00 - Introduction
02:33 - Encode Text
07:54 - Create Noisy Latents
09:23 - Diffusion Loop
15:57 - Decoding Latents
19:58 - The `mk_samples` function
24:53 - Negative Prompting Implementation
28:13 - Guidance Scale Experimentation
33:06 - diffusers Implementation

コメント

コメントを取得中...

コントロール
設定

使用したサーバー: wakameme