Skip to content

Commit f583dad

Browse files
authored
Merge branch 'main' into variant-tests
2 parents a510a9b + 5d476f5 commit f583dad

16 files changed

+3370
-25
lines changed

docs/source/en/api/loaders/single_file.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ The [`~loaders.FromSingleFileMixin.from_single_file`] method allows you to load:
2222
2323
## Supported pipelines
2424

25-
- [`CogVideoXPipeline`]
26-
- [`CogVideoXImageToVideoPipeline`]
27-
- [`CogVideoXVideoToVideoPipeline`]
2825
- [`StableDiffusionPipeline`]
2926
- [`StableDiffusionImg2ImgPipeline`]
3027
- [`StableDiffusionInpaintPipeline`]
@@ -52,7 +49,6 @@ The [`~loaders.FromSingleFileMixin.from_single_file`] method allows you to load:
5249
- [`UNet2DConditionModel`]
5350
- [`StableCascadeUNet`]
5451
- [`AutoencoderKL`]
55-
- [`AutoencoderKLCogVideoX`]
5652
- [`ControlNetModel`]
5753
- [`SD3Transformer2DModel`]
5854
- [`FluxTransformer2DModel`]

docs/source/en/api/pipelines/flux.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,3 +175,16 @@ image.save("flux-fp8-dev.png")
175175
[[autodoc]] FluxInpaintPipeline
176176
- all
177177
- __call__
178+
179+
180+
## FluxControlNetInpaintPipeline
181+
182+
[[autodoc]] FluxControlNetInpaintPipeline
183+
- all
184+
- __call__
185+
186+
## FluxControlNetImg2ImgPipeline
187+
188+
[[autodoc]] FluxControlNetImg2ImgPipeline
189+
- all
190+
- __call__

examples/community/README.md

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Please also check out our [Community Scripts](https://github.com/huggingface/dif
5050
| Stable Diffusion XL Long Weighted Prompt Pipeline | A pipeline support unlimited length of prompt and negative prompt, use A1111 style of prompt weighting | [Stable Diffusion XL Long Weighted Prompt Pipeline](#stable-diffusion-xl-long-weighted-prompt-pipeline) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1LsqilswLR40XLLcp6XFOl5nKb_wOe26W?usp=sharing) | [Andrew Zhu](https://xhinker.medium.com/) |
5151
| FABRIC - Stable Diffusion with feedback Pipeline | pipeline supports feedback from liked and disliked images | [Stable Diffusion Fabric Pipeline](#stable-diffusion-fabric-pipeline) | - | [Shauray Singh](https://shauray8.github.io/about_shauray/) |
5252
| sketch inpaint - Inpainting with non-inpaint Stable Diffusion | sketch inpaint much like in automatic1111 | [Masked Im2Im Stable Diffusion Pipeline](#stable-diffusion-masked-im2im) | - | [Anatoly Belikov](https://github.com/noskill) |
53+
| sketch inpaint xl - Inpainting with non-inpaint Stable Diffusion | sketch inpaint much like in automatic1111 | [Masked Im2Im Stable Diffusion XL Pipeline](#stable-diffusion-xl-masked-im2im) | - | [Anatoly Belikov](https://github.com/noskill) |
5354
| prompt-to-prompt | change parts of a prompt and retain image structure (see [paper page](https://prompt-to-prompt.github.io/)) | [Prompt2Prompt Pipeline](#prompt2prompt-pipeline) | - | [Umer H. Adil](https://twitter.com/UmerHAdil) |
5455
| Latent Consistency Pipeline | Implementation of [Latent Consistency Models: Synthesizing High-Resolution Images with Few-Step Inference](https://arxiv.org/abs/2310.04378) | [Latent Consistency Pipeline](#latent-consistency-pipeline) | - | [Simian Luo](https://github.com/luosiallen) |
5556
| Latent Consistency Img2img Pipeline | Img2img pipeline for Latent Consistency Models | [Latent Consistency Img2Img Pipeline](#latent-consistency-img2img-pipeline) | - | [Logan Zoellner](https://github.com/nagolinc) |
@@ -2581,15 +2582,52 @@ result.images[0].save("result.png")
25812582

25822583
original image mech.png
25832584

2584-
<img src=<https://github.com/noskill/diffusers/assets/733626/10ad972d-d655-43cb-8de1-039e3d79e849> width="25%" >
2585+
<img src=https://github.com/noskill/diffusers/assets/733626/10ad972d-d655-43cb-8de1-039e3d79e849 width="25%" >
25852586

25862587
image with mask mech_painted.png
25872588

2588-
<img src=<https://github.com/noskill/diffusers/assets/733626/c334466a-67fe-4377-9ff7-f46021b9c224> width="25%" >
2589+
<img src=https://github.com/noskill/diffusers/assets/733626/c334466a-67fe-4377-9ff7-f46021b9c224 width="25%" >
25892590

25902591
result:
25912592

2592-
<img src=<https://github.com/noskill/diffusers/assets/733626/23a0a71d-51db-471e-926a-107ac62512a8> width="25%" >
2593+
<img src=https://github.com/noskill/diffusers/assets/733626/23a0a71d-51db-471e-926a-107ac62512a8 width="25%" >
2594+
2595+
### Masked Im2Im Stable Diffusion Pipeline XL
2596+
2597+
This pipeline implements sketch inpaint feature from A1111 for non-inpaint models. The following code reads two images, original and one with mask painted over it. It computes mask as a difference of two images and does the inpainting in the area defined by the mask. Latent code is initialized from the image with the mask by default so the color of the mask affects the result.
2598+
2599+
```
2600+
img = PIL.Image.open("./mech.png")
2601+
# read image with mask painted over
2602+
img_paint = PIL.Image.open("./mech_painted.png")
2603+
2604+
pipeline = MaskedStableDiffusionXLImg2ImgPipeline.from_pretrained("frankjoshua/juggernautXL_v8Rundiffusion", dtype=torch.float16)
2605+
2606+
pipeline.to('cuda')
2607+
pipeline.enable_xformers_memory_efficient_attention()
2608+
2609+
prompt = "a mech warrior wearing a mask"
2610+
seed = 8348273636437
2611+
for i in range(10):
2612+
generator = torch.Generator(device="cuda").manual_seed(seed + i)
2613+
print(seed + i)
2614+
result = pipeline(prompt=prompt, blur=48, image=img_paint, original_image=img, strength=0.9,
2615+
generator=generator, num_inference_steps=60, num_images_per_prompt=1)
2616+
im = result.images[0]
2617+
im.save(f"result{i}.png")
2618+
```
2619+
2620+
original image mech.png
2621+
2622+
<img src=https://github.com/noskill/diffusers/assets/733626/10ad972d-d655-43cb-8de1-039e3d79e849 width="25%" >
2623+
2624+
image with mask mech_painted.png
2625+
2626+
<img src=https://github.com/noskill/diffusers/assets/733626/c334466a-67fe-4377-9ff7-f46021b9c224 width="25%" >
2627+
2628+
result:
2629+
2630+
<img src=https://github.com/noskill/diffusers/assets/733626/5043fb57-a785-4606-a5ba-a36704f7cb42 width="25%" >
25932631

25942632
### Prompt2Prompt Pipeline
25952633

0 commit comments

Comments
 (0)