mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-10-24 06:28:07 +08:00
Fix requirements and image2image strength/steps mismatch (#585)
This commit is contained in:
committed by
GitHub
parent
e2205beb66
commit
3f3741d229
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user