Closed riolys closed 9 months ago
Hi,
Thanks for your questions.
We actually take HQS = norm(mean) + (1-norm(entropy)). So this HQS is always > 0. We are sorry for the confusion in the "search" function and we will fix it soon.
Thanks for your reply~Actually when I use "search" function in my task, it shows very sight changes of "entropy" value between different time step.Like this:(all of them ≈ 49.9) metrics-entropy_t100: 49.91398239135742 metrics-entropy_t150: 49.917816162109375 metrics-entropy_t200: 49.92081069946289 metrics-entropy_t250: 49.90937805175781 metrics-entropy_t300: 49.90165710449219 metrics-entropy_t350: 49.89959716796875 metrics-entropy_t400: 49.89561080932617 metrics-entropy_t450: 49.90335464477539 metrics-entropy_t500: 49.90515899658203 metrics-entropy_t550: 49.89979934692383 metrics-entropy_t600: 49.90167236328125 metrics-entropy_t650: 49.90288543701172 metrics-entropy_t700: 49.903568267822266 metrics-entropy_t750: 49.904762268066406 metrics-entropy_t800: 49.9051513671875 metrics-entropy_t850: 49.905784606933594 metrics-entropy_t900: 49.906009674072266 after using "norm" (formulation 11) I get metrics_list = [0.7290342113230397, 0.8811686345746291, 1.0, 0.5463215258855586, 0.23993339388434756, 0.1581895246745383, 0.0, 0.30729639721465335, 0.37889797154102334, 0.16621253405994552, 0.24053890402664244, 0.2886769603390857, 0.3157735392067817, 0.36315470784135634, 0.3785952164698759, 0.40372388737511355, 0.41265516197396307] It looks useful after "norm" function. May I know that in your experiment if the difference between "entropy" value also slight?Maybe one explaination is that the grad is very small for every pixel. Thanks a lot!
I'm glad we can discuss this together.
In my observation, for some images and text prompts, the entropy value could be very similar, just as your result. But it is not for all cases. For example, in the following results of "angry" manipulation, the entropy shows a great difference.
metrics-entropy_t100: 13.857027053833008 metrics-entropy_t150: 13.123653411865234 metrics-entropy_t200: 13.512639045715332 metrics-entropy_t250: 8.670392990112305 metrics-entropy_t300: 8.984338760375977 metrics-entropy_t350: 10.061752319335938 metrics-entropy_t400: 3.1760663986206055 metrics-entropy_t450: 1.5881437063217163 metrics-entropy_t500: 1.5926451683044434 metrics-entropy_t550: 1.4157923460006714 metrics-entropy_t600: 8.859975814819336 metrics-entropy_t650: 9.858148574829102 metrics-entropy_t700: 10.278231620788574 metrics-entropy_t750: 13.4658842086792 metrics-entropy_t800: 1.4716432094573975 metrics-entropy_t850: 5.805893898010254 metrics-entropy_t900: 13.193365097045898
Also, the entropy of different sampled images could be varied. Therefore, in practical scenarios, we typically sample 100 images and calculate the average HQS under the same text prompt. This approach helps in stabilizing the score by averaging out the variations.
To gain a deeper understanding of these results, it is beneficial to examine the gradient visualization in the file named 'grad_seq.jpg'. This could probably provide insights for your observation.
Thanks for your reply!I will try with other photoes.
Hello,
Thank you for your excellent work!! But for now I have 2 questions. 1.I found that in your code, the "search" function calculate p * p.log() for every softmax grad of the image, this is "H" in the paper.However, in your paper, HQS is E[N - H]. 2.Also, it is very possible that HQS for some timestep is <0 after N-H because N is not always > H(even if N and H are normalized using formulation 11 in the paper). But Figure 4 shows that HQS is always >0. Can you please explain why?Thanks!