mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-15 16:39:42 +00:00
Update sdxl_gen_img.py
This commit is contained in:
@@ -1492,8 +1492,9 @@ def main(args):
|
||||
args.ckpt = files[0]
|
||||
device = get_preferred_device()
|
||||
logger.info(f"preferred device: {device}")
|
||||
model_dtype = sdxl_train_util.match_mixed_precision(args, dtype)
|
||||
(_, text_encoder1, text_encoder2, vae, unet, _, _) = sdxl_train_util._load_target_model(
|
||||
args.ckpt, args.vae, sdxl_model_util.MODEL_VERSION_SDXL_BASE_V1_0, dtype, device
|
||||
args.ckpt, args.vae, sdxl_model_util.MODEL_VERSION_SDXL_BASE_V1_0, dtype, device, model_dtype
|
||||
)
|
||||
unet: InferSdxlUNet2DConditionModel = InferSdxlUNet2DConditionModel(unet)
|
||||
text_encoder1.to(dtype).to(device)
|
||||
@@ -3194,6 +3195,10 @@ def setup_parser() -> argparse.ArgumentParser:
|
||||
help="unsharp mask parameters for Gradual Latent: ksize, sigma, strength, target-x (1 means True). `3,0.5,0.5,1` or `3,1.0,1.0,0` is recommended /"
|
||||
+ " Gradual Latentのunsharp maskのパラメータ: ksize, sigma, strength, target-x. `3,0.5,0.5,1` または `3,1.0,1.0,0` が推奨",
|
||||
)
|
||||
parser.add_argument("--full_fp16", action="store_true", help="Loading model in fp16")
|
||||
parser.add_argument(
|
||||
"--full_bf16", action="store_true", help="Loading model in bf16"
|
||||
)
|
||||
|
||||
# # parser.add_argument(
|
||||
# "--control_net_image_path", type=str, default=None, nargs="*", help="image for ControlNet guidance / ControlNetでガイドに使う画像"
|
||||
|
||||
Reference in New Issue
Block a user