Unverified Commit 32798bf2 authored by Steven Liu's avatar Steven Liu Committed by GitHub
Browse files

[docs] Inference section cleanup (#12281)



init
Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
parent c2e5ece0
...@@ -58,12 +58,6 @@ ...@@ -58,12 +58,6 @@
title: Batch inference title: Batch inference
- local: training/distributed_inference - local: training/distributed_inference
title: Distributed inference title: Distributed inference
- local: using-diffusers/scheduler_features
title: Scheduler features
- local: using-diffusers/callback
title: Pipeline callbacks
- local: using-diffusers/image_quality
title: Controlling image quality
- title: Inference optimization - title: Inference optimization
isExpanded: false isExpanded: false
...@@ -92,6 +86,8 @@ ...@@ -92,6 +86,8 @@
title: xDiT title: xDiT
- local: optimization/para_attn - local: optimization/para_attn
title: ParaAttention title: ParaAttention
- local: using-diffusers/image_quality
title: FreeU
- title: Hybrid Inference - title: Hybrid Inference
isExpanded: false isExpanded: false
......
...@@ -10,13 +10,7 @@ an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express o ...@@ -10,13 +10,7 @@ an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express o
specific language governing permissions and limitations under the License. specific language governing permissions and limitations under the License.
--> -->
# Controlling image quality # FreeU
The components of a diffusion model, like the UNet and scheduler, can be optimized to improve the quality of generated images leading to better details. These techniques are especially useful if you don't have the resources to simply use a larger model for inference. You can enable these techniques during inference without any additional training.
This guide will show you how to turn these techniques on in your pipeline and how to configure them to improve the quality of your generated images.
## Details
[FreeU](https://hf.co/papers/2309.11497) improves image details by rebalancing the UNet's backbone and skip connection weights. The skip connections can cause the model to overlook some of the backbone semantics which may lead to unnatural image details in the generated image. This technique does not require any additional training and can be applied on the fly during inference for tasks like image-to-image and text-to-video. [FreeU](https://hf.co/papers/2309.11497) improves image details by rebalancing the UNet's backbone and skip connection weights. The skip connections can cause the model to overlook some of the backbone semantics which may lead to unnatural image details in the generated image. This technique does not require any additional training and can be applied on the fly during inference for tasks like image-to-image and text-to-video.
...@@ -139,7 +133,7 @@ export_to_video(video_frames, "teddy_bear.mp4", fps=10) ...@@ -139,7 +133,7 @@ export_to_video(video_frames, "teddy_bear.mp4", fps=10)
</hfoption> </hfoption>
</hfoptions> </hfoptions>
Call the [`pipelines.StableDiffusionMixin.disable_freeu`] method to disable FreeU. Call the [`~pipelines.StableDiffusionMixin.disable_freeu`] method to disable FreeU.
```py ```py
pipeline.disable_freeu() pipeline.disable_freeu()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment