add comments about debice for clarify

This commit is contained in:
Kohya S
2023-03-30 21:44:40 +09:00
parent 6c28dfb417
commit 31069e1dc5
2 changed files with 3 additions and 0 deletions

View File

@@ -2648,6 +2648,7 @@ def load_target_model(args: argparse.Namespace, weight_dtype, device='cpu'):
print("load StableDiffusion checkpoint")
text_encoder, vae, unet = model_util.load_models_from_stable_diffusion_checkpoint(args.v2, name_or_path, device)
else:
# Diffusers model is loaded to CPU
print("load Diffusers pretrained models")
try:
pipe = StableDiffusionPipeline.from_pretrained(name_or_path, tokenizer=None, safety_checker=None)