consistencydecoder icon indicating copy to clipboard operation
consistencydecoder copied to clipboard

ValueError

Open Eliont opened this issue 1 year ago • 0 comments

It's not for SD1, or it should use specified libraries versions, or something else?

Code:

latent = txt2img(
    prompt=prompt,
    width=width,
    height=height,
    num_images_per_prompt = num_image,
    guidance_scale = guidance,
    num_inference_steps = steps,
    negative_prompt=negative_prompt,
    output_type="latent",
    generator=torch.Generator().manual_seed(seed)
).images[0]

decoded_consistency = decoder_consistency(latent)
save_image(decoded_consistency, "tmp.png")

Error

[/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py](https://localhost:8080/#) in decorate_context(*args, **kwargs)
    113     def decorate_context(*args, **kwargs):
    114         with ctx_factory():
--> 115             return func(*args, **kwargs)
    116 
    117     return decorate_context

[/usr/local/lib/python3.10/dist-packages/consistencydecoder/__init__.py](https://localhost:8080/#) in __call__(self, features, schedule)
    137         schedule=[1.0, 0.5],
    138     ):
--> 139         features = self.ldm_transform_latent(features)
    140         ts = self.round_timesteps(
    141             torch.arange(0, 1024),

[/usr/local/lib/python3.10/dist-packages/consistencydecoder/__init__.py](https://localhost:8080/#) in ldm_transform_latent(z, extra_scale_factor)
    120 
    121         if len(z.shape) != 4:
--> 122             raise ValueError()
    123 
    124         z = z * 0.18215

Is it

Eliont avatar Nov 19 '23 09:11 Eliont