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

i2vgen-xl keep produce black gif #8655

Closed
xalteropsx opened this issue Jun 21, 2024 · 7 comments
Closed

i2vgen-xl keep produce black gif #8655

xalteropsx opened this issue Jun 21, 2024 · 7 comments

Comments

@xalteropsx
Copy link

xalteropsx commented Jun 21, 2024

import torch
from diffusers import I2VGenXLPipeline
from diffusers.utils import export_to_gif, load_image

pipeline = I2VGenXLPipeline.from_pretrained(
    "ali-vilab/i2vgen-xl", torch_dtype=torch.float16
)
pipeline.enable_model_cpu_offload()

image_url = (
    "https://huggingface.co/datasets/diffusers/docs-images/resolve/main/i2vgen_xl_images/img_0009.png"
)
image = load_image(image_url).convert("RGB")

prompt = "Papers were floating in the air on a table in the library"
negative_prompt = "Distorted, discontinuous, Ugly, blurry, low resolution, motionless, static, disfigured, disconnected limbs, Ugly faces, incomplete arms"
generator = torch.manual_seed(8888)

frames = pipeline(
    prompt=prompt,
    image=image,
    num_inference_steps=50,
    negative_prompt=negative_prompt,
    guidance_scale=9.0,
    generator=generator,
).frames[0]
video_path = export_to_gif(frames, "i2v.gif")

i2v

@xalteropsx
Copy link
Author

Z:\software\python11\Lib\site-packages\diffusers\image_processor.py:111: RuntimeWarning: invalid value encountered in cast
images = (images * 255).round().astype("uint8")

@sayakpaul
Copy link
Member

That is strange. Was this happening with an earlier version of the library?

Cc: @DN6

@xalteropsx
Copy link
Author

do u guys have AnimateDiffPipeline singlefile pipeline for it ?

@sayakpaul
Copy link
Member

It's an unrelated issue and you should open a new issue thread for it.

@shauray8
Copy link
Contributor

@xalteropsx I failed to reproduce this on dev, might be an issue with the earlier versions.

@sayakpaul
Copy link
Member

Closing this for now. Please re-open if you continue to see this issue on the source installation of diffusers.

@equamo
Copy link

equamo commented Jul 17, 2024

I encounter the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants