Skip to content

Commit

Permalink
Mark in painting experimental (huggingface#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickvonplaten authored Sep 8, 2022
1 parent 1e98723 commit 195ebe5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@
from ...models import AutoencoderKL, UNet2DConditionModel
from ...pipeline_utils import DiffusionPipeline
from ...schedulers import DDIMScheduler, PNDMScheduler
from ...utils import logging
from . import StableDiffusionPipelineOutput
from .safety_checker import StableDiffusionSafetyChecker


logger = logging.get_logger(__name__)


def preprocess_image(image):
w, h = image.size
w, h = map(lambda x: x - x % 32, (w, h)) # resize to integer multiple of 32
Expand Down Expand Up @@ -78,6 +82,7 @@ def __init__(
):
super().__init__()
scheduler = scheduler.set_format("pt")
logger.info("`StableDiffusionInpaintPipeline` is experimental and will very likely change in the future.")
self.register_modules(
vae=vae,
text_encoder=text_encoder,
Expand Down

0 comments on commit 195ebe5

Please sign in to comment.