Upload folder using huggingface_hub
Browse files- main/README.md +4 -4
- main/README_community_scripts.md +82 -0
- main/fresco_v2v.py +1 -1
- main/pipeline_animatediff_controlnet.py +1 -1
- main/pipeline_stable_diffusion_xl_controlnet_adapter.py +1 -1
- main/pipeline_stable_diffusion_xl_controlnet_adapter_inpaint.py +1 -1
- main/pipeline_stable_diffusion_xl_instandid_img2img.py +1 -1
- main/pipeline_stable_diffusion_xl_instantid.py +1 -1
- main/rerender_a_video.py +1 -1
- main/stable_diffusion_controlnet_img2img.py +1 -1
- main/stable_diffusion_controlnet_inpaint.py +1 -1
- main/stable_diffusion_controlnet_reference.py +1 -1
- main/stable_diffusion_xl_controlnet_reference.py +1 -1
main/README.md
CHANGED
|
@@ -56,8 +56,8 @@ Please also check out our [Community Scripts](https://github.com/huggingface/dif
|
|
| 56 |
| Stable Diffusion Mixture Tiling Pipeline SDXL | A pipeline generates cohesive images by integrating multiple diffusion processes, each focused on a specific image region and considering boundary effects for smooth blending | [Stable Diffusion Mixture Tiling Pipeline SDXL](#stable-diffusion-mixture-tiling-pipeline-sdxl) | [](https://huggingface.co/spaces/elismasilva/mixture-of-diffusers-sdxl-tiling) | [Eliseu Silva](https://github.com/DEVAIEXP/) |
|
| 57 |
| Stable Diffusion MoD ControlNet Tile SR Pipeline SDXL | This is an advanced pipeline that leverages ControlNet Tile and Mixture-of-Diffusers techniques, integrating tile diffusion directly into the latent space denoising process. Designed to overcome the limitations of conventional pixel-space tile processing, this pipeline delivers Super Resolution (SR) upscaling for higher-quality images, reduced processing time, and greater adaptability. | [Stable Diffusion MoD ControlNet Tile SR Pipeline SDXL](#stable-diffusion-mod-controlnet-tile-sr-pipeline-sdxl) | [](https://huggingface.co/spaces/elismasilva/mod-control-tile-upscaler-sdxl) | [Eliseu Silva](https://github.com/DEVAIEXP/) |
|
| 58 |
| FABRIC - Stable Diffusion with feedback Pipeline | pipeline supports feedback from liked and disliked images | [Stable Diffusion Fabric Pipeline](#stable-diffusion-fabric-pipeline) | [Notebook](https://github.com/huggingface/notebooks/blob/main/diffusers/stable_diffusion_fabric.ipynb)| [Shauray Singh](https://shauray8.github.io/about_shauray/) |
|
| 59 |
-
| sketch inpaint - Inpainting with non-inpaint Stable Diffusion | sketch inpaint much like in automatic1111 | [Masked Im2Im Stable Diffusion Pipeline](#stable-diffusion-
|
| 60 |
-
| sketch inpaint xl - Inpainting with non-inpaint Stable Diffusion | sketch inpaint much like in automatic1111 | [Masked Im2Im Stable Diffusion XL Pipeline](#stable-diffusion-
|
| 61 |
| 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) | [Notebook](https://github.com/huggingface/notebooks/blob/main/diffusers/prompt_2_prompt_pipeline.ipynb) | [Umer H. Adil](https://twitter.com/UmerHAdil) |
|
| 62 |
| Latent Consistency Pipeline | Implementation of [Latent Consistency Models: Synthesizing High-Resolution Images with Few-Step Inference](https://huggingface.co/papers/2310.04378) | [Latent Consistency Pipeline](#latent-consistency-pipeline) | - | [Simian Luo](https://github.com/luosiallen) |
|
| 63 |
| Latent Consistency Img2img Pipeline | Img2img pipeline for Latent Consistency Models | [Latent Consistency Img2Img Pipeline](#latent-consistency-img2img-pipeline) | - | [Logan Zoellner](https://github.com/nagolinc) |
|
|
@@ -3526,7 +3526,7 @@ from controlnet_aux.midas import MidasDetector
|
|
| 3526 |
from PIL import Image
|
| 3527 |
|
| 3528 |
from diffusers import AutoencoderKL, ControlNetModel, MultiAdapter, T2IAdapter
|
| 3529 |
-
from diffusers.
|
| 3530 |
from diffusers.utils import load_image
|
| 3531 |
from examples.community.pipeline_stable_diffusion_xl_controlnet_adapter import (
|
| 3532 |
StableDiffusionXLControlNetAdapterPipeline,
|
|
@@ -3591,7 +3591,7 @@ from controlnet_aux.midas import MidasDetector
|
|
| 3591 |
from PIL import Image
|
| 3592 |
|
| 3593 |
from diffusers import AutoencoderKL, ControlNetModel, MultiAdapter, T2IAdapter
|
| 3594 |
-
from diffusers.
|
| 3595 |
from diffusers.utils import load_image
|
| 3596 |
from examples.community.pipeline_stable_diffusion_xl_controlnet_adapter_inpaint import (
|
| 3597 |
StableDiffusionXLControlNetAdapterInpaintPipeline,
|
|
|
|
| 56 |
| Stable Diffusion Mixture Tiling Pipeline SDXL | A pipeline generates cohesive images by integrating multiple diffusion processes, each focused on a specific image region and considering boundary effects for smooth blending | [Stable Diffusion Mixture Tiling Pipeline SDXL](#stable-diffusion-mixture-tiling-pipeline-sdxl) | [](https://huggingface.co/spaces/elismasilva/mixture-of-diffusers-sdxl-tiling) | [Eliseu Silva](https://github.com/DEVAIEXP/) |
|
| 57 |
| Stable Diffusion MoD ControlNet Tile SR Pipeline SDXL | This is an advanced pipeline that leverages ControlNet Tile and Mixture-of-Diffusers techniques, integrating tile diffusion directly into the latent space denoising process. Designed to overcome the limitations of conventional pixel-space tile processing, this pipeline delivers Super Resolution (SR) upscaling for higher-quality images, reduced processing time, and greater adaptability. | [Stable Diffusion MoD ControlNet Tile SR Pipeline SDXL](#stable-diffusion-mod-controlnet-tile-sr-pipeline-sdxl) | [](https://huggingface.co/spaces/elismasilva/mod-control-tile-upscaler-sdxl) | [Eliseu Silva](https://github.com/DEVAIEXP/) |
|
| 58 |
| FABRIC - Stable Diffusion with feedback Pipeline | pipeline supports feedback from liked and disliked images | [Stable Diffusion Fabric Pipeline](#stable-diffusion-fabric-pipeline) | [Notebook](https://github.com/huggingface/notebooks/blob/main/diffusers/stable_diffusion_fabric.ipynb)| [Shauray Singh](https://shauray8.github.io/about_shauray/) |
|
| 59 |
+
| sketch inpaint - Inpainting with non-inpaint Stable Diffusion | sketch inpaint much like in automatic1111 | [Masked Im2Im Stable Diffusion Pipeline](#masked-im2im-stable-diffusion-pipeline) | - | [Anatoly Belikov](https://github.com/noskill) |
|
| 60 |
+
| sketch inpaint xl - Inpainting with non-inpaint Stable Diffusion | sketch inpaint much like in automatic1111 | [Masked Im2Im Stable Diffusion XL Pipeline](#masked-im2im-stable-diffusion-pipeline-xl) | - | [Anatoly Belikov](https://github.com/noskill) |
|
| 61 |
| 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) | [Notebook](https://github.com/huggingface/notebooks/blob/main/diffusers/prompt_2_prompt_pipeline.ipynb) | [Umer H. Adil](https://twitter.com/UmerHAdil) |
|
| 62 |
| Latent Consistency Pipeline | Implementation of [Latent Consistency Models: Synthesizing High-Resolution Images with Few-Step Inference](https://huggingface.co/papers/2310.04378) | [Latent Consistency Pipeline](#latent-consistency-pipeline) | - | [Simian Luo](https://github.com/luosiallen) |
|
| 63 |
| Latent Consistency Img2img Pipeline | Img2img pipeline for Latent Consistency Models | [Latent Consistency Img2Img Pipeline](#latent-consistency-img2img-pipeline) | - | [Logan Zoellner](https://github.com/nagolinc) |
|
|
|
|
| 3526 |
from PIL import Image
|
| 3527 |
|
| 3528 |
from diffusers import AutoencoderKL, ControlNetModel, MultiAdapter, T2IAdapter
|
| 3529 |
+
from diffusers.models.controlnets.multicontrolnet import MultiControlNetModel
|
| 3530 |
from diffusers.utils import load_image
|
| 3531 |
from examples.community.pipeline_stable_diffusion_xl_controlnet_adapter import (
|
| 3532 |
StableDiffusionXLControlNetAdapterPipeline,
|
|
|
|
| 3591 |
from PIL import Image
|
| 3592 |
|
| 3593 |
from diffusers import AutoencoderKL, ControlNetModel, MultiAdapter, T2IAdapter
|
| 3594 |
+
from diffusers.models.controlnets.multicontrolnet import MultiControlNetModel
|
| 3595 |
from diffusers.utils import load_image
|
| 3596 |
from examples.community.pipeline_stable_diffusion_xl_controlnet_adapter_inpaint import (
|
| 3597 |
StableDiffusionXLControlNetAdapterInpaintPipeline,
|
main/README_community_scripts.md
CHANGED
|
@@ -9,6 +9,7 @@ If a community script doesn't work as expected, please open an issue and ping th
|
|
| 9 |
| Using IP-Adapter with Negative Noise | Using negative noise with IP-adapter to better control the generation (see the [original post](https://github.com/huggingface/diffusers/discussions/7167) on the forum for more details) | [IP-Adapter Negative Noise](#ip-adapter-negative-noise) |[Notebook](https://github.com/huggingface/notebooks/blob/main/diffusers/ip_adapter_negative_noise.ipynb) | [Álvaro Somoza](https://github.com/asomoza)|
|
| 10 |
| Asymmetric Tiling |configure seamless image tiling independently for the X and Y axes | [Asymmetric Tiling](#Asymmetric-Tiling ) |[Notebook](https://github.com/huggingface/notebooks/blob/main/diffusers/asymetric_tiling.ipynb) | [alexisrolland](https://github.com/alexisrolland)|
|
| 11 |
| Prompt Scheduling Callback |Allows changing prompts during a generation | [Prompt Scheduling-Callback](#Prompt-Scheduling-Callback ) |[Notebook](https://github.com/huggingface/notebooks/blob/main/diffusers/prompt_scheduling_callback.ipynb) | [hlky](https://github.com/hlky)|
|
|
|
|
| 12 |
|
| 13 |
|
| 14 |
## Example usages
|
|
@@ -437,3 +438,84 @@ image = pipeline(
|
|
| 437 |
],
|
| 438 |
).images[0]
|
| 439 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
| Using IP-Adapter with Negative Noise | Using negative noise with IP-adapter to better control the generation (see the [original post](https://github.com/huggingface/diffusers/discussions/7167) on the forum for more details) | [IP-Adapter Negative Noise](#ip-adapter-negative-noise) |[Notebook](https://github.com/huggingface/notebooks/blob/main/diffusers/ip_adapter_negative_noise.ipynb) | [Álvaro Somoza](https://github.com/asomoza)|
|
| 10 |
| Asymmetric Tiling |configure seamless image tiling independently for the X and Y axes | [Asymmetric Tiling](#Asymmetric-Tiling ) |[Notebook](https://github.com/huggingface/notebooks/blob/main/diffusers/asymetric_tiling.ipynb) | [alexisrolland](https://github.com/alexisrolland)|
|
| 11 |
| Prompt Scheduling Callback |Allows changing prompts during a generation | [Prompt Scheduling-Callback](#Prompt-Scheduling-Callback ) |[Notebook](https://github.com/huggingface/notebooks/blob/main/diffusers/prompt_scheduling_callback.ipynb) | [hlky](https://github.com/hlky)|
|
| 12 |
+
| CachedSearch: cheaper best-of-N for video pipelines | Test-time search where every candidate is generated under caching and only the winning seed is regenerated at full compute, from [CachedSearch](https://huggingface.co/papers/2607.23159). About 60% of the cost of full best-of-N with most of its gain. | [CachedSearch](#cachedsearch-cheaper-best-of-n-for-video-pipelines) | - | [Shreshth Saini](https://github.com/shreshthsaini)|
|
| 13 |
|
| 14 |
|
| 15 |
## Example usages
|
|
|
|
| 438 |
],
|
| 439 |
).images[0]
|
| 440 |
```
|
| 441 |
+
|
| 442 |
+
### CachedSearch: cheaper best-of-N for video pipelines
|
| 443 |
+
|
| 444 |
+
Best-of-N search (generate N candidates, keep the one a verifier scores highest) is the simplest way to spend more compute on a video model, and it is expensive: N full rollouts for one delivered video. [CachedSearch](https://huggingface.co/papers/2607.23159) (Saini, Birkbeck, Wang, Adsumilli, Bovik) makes the exploration phase cheap: every candidate is generated with a training-free cache enabled, the verifier ranks the cached drafts, and only the winning seed is regenerated with caching off. Because sampling is seed-deterministic, the delivered video is exactly what full-compute search would have returned whenever both pick the same seed; caching changes which candidate gets picked, never the quality of what ships. On Wan2.1-1.3B the paper measures 94.7% of best-of-8's gain at 63% of its cost.
|
| 445 |
+
|
| 446 |
+
The script below uses Diffusers' built-in `FirstBlockCacheConfig` for the drafts and works with any pipeline whose denoiser supports `enable_cache` (Wan, HunyuanVideo, LTX-Video, CogVideoX, and image pipelines such as Flux). The threshold is the one model-specific number: 0.10 is a reasonable start for the Wan family, and other families need their own value (lower keeps more fidelity; higher is faster). The verifier is any callable `(frames, prompt) -> float`; the paper uses ImageReward averaged over eight uniformly spaced frames. The full package with `tau` calibration is `pip install cachedsearch`, https://github.com/shreshthsaini/CachedSearch.
|
| 447 |
+
|
| 448 |
+
```py
|
| 449 |
+
import numpy as np
|
| 450 |
+
import torch
|
| 451 |
+
from diffusers import FirstBlockCacheConfig
|
| 452 |
+
|
| 453 |
+
|
| 454 |
+
def cached_search(pipe, prompt, verifier, n=8, threshold=0.10, num_inference_steps=50, seeds=None, commit=True, **gen_kwargs):
|
| 455 |
+
"""Best-of-n over seeds where every candidate is generated under caching and only the winner is regenerated at full compute.
|
| 456 |
+
|
| 457 |
+
pipe: any diffusers video (or image) pipeline whose denoiser supports `enable_cache`.
|
| 458 |
+
verifier: callable (frames, prompt) -> float, higher is better.
|
| 459 |
+
threshold: FirstBlockCache threshold used for the drafts (calibrate per model family).
|
| 460 |
+
commit: regenerate the winning seed with caching off (recommended). False returns the cached draft itself.
|
| 461 |
+
Returns (video, winning_seed, draft_scores).
|
| 462 |
+
"""
|
| 463 |
+
seeds = list(seeds) if seeds is not None else list(range(n))
|
| 464 |
+
denoisers = [m for m in (getattr(pipe, "transformer", None), getattr(pipe, "transformer_2", None)) if m is not None]
|
| 465 |
+
|
| 466 |
+
def generate(seed):
|
| 467 |
+
generator = torch.Generator(device=pipe._execution_device).manual_seed(seed)
|
| 468 |
+
out = pipe(prompt=prompt, num_inference_steps=num_inference_steps, generator=generator, **gen_kwargs)
|
| 469 |
+
return out.frames[0] if hasattr(out, "frames") else out.images[0]
|
| 470 |
+
|
| 471 |
+
# Explore: every candidate under caching. The pipeline resets the cache state after each call.
|
| 472 |
+
for m in denoisers:
|
| 473 |
+
m.enable_cache(FirstBlockCacheConfig(threshold=threshold))
|
| 474 |
+
drafts, scores = [], []
|
| 475 |
+
for seed in seeds:
|
| 476 |
+
frames = generate(seed)
|
| 477 |
+
drafts.append(frames)
|
| 478 |
+
scores.append(float(verifier(frames, prompt)))
|
| 479 |
+
for m in denoisers:
|
| 480 |
+
m.disable_cache()
|
| 481 |
+
|
| 482 |
+
best = int(np.argmax(scores))
|
| 483 |
+
if not commit:
|
| 484 |
+
return drafts[best], seeds[best], scores
|
| 485 |
+
# Commit: full compute only for the winner. Same seed, caching off, so this is a genuine full-compute sample.
|
| 486 |
+
return generate(seeds[best]), seeds[best], scores
|
| 487 |
+
|
| 488 |
+
|
| 489 |
+
# Example: Wan2.1-1.3B with an ImageReward verifier (pip install image-reward)
|
| 490 |
+
import ImageReward as RM
|
| 491 |
+
from PIL import Image
|
| 492 |
+
from diffusers import AutoencoderKLWan, WanPipeline
|
| 493 |
+
from diffusers.utils import export_to_video
|
| 494 |
+
|
| 495 |
+
model_id = "Wan-AI/Wan2.1-T2V-1.3B-Diffusers"
|
| 496 |
+
vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", torch_dtype=torch.float32)
|
| 497 |
+
pipe = WanPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16).to("cuda")
|
| 498 |
+
|
| 499 |
+
reward = RM.load("ImageReward-v1.0", device="cuda")
|
| 500 |
+
|
| 501 |
+
|
| 502 |
+
def imagereward_verifier(frames, prompt, num_frames=8):
|
| 503 |
+
idx = np.linspace(0, len(frames) - 1, min(num_frames, len(frames))).astype(int)
|
| 504 |
+
return float(np.mean([reward.score(prompt, Image.fromarray(np.asarray(frames[i]).astype("uint8"))) for i in idx]))
|
| 505 |
+
|
| 506 |
+
|
| 507 |
+
video, seed, scores = cached_search(
|
| 508 |
+
pipe,
|
| 509 |
+
"a red fox running through deep snow",
|
| 510 |
+
imagereward_verifier,
|
| 511 |
+
n=8,
|
| 512 |
+
threshold=0.10,
|
| 513 |
+
num_inference_steps=50,
|
| 514 |
+
height=480,
|
| 515 |
+
width=832,
|
| 516 |
+
num_frames=81,
|
| 517 |
+
guidance_scale=5.0,
|
| 518 |
+
)
|
| 519 |
+
print(f"winner seed {seed}, draft scores {[round(s, 3) for s in scores]}")
|
| 520 |
+
export_to_video(video, "cachedsearch.mp4", fps=16)
|
| 521 |
+
```
|
main/fresco_v2v.py
CHANGED
|
@@ -29,9 +29,9 @@ from diffusers.image_processor import PipelineImageInput, VaeImageProcessor
|
|
| 29 |
from diffusers.loaders import StableDiffusionLoraLoaderMixin, TextualInversionLoaderMixin
|
| 30 |
from diffusers.models import AutoencoderKL, ControlNetModel, ImageProjection, UNet2DConditionModel
|
| 31 |
from diffusers.models.attention_processor import AttnProcessor2_0
|
|
|
|
| 32 |
from diffusers.models.lora import adjust_lora_scale_text_encoder
|
| 33 |
from diffusers.models.unets.unet_2d_condition import UNet2DConditionOutput
|
| 34 |
-
from diffusers.pipelines.controlnet.multicontrolnet import MultiControlNetModel
|
| 35 |
from diffusers.pipelines.controlnet.pipeline_controlnet_img2img import StableDiffusionControlNetImg2ImgPipeline
|
| 36 |
from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput
|
| 37 |
from diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker
|
|
|
|
| 29 |
from diffusers.loaders import StableDiffusionLoraLoaderMixin, TextualInversionLoaderMixin
|
| 30 |
from diffusers.models import AutoencoderKL, ControlNetModel, ImageProjection, UNet2DConditionModel
|
| 31 |
from diffusers.models.attention_processor import AttnProcessor2_0
|
| 32 |
+
from diffusers.models.controlnets.multicontrolnet import MultiControlNetModel
|
| 33 |
from diffusers.models.lora import adjust_lora_scale_text_encoder
|
| 34 |
from diffusers.models.unets.unet_2d_condition import UNet2DConditionOutput
|
|
|
|
| 35 |
from diffusers.pipelines.controlnet.pipeline_controlnet_img2img import StableDiffusionControlNetImg2ImgPipeline
|
| 36 |
from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput
|
| 37 |
from diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker
|
main/pipeline_animatediff_controlnet.py
CHANGED
|
@@ -24,10 +24,10 @@ from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer, CLIPV
|
|
| 24 |
from diffusers.image_processor import PipelineImageInput, VaeImageProcessor
|
| 25 |
from diffusers.loaders import IPAdapterMixin, StableDiffusionLoraLoaderMixin, TextualInversionLoaderMixin
|
| 26 |
from diffusers.models import AutoencoderKL, ControlNetModel, ImageProjection, UNet2DConditionModel, UNetMotionModel
|
|
|
|
| 27 |
from diffusers.models.lora import adjust_lora_scale_text_encoder
|
| 28 |
from diffusers.models.unets.unet_motion_model import MotionAdapter
|
| 29 |
from diffusers.pipelines.animatediff.pipeline_output import AnimateDiffPipelineOutput
|
| 30 |
-
from diffusers.pipelines.controlnet.multicontrolnet import MultiControlNetModel
|
| 31 |
from diffusers.pipelines.pipeline_utils import DiffusionPipeline, StableDiffusionMixin
|
| 32 |
from diffusers.schedulers import (
|
| 33 |
DDIMScheduler,
|
|
|
|
| 24 |
from diffusers.image_processor import PipelineImageInput, VaeImageProcessor
|
| 25 |
from diffusers.loaders import IPAdapterMixin, StableDiffusionLoraLoaderMixin, TextualInversionLoaderMixin
|
| 26 |
from diffusers.models import AutoencoderKL, ControlNetModel, ImageProjection, UNet2DConditionModel, UNetMotionModel
|
| 27 |
+
from diffusers.models.controlnets.multicontrolnet import MultiControlNetModel
|
| 28 |
from diffusers.models.lora import adjust_lora_scale_text_encoder
|
| 29 |
from diffusers.models.unets.unet_motion_model import MotionAdapter
|
| 30 |
from diffusers.pipelines.animatediff.pipeline_output import AnimateDiffPipelineOutput
|
|
|
|
| 31 |
from diffusers.pipelines.pipeline_utils import DiffusionPipeline, StableDiffusionMixin
|
| 32 |
from diffusers.schedulers import (
|
| 33 |
DDIMScheduler,
|
main/pipeline_stable_diffusion_xl_controlnet_adapter.py
CHANGED
|
@@ -25,8 +25,8 @@ from transformers import CLIPTextModel, CLIPTextModelWithProjection, CLIPTokeniz
|
|
| 25 |
from diffusers.image_processor import PipelineImageInput, VaeImageProcessor
|
| 26 |
from diffusers.loaders import FromSingleFileMixin, StableDiffusionXLLoraLoaderMixin, TextualInversionLoaderMixin
|
| 27 |
from diffusers.models import AutoencoderKL, ControlNetModel, MultiAdapter, T2IAdapter, UNet2DConditionModel
|
|
|
|
| 28 |
from diffusers.models.lora import adjust_lora_scale_text_encoder
|
| 29 |
-
from diffusers.pipelines.controlnet.multicontrolnet import MultiControlNetModel
|
| 30 |
from diffusers.pipelines.pipeline_utils import DiffusionPipeline, StableDiffusionMixin
|
| 31 |
from diffusers.pipelines.stable_diffusion_xl.pipeline_output import StableDiffusionXLPipelineOutput
|
| 32 |
from diffusers.schedulers import KarrasDiffusionSchedulers
|
|
|
|
| 25 |
from diffusers.image_processor import PipelineImageInput, VaeImageProcessor
|
| 26 |
from diffusers.loaders import FromSingleFileMixin, StableDiffusionXLLoraLoaderMixin, TextualInversionLoaderMixin
|
| 27 |
from diffusers.models import AutoencoderKL, ControlNetModel, MultiAdapter, T2IAdapter, UNet2DConditionModel
|
| 28 |
+
from diffusers.models.controlnets.multicontrolnet import MultiControlNetModel
|
| 29 |
from diffusers.models.lora import adjust_lora_scale_text_encoder
|
|
|
|
| 30 |
from diffusers.pipelines.pipeline_utils import DiffusionPipeline, StableDiffusionMixin
|
| 31 |
from diffusers.pipelines.stable_diffusion_xl.pipeline_output import StableDiffusionXLPipelineOutput
|
| 32 |
from diffusers.schedulers import KarrasDiffusionSchedulers
|
main/pipeline_stable_diffusion_xl_controlnet_adapter_inpaint.py
CHANGED
|
@@ -43,8 +43,8 @@ from diffusers.models import (
|
|
| 43 |
T2IAdapter,
|
| 44 |
UNet2DConditionModel,
|
| 45 |
)
|
|
|
|
| 46 |
from diffusers.models.lora import adjust_lora_scale_text_encoder
|
| 47 |
-
from diffusers.pipelines.controlnet.multicontrolnet import MultiControlNetModel
|
| 48 |
from diffusers.pipelines.pipeline_utils import StableDiffusionMixin
|
| 49 |
from diffusers.pipelines.stable_diffusion_xl.pipeline_output import StableDiffusionXLPipelineOutput
|
| 50 |
from diffusers.schedulers import KarrasDiffusionSchedulers
|
|
|
|
| 43 |
T2IAdapter,
|
| 44 |
UNet2DConditionModel,
|
| 45 |
)
|
| 46 |
+
from diffusers.models.controlnets.multicontrolnet import MultiControlNetModel
|
| 47 |
from diffusers.models.lora import adjust_lora_scale_text_encoder
|
|
|
|
| 48 |
from diffusers.pipelines.pipeline_utils import StableDiffusionMixin
|
| 49 |
from diffusers.pipelines.stable_diffusion_xl.pipeline_output import StableDiffusionXLPipelineOutput
|
| 50 |
from diffusers.schedulers import KarrasDiffusionSchedulers
|
main/pipeline_stable_diffusion_xl_instandid_img2img.py
CHANGED
|
@@ -25,7 +25,7 @@ import torch.nn as nn
|
|
| 25 |
from diffusers import StableDiffusionXLControlNetImg2ImgPipeline
|
| 26 |
from diffusers.image_processor import PipelineImageInput
|
| 27 |
from diffusers.models import ControlNetModel
|
| 28 |
-
from diffusers.
|
| 29 |
from diffusers.pipelines.stable_diffusion_xl import StableDiffusionXLPipelineOutput
|
| 30 |
from diffusers.utils import (
|
| 31 |
deprecate,
|
|
|
|
| 25 |
from diffusers import StableDiffusionXLControlNetImg2ImgPipeline
|
| 26 |
from diffusers.image_processor import PipelineImageInput
|
| 27 |
from diffusers.models import ControlNetModel
|
| 28 |
+
from diffusers.models.controlnets.multicontrolnet import MultiControlNetModel
|
| 29 |
from diffusers.pipelines.stable_diffusion_xl import StableDiffusionXLPipelineOutput
|
| 30 |
from diffusers.utils import (
|
| 31 |
deprecate,
|
main/pipeline_stable_diffusion_xl_instantid.py
CHANGED
|
@@ -25,7 +25,7 @@ import torch.nn as nn
|
|
| 25 |
from diffusers import StableDiffusionXLControlNetPipeline
|
| 26 |
from diffusers.image_processor import PipelineImageInput
|
| 27 |
from diffusers.models import ControlNetModel
|
| 28 |
-
from diffusers.
|
| 29 |
from diffusers.pipelines.stable_diffusion_xl import StableDiffusionXLPipelineOutput
|
| 30 |
from diffusers.utils import (
|
| 31 |
deprecate,
|
|
|
|
| 25 |
from diffusers import StableDiffusionXLControlNetPipeline
|
| 26 |
from diffusers.image_processor import PipelineImageInput
|
| 27 |
from diffusers.models import ControlNetModel
|
| 28 |
+
from diffusers.models.controlnets.multicontrolnet import MultiControlNetModel
|
| 29 |
from diffusers.pipelines.stable_diffusion_xl import StableDiffusionXLPipelineOutput
|
| 30 |
from diffusers.utils import (
|
| 31 |
deprecate,
|
main/rerender_a_video.py
CHANGED
|
@@ -26,7 +26,7 @@ from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer
|
|
| 26 |
from diffusers.image_processor import VaeImageProcessor
|
| 27 |
from diffusers.models import AutoencoderKL, ControlNetModel, UNet2DConditionModel
|
| 28 |
from diffusers.models.attention_processor import Attention, AttnProcessor
|
| 29 |
-
from diffusers.
|
| 30 |
from diffusers.pipelines.controlnet.pipeline_controlnet_img2img import StableDiffusionControlNetImg2ImgPipeline
|
| 31 |
from diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker
|
| 32 |
from diffusers.schedulers import KarrasDiffusionSchedulers
|
|
|
|
| 26 |
from diffusers.image_processor import VaeImageProcessor
|
| 27 |
from diffusers.models import AutoencoderKL, ControlNetModel, UNet2DConditionModel
|
| 28 |
from diffusers.models.attention_processor import Attention, AttnProcessor
|
| 29 |
+
from diffusers.models.controlnets.multicontrolnet import MultiControlNetModel
|
| 30 |
from diffusers.pipelines.controlnet.pipeline_controlnet_img2img import StableDiffusionControlNetImg2ImgPipeline
|
| 31 |
from diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker
|
| 32 |
from diffusers.schedulers import KarrasDiffusionSchedulers
|
main/stable_diffusion_controlnet_img2img.py
CHANGED
|
@@ -9,7 +9,7 @@ import torch
|
|
| 9 |
from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer
|
| 10 |
|
| 11 |
from diffusers import AutoencoderKL, ControlNetModel, UNet2DConditionModel, logging
|
| 12 |
-
from diffusers.
|
| 13 |
from diffusers.pipelines.pipeline_utils import DiffusionPipeline, StableDiffusionMixin
|
| 14 |
from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput, StableDiffusionSafetyChecker
|
| 15 |
from diffusers.schedulers import KarrasDiffusionSchedulers
|
|
|
|
| 9 |
from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer
|
| 10 |
|
| 11 |
from diffusers import AutoencoderKL, ControlNetModel, UNet2DConditionModel, logging
|
| 12 |
+
from diffusers.models.controlnets.multicontrolnet import MultiControlNetModel
|
| 13 |
from diffusers.pipelines.pipeline_utils import DiffusionPipeline, StableDiffusionMixin
|
| 14 |
from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput, StableDiffusionSafetyChecker
|
| 15 |
from diffusers.schedulers import KarrasDiffusionSchedulers
|
main/stable_diffusion_controlnet_inpaint.py
CHANGED
|
@@ -10,7 +10,7 @@ import torch.nn.functional as F
|
|
| 10 |
from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer
|
| 11 |
|
| 12 |
from diffusers import AutoencoderKL, ControlNetModel, UNet2DConditionModel, logging
|
| 13 |
-
from diffusers.
|
| 14 |
from diffusers.pipelines.pipeline_utils import DiffusionPipeline, StableDiffusionMixin
|
| 15 |
from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput, StableDiffusionSafetyChecker
|
| 16 |
from diffusers.schedulers import KarrasDiffusionSchedulers
|
|
|
|
| 10 |
from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer
|
| 11 |
|
| 12 |
from diffusers import AutoencoderKL, ControlNetModel, UNet2DConditionModel, logging
|
| 13 |
+
from diffusers.models.controlnets.multicontrolnet import MultiControlNetModel
|
| 14 |
from diffusers.pipelines.pipeline_utils import DiffusionPipeline, StableDiffusionMixin
|
| 15 |
from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput, StableDiffusionSafetyChecker
|
| 16 |
from diffusers.schedulers import KarrasDiffusionSchedulers
|
main/stable_diffusion_controlnet_reference.py
CHANGED
|
@@ -8,8 +8,8 @@ import torch
|
|
| 8 |
from diffusers import StableDiffusionControlNetPipeline
|
| 9 |
from diffusers.models import ControlNetModel
|
| 10 |
from diffusers.models.attention import BasicTransformerBlock
|
|
|
|
| 11 |
from diffusers.models.unets.unet_2d_blocks import CrossAttnDownBlock2D, CrossAttnUpBlock2D, DownBlock2D, UpBlock2D
|
| 12 |
-
from diffusers.pipelines.controlnet.multicontrolnet import MultiControlNetModel
|
| 13 |
from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput
|
| 14 |
from diffusers.utils import logging
|
| 15 |
from diffusers.utils.torch_utils import is_compiled_module, randn_tensor
|
|
|
|
| 8 |
from diffusers import StableDiffusionControlNetPipeline
|
| 9 |
from diffusers.models import ControlNetModel
|
| 10 |
from diffusers.models.attention import BasicTransformerBlock
|
| 11 |
+
from diffusers.models.controlnets.multicontrolnet import MultiControlNetModel
|
| 12 |
from diffusers.models.unets.unet_2d_blocks import CrossAttnDownBlock2D, CrossAttnUpBlock2D, DownBlock2D, UpBlock2D
|
|
|
|
| 13 |
from diffusers.pipelines.stable_diffusion import StableDiffusionPipelineOutput
|
| 14 |
from diffusers.utils import logging
|
| 15 |
from diffusers.utils.torch_utils import is_compiled_module, randn_tensor
|
main/stable_diffusion_xl_controlnet_reference.py
CHANGED
|
@@ -12,8 +12,8 @@ from diffusers.callbacks import MultiPipelineCallbacks, PipelineCallback
|
|
| 12 |
from diffusers.image_processor import PipelineImageInput
|
| 13 |
from diffusers.models import ControlNetModel
|
| 14 |
from diffusers.models.attention import BasicTransformerBlock
|
|
|
|
| 15 |
from diffusers.models.unets.unet_2d_blocks import CrossAttnDownBlock2D, CrossAttnUpBlock2D, DownBlock2D, UpBlock2D
|
| 16 |
-
from diffusers.pipelines.controlnet.multicontrolnet import MultiControlNetModel
|
| 17 |
from diffusers.pipelines.stable_diffusion_xl.pipeline_output import StableDiffusionXLPipelineOutput
|
| 18 |
from diffusers.utils import PIL_INTERPOLATION, deprecate, logging, replace_example_docstring
|
| 19 |
from diffusers.utils.torch_utils import is_compiled_module, is_torch_version, randn_tensor
|
|
|
|
| 12 |
from diffusers.image_processor import PipelineImageInput
|
| 13 |
from diffusers.models import ControlNetModel
|
| 14 |
from diffusers.models.attention import BasicTransformerBlock
|
| 15 |
+
from diffusers.models.controlnets.multicontrolnet import MultiControlNetModel
|
| 16 |
from diffusers.models.unets.unet_2d_blocks import CrossAttnDownBlock2D, CrossAttnUpBlock2D, DownBlock2D, UpBlock2D
|
|
|
|
| 17 |
from diffusers.pipelines.stable_diffusion_xl.pipeline_output import StableDiffusionXLPipelineOutput
|
| 18 |
from diffusers.utils import PIL_INTERPOLATION, deprecate, logging, replace_example_docstring
|
| 19 |
from diffusers.utils.torch_utils import is_compiled_module, is_torch_version, randn_tensor
|