Fix requirements and image2image strength/steps mismatch (#585)

This commit is contained in:
Angelos Katharopoulos
2024-03-14 12:22:54 -07:00
committed by GitHub
parent e2205beb66
commit 3f3741d229
3 changed files with 17 additions and 2 deletions

View File

@@ -30,6 +30,7 @@ if __name__ == "__main__":
parser.add_argument("--verbose", "-v", action="store_true")
args = parser.parse_args()
# Load the models
if args.model == "sdxl":
sd = StableDiffusionXL("stabilityai/sdxl-turbo", float16=args.float16)
if args.quantize:
@@ -47,6 +48,8 @@ if __name__ == "__main__":
QuantizedLinear.quantize_module(sd.unet, group_size=32, bits=8)
args.cfg = args.cfg or 7.5
args.steps = args.steps or 50
# Ensure that models are read in memory if needed
if args.preload_models:
sd.ensure_models_are_loaded()