Update hidream 2604 dev params#1145
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes explicit noise configuration parameters (noise_scale_start, noise_scale_end, and noise_clip_std) from several JSON configuration files and updates their default fallback values in the runner script to 8.0. A review comment points out that setting the default noise_clip_std to 8.0 is likely a copy-paste error that degrades performance by forcing host-device synchronization; it suggests setting it to 0.0 instead to properly disable clamping.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| "noise_clip_std": float(self.config.get("noise_clip_std", 2.5)), | ||
| "noise_scale_start": float(self.config.get("noise_scale_start", 8.0)), | ||
| "noise_scale_end": float(self.config.get("noise_scale_end", 8.0)), | ||
| "noise_clip_std": float(self.config.get("noise_clip_std", 8.0)), |
There was a problem hiding this comment.
Setting noise_clip_std to 8.0 appears to be a copy-paste error from noise_scale_start and noise_scale_end (which were both updated to 8.0).
In scheduler.py, noise_clip_std is used to clamp noise:
if noise_clip_std > 0:
clip_val = noise_clip_std * noise.std().item()
noise = noise.clamp(min=-clip_val, max=clip_val)At 8.0 standard deviations, clamping has virtually no effect on normal noise. However, because 8.0 > 0, the condition is still evaluated, forcing a call to noise.std().item(). Calling .item() on a GPU/MLU tensor causes a host-device synchronization, which can significantly degrade inference performance in the loop.
If the intention is to disable noise clipping, it should be set to 0.0 (similar to the full model configuration) to bypass this block entirely and avoid the synchronization overhead. If clipping is still desired, a standard threshold like 2.5 or 3.0 should be used.
| "noise_clip_std": float(self.config.get("noise_clip_std", 8.0)), | |
| "noise_clip_std": float(self.config.get("noise_clip_std", 0.0)), |
No description provided.