ml-explore / mlx-examples

Examples in the MLX framework
MIT License
5.79k stars 823 forks source link

image2image.py broken #440

Closed iLoveBug closed 6 months ago

iLoveBug commented 6 months ago

using mlx 0.2.0, and the following command: python image2image.py --strength 0.5 ~/Downloads/3111706926308_.pic.jpg 'a dragon on the sea'

I got the error:

Traceback (most recent call last): File "/Users/zhangfan/Documents/AI/mlx-examples/stable_diffusion/image2image.py", line 44, in for x_t in tqdm(latents, total=int(args.steps * args.strength)): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tqdm/std.py", line 1182, in iter for obj in iterable: File "/Users/zhangfan/Documents/AI/mlx-examples/stable_diffusion/stable_diffusion/init.py", line 148, in generate_latents_from_image x_0 = mx.broadcast_to(x_0, [n_images] + x_0.shape[1:])


TypeError: can only concatenate list (not "tuple") to list

any one got the same problem?
awni commented 6 months ago

Sorry, that was probably broken when we changed the shape to tuple. I will send a fix.