-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
KolorsPipeline does not support from_single_file #10207
Comments
Can you link the model you are trying to load, seems it would be this? |
That model is already in Diffusers format, it's just the UNet2DConditionModel, we can load it straight to import torch
from diffusers import KolorsPipeline, EulerAncestralDiscreteScheduler
import safetensors.torch
weights = safetensors.torch.load_file("kolors8AcceleratedVersionOf8_accelerated.safetensors")
pipe = KolorsPipeline.from_pretrained(
"Kwai-Kolors/Kolors-diffusers", variant="fp16", torch_dtype=torch.float16
)
pipe.unet.load_state_dict(weights)
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
pipe = pipe.to("cuda")
prompt = (
"A photo of a ladybug, macro, zoom, high quality, film, holding a wooden sign with the text 'KOLORS'"
)
image = pipe(prompt, num_inference_steps=10, height=720, width=1280, guidance_scale=1.0, generator=torch.Generator().manual_seed(0)).images[0]
image.save("kolors.png") Parameters
cc @a-r-r-o-w @DN6
edit: Just returning early breaks detection (e.g. XL and this Kolors unet are detected as v1), we also need to update
|
from diffusers import KolorsPipeline
KolorsPipeline.from_single_file("models/kolrs-8steps.safetensors")
How does KolorsPipeline load a single file model?
The text was updated successfully, but these errors were encountered: