GitHub Issue: Errors in Sampling Function and Boolean Handling
Summary:
There are errors in the sampling function related to the boolean conditions and other issues, which need to be addressed to ensure proper functionality in the reverse diffusion process.
Problem Description:
The sample function is responsible for generating images by denoising a given noise tensor using the reverse diffusion process. The following issues have been identified:
-
Boolean Errors:
- There are potential boolean errors in the code, especially in the indexing and conditional logic during the reverse diffusion process. These may cause unexpected behavior or incorrect inferences.
-
Sampling Function Logic:
- The loop that iterates through timesteps in reverse may have some issues regarding its range and control flow. The current code starts from
0 and iterates until T, which may cause off-by-one errors. The loop should properly iterate from T-1 to 0.
-
Stepsize Misuse:
- The
stepsize parameter is declared but never used. This could lead to confusion or a missed implementation if it’s intended to affect the sampling process.
-
Possible Torch Error in sample_timestep Function:
- The function
sample_timestep(self, img, t) is called inside the loop, but its behavior and implementation should be reviewed to ensure it’s functioning as intended.
Priority: High
Expected Timeframe: 1 Week
Assigned to: NOT ASSIGNED YET