Buckets:
| # レガシーチェックポイント | |
| これらの設定は、主に旧型のStable Diffusionファミリーのチェックポイントに適用されます。 | |
| ## セーフティチェッカー | |
| Diffusers は、有害なコンテンツの生成を防ぐために、旧型の Stable Diffusion チェックポイント用に[セーフティチェッカー](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/safety_checker.py)を提供しています。これは、生成された出力をハードコードされた有害な概念のセットに対してスクリーニングします。Qwen-Image などの新しいモデルには、このチェッカーは付属していません。 | |
| セーフティチェッカーを無効にする場合は、以下に示すように`safety_checker=None`を[from_pretrained()](/docs/diffusers/main/ja/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained)に渡します。 | |
| ```py | |
| from diffusers import DiffusionPipeline | |
| pipeline = DiffusionPipeline.from_pretrained( | |
| "stable-diffusion-v1-5/stable-diffusion-v1-5", safety_checker=None | |
| ) | |
| """ | |
| You have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing `safety_checker=None`. Ensure that you abide by the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend keeping the safety filter enabled in all public-facing circumstances, disabling it only for use cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 . | |
| """ | |
| ``` | |
| ## スケジュールの再スケーリング | |
| Denoisingは純粋なノイズから始まるため、信号対雑音比(SNR)はゼロから始まります。一部のモデルは実際には純粋なノイズから開始せず、これにより明るすぎる部分や暗すぎる部分の生成が困難になります。 | |
| > [!TIP] | |
| > `v_prediction` を使用して独自のモデルをトレーニングするには、トレーニングスクリプトに `--prediction_type="v_prediction"` フラグを追加します。また、`v_prediction` でトレーニングされた既存のモデルを [検索](https://huggingface.co/search/full-text?q=v_prediction&type=model) することもできます。 | |
| `v_prediction`モデルの場合、これらのスケジューラー引数を有効にしてください。 | |
| - `rescale_betas_zero_snr=True` を設定すると、ノイズスケジュールが、SNR がちょうどゼロになる最後のタイムステップまでリスケールされます。 | |
| - `timestep_spacing="trailing"` を設定すると、純粋なノイズから最後のタイムステップでサンプリングが強制されます。 | |
| ```py | |
| from diffusers import DiffusionPipeline, DDIMScheduler | |
| pipeline = DiffusionPipeline.from_pretrained("ptx0/pseudo-journey-v2", device_map="cuda") # or "mps", "xpu", "cpu" | |
| pipeline.scheduler = DDIMScheduler.from_config( | |
| pipeline.scheduler.config, rescale_betas_zero_snr=True, timestep_spacing="trailing" | |
| ) | |
| ``` | |
| パイプラインで`guidance_rescale`を設定し、露出過多の画像を回避してください。値を下げると明るさが増しますが、一部のディテールが薄く見える可能性があります。 | |
| ```py | |
| prompt = """ | |
| cinematic photo of a snowy mountain at night with the northern lights aurora borealis | |
| overhead, 35mm photograph, film, professional, 4k, highly detailed | |
| """ | |
| image = pipeline(prompt, guidance_rescale=0.7).images[0] | |
| ``` | |
| zero SNRなし | |
| SNRがゼロで、末尾にスペースがある | |
Xet Storage Details
- Size:
- 3.84 kB
- Xet hash:
- c2e223571b01129aa84876bff777ce4fbdfdc9d71a992da59120896951037756
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.