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

kolors的controlnet完全没效果,是什么原因? #257

Open
juzstu opened this issue Nov 4, 2024 · 1 comment
Open

kolors的controlnet完全没效果,是什么原因? #257

juzstu opened this issue Nov 4, 2024 · 1 comment

Comments

@juzstu
Copy link

juzstu commented Nov 4, 2024

加载kolors官方的controlnet不起作用,出来的图和文生图一样。

model_manager = ModelManager(torch_dtype=torch.float16, device="cuda",
                             file_path_list=[
                                 f"{base_path}/Kolors/text_encoder",
                                 f"{base_path}/Kolors/unet/diffusion_pytorch_model.safetensors",
                                 f"{base_path}/Kolors/vae/diffusion_pytorch_model.safetensors"
                             ])
pipe = SDXLImagePipeline.from_model_manager(model_manager, controlnet_config_units=[
      ControlNetConfigUnit(
          processor_id="canny",
          model_path=f"{base_path}/Kolors-ControlNet-Canny/diffusion_pytorch_model.safetensors",
          scale=0.7)])
control_image = Image.open('')
result = pipe(
        prompt="一只可爱的小狗", 
        negative_prompt="",
        cfg_scale=5,
        num_inference_steps=25, 
        controlnet_image=control_image,
        height=1024, width=1024,
    )
@Artiprocher
Copy link
Collaborator

由于 kolors 官方的 controlnet 模型过少,我们暂时没有提供支持,我们建议您使用 sdxl union controlnet

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

2 participants