You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello I tried to use compel with SD3.5-large but got this error:
prompt_embeds = torch.cat([negative_prompt_embeds, prompt_embeds], dim=0)
RuntimeError: Sizes of tensors must match except in dimension 0. Expected size 333 but got size 77 for tensor number 1 in the list.
Code:
import torch
from diffusers import StableDiffusion3Pipeline
from compel import Compel
torch.cuda.empty_cache()
pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-large", torch_dtype=torch.bfloat16)
pipe.enable_model_cpu_offload()
compel_proc = Compel(tokenizer=pipe.tokenizer, text_encoder=pipe.text_encoder)
prompt = "A portrait of a Latino woman, green eyes--"
prompt_embeds = compel_proc(prompt)
pooled_prompt_embeds = compel_proc(prompt)
image = pipe(
prompt_embeds=prompt_embeds,
pooled_prompt_embeds=pooled_prompt_embeds,
num_images_per_prompt=1,
num_inference_steps=28,
guidance_scale=3.5,
).images[0]
image.save(i.jpg')
The text was updated successfully, but these errors were encountered:
Hello I tried to use compel with SD3.5-large but got this error:
Code:
The text was updated successfully, but these errors were encountered: