diffusion_steps = (1000//steps)*steps if steps < 1000 else steps
This has the effect of ensuring that if the user selects any of those steps values (other than 150), that diffusion_steps will be assigned 1000, regardless, since all of those numbers are factors of 1000 except for 150. That means up to 40x more steps than the user intended, right? You could fix this and be able to claim a 4000% speedup in best/worst case.
I'd fix it and PR, but I don't know what the intent was here other than I suppose to correct in the unlikely case the user tried to input a float for the number of steps? Regardless of the intent, it looks broken to me. Unless this was the intent:
Section 3, line 3 of the Colab has:
Then in Section 4, line 11 there is:
This has the effect of ensuring that if the user selects any of those
steps
values (other than 150), thatdiffusion_steps
will be assigned 1000, regardless, since all of those numbers are factors of 1000 except for 150. That means up to 40x more steps than the user intended, right? You could fix this and be able to claim a 4000% speedup in best/worst case.I'd fix it and PR, but I don't know what the intent was here other than I suppose to correct in the unlikely case the user tried to input a float for the number of steps? Regardless of the intent, it looks broken to me. Unless this was the intent:
The menu will let you select any value that you want, as long as you intend it to be 1000, or 900 (in which case you need to select 150) :-)
Hope that is helpful!