Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] deepcache uncommon resolution base #620

Merged
merged 6 commits into from
Feb 8, 2024

Conversation

lixiang007666
Copy link
Contributor

@lixiang007666 lixiang007666 commented Feb 4, 2024

This PR is done:

Test:

import torch
from onediffx import compile_pipe
from PIL import Image
from onediffx.deep_cache import StableDiffusionXLPipeline

t2i_pipe = StableDiffusionXLPipeline.from_pretrained(
    "stabilityai/stable-diffusion-xl-base-1.0",
    torch_dtype=torch.float16,
    variant="fp16",
)

t2i_pipe.to("cuda")
t2i_pipe = compile_pipe(t2i_pipe)

from diffusers import AutoPipelineForImage2Image

i2i_pipe = AutoPipelineForImage2Image.from_pipe(t2i_pipe)
i2i_pipe.to("cuda")

# Works
for dimensions in [(512, 512), (544, 544), (576, 578)]:
    i2i_pipe(
        prompt="a photo of a cat",
        negative_prompt="",
        image=Image.new("RGB", dimensions),
        num_inference_steps=20,
    )

# Doesn't work
i2i_pipe(
    prompt="a photo of a cat",
    negative_prompt="",
    image=Image.new("RGB", (528, 528)),
    num_inference_steps=20,
)

@strint strint added Request-bug Something isn't working Rsp-milestone labels Feb 7, 2024
@strint strint added this to the v0.12.1 milestone Feb 7, 2024
@strint strint merged commit d305c35 into main Feb 8, 2024
5 checks passed
@strint strint deleted the fix_deepcache_uncommon_resolution_base branch February 8, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request-bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants