From eabb44c8dc985a0b16a9f4716a7ceb11a292c589 Mon Sep 17 00:00:00 2001 From: smthemex <138738845+smthemex@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:00:27 +0800 Subject: [PATCH] Update Hidiffusion_node.py fix bug --- Hidiffusion_node.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Hidiffusion_node.py b/Hidiffusion_node.py index 95804c4..c3d92da 100644 --- a/Hidiffusion_node.py +++ b/Hidiffusion_node.py @@ -210,14 +210,14 @@ class HI_Diffusers_Model_Loader: unet = UNet2DConditionModel.from_pretrained(repo_id, subfolder="unet").to("cuda", torch.float16) unet.load_state_dict(load_file(ckpt, device="cuda"), strict=False, ) if function_choice == "img2img": - model = StableDiffusionXLControlNetImg2ImgPipeline.from_pretrained(repo_id, unet=unet, torch_dtype=torch.float16, + model = StableDiffusionXLImg2ImgPipeline.from_pretrained(repo_id, unet=unet, torch_dtype=torch.float16, variant="fp16").to("cuda") else: model = StableDiffusionXLPipeline.from_pretrained(repo_id, unet=unet, torch_dtype=torch.float16, variant="fp16").to("cuda") else: if function_choice == "img2img": - model = StableDiffusionXLControlNetImg2ImgPipeline.from_pretrained(repo_id, + model = StableDiffusionXLImg2ImgPipeline.from_pretrained(repo_id, torch_dtype=torch.float16, variant="fp16").to( "cuda") else: