fix refiner pipe for sdxl, added invisible-watermark in requirements

This commit is contained in:
Qiacheng 2023-08-20 22:49:06 -07:00
parent b323ea81dc
commit b079f0b2c8
3 changed files with 4 additions and 3 deletions

View File

@ -33,3 +33,4 @@ torchsde
transformers==4.30.0 transformers==4.30.0
diffusers==0.20.0 diffusers==0.20.0
openvino==2023.1.0.dev20230811 openvino==2023.1.0.dev20230811
invisible-watermark

View File

@ -31,4 +31,4 @@ torchsde==0.2.5
transformers==4.30.0 transformers==4.30.0
diffusers==0.20.0 diffusers==0.20.0
openvino==2023.1.0.dev20230811 openvino==2023.1.0.dev20230811
invisible-watermark

View File

@ -337,9 +337,9 @@ def get_diffusers_sd_model(model_config, vae_config, sampler_name, enable_cachin
else: else:
sd_model = StableDiffusionXLPipeline.from_single_file(checkpoint_path, local_config_file=checkpoint_config, load_safety_checker=False, torch_dtype=torch.float32) sd_model = StableDiffusionXLPipeline.from_single_file(checkpoint_path, local_config_file=checkpoint_config, load_safety_checker=False, torch_dtype=torch.float32)
if (mode == 1): if (mode == 1):
sd_model = StableDiffusionXLImg2ImgPipeline(**sd_model.components) sd_model = StableDiffusionXLImg2ImgPipeline.from_single_file(checkpoint_path, local_config_file=checkpoint_config, load_safety_checker=False, torch_dtype=torch.float32)
elif (mode == 2): elif (mode == 2):
sd_model = StableDiffusionXLInpaintPipeline(**sd_model.components) sd_model = StableDiffusionXLInpaintPipeline.from_single_file(checkpoint_path, local_config_file=checkpoint_config, load_safety_checker=False, torch_dtype=torch.float32)
else: else:
if model_config != "None": if model_config != "None":
local_config_file = os.path.join(curr_dir_path, 'configs', model_config) local_config_file = os.path.join(curr_dir_path, 'configs', model_config)