Skip to content

Commit

Permalink
[Docs] add: japanese sdxl as a reference (huggingface#5844)
Browse files Browse the repository at this point in the history
add: japanese sdxl as a reference
  • Loading branch information
sayakpaul authored and Jimmy committed Apr 26, 2024
1 parent 511dea3 commit a26bc1b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/source/en/using-diffusers/custom_pipeline_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,25 @@ video_frames = pipeline(
guidance_scale=9.0,
output_type="pt"
).frames
```

As an additional reference example, you can refer to the repository structure of [stabilityai/japanese-stable-diffusion-xl](https://huggingface.co/stabilityai/japanese-stable-diffusion-xl/), that makes use of the `trust_remote_code` feature:

```python

from diffusers import DiffusionPipeline
import torch

pipeline = DiffusionPipeline.from_pretrained(
"stabilityai/japanese-stable-diffusion-xl", trust_remote_code=True
)
pipeline.to("cuda")

# if using torch < 2.0
# pipeline.enable_xformers_memory_efficient_attention()

prompt = "柴犬、カラフルアート"

image = pipeline(prompt=prompt).images[0]

```

0 comments on commit a26bc1b

Please sign in to comment.