Closed jlami closed 1 year ago
I played around with this and I think it comes down to working with the prompt, steps and seed to get the result you want. When I built the scheduler I performed tests and validated the same output and input in python and C# for each function formula in the scheduler to validate I had implemented the logic correctly and to debug issues when trying to get it to work.
I tested this prompt with a bigger random seed and 10 steps and get a very high res photo. Can you try changing your prompt to an "hd portrait photo of a old warrior chief" and see how the result changes? Play with the seed and steps to get the result you want.
See my testing below:
Example: 10 Steps, random large seed, prompt "portrait photo of a old warrior chief"
Example: 29 Steps, Seed 0, prompt "portrait photo of a old warrior chief"
Example: 29 Steps, Seed 0, prompt "hd portrait photo of a old warrior chief"
I think old can also mean an old photo and therefore lower resolution.
Hope this helps! Thanks!
I think I found it, you store the derivative reversed here:
You should only give the zip the reversed and store the normal one. I'll make a pull request with the fix
This is the image I get with the fix:
Hi,
When I try to run with other
num_inference_steps
, for instance 30, I get very grainy results.I am trying to compare the numbers that python is using and a lot of the calculations in C# are not lining up with it. Seems that numpy and torch use doubles internally for computations and only store floats in the resulting arrays. This might have some influence, but I have not tracked it down.
I am running this in dotnet 4.8, but I don't think that makes any difference.
A prompt of
portrait photo of a old warrior chief
with a seed of 0 gives me the following image:I don't know enough about schedulers to know if using another algorithm might fix this. Or if there is an easy way to test if the LMS will converge.
Maybe you can try higher inference steps and see if this is reproducible?