![Placeholder: # Values outside threshold will be pushed to within threshold/boundary so [-20, -3, -5, 4, 23, 2] becomes something like [-3.84, -3, -3.58, 3.55, 4, 2] instead of [-4, -3, -4, 4, 4, 2] def soft_clamp_tensor(input_tensor, threshold=3.5, boundary=4): if max(abs(input_tensor.max()), abs(input_tensor.min())) < boundary: return input_tensor channel_dim = 1 max_vals = input_tensor.max(channel_dim, keepdim=True)[0] max_replace = ((input_tensor - threshold) / (max_vals - th](https://img.stablecog.com/insecure/64w/aHR0cHM6Ly9iLnN0YWJsZWNvZy5jb20vMTE2ZWJiNzItZGY5MC00MmUyLWE0NDktNTllNjQwN2RhN2VhLmpwZWc.webp)
![# Values outside threshold will be pushed to within threshold/boundary so [-20, -3, -5, 4, 23, 2] becomes something like [-3.84, -3, -3.58, 3.55, 4, 2] instead of [-4, -3, -4, 4, 4, 2] def soft_clamp_tensor(input_tensor, threshold=3.5, boundary=4): if max(abs(input_tensor.max()), abs(input_tensor.min())) < boundary: return input_tensor channel_dim = 1 max_vals = input_tensor.max(channel_dim, keepdim=True)[0] max_replace = ((input_tensor - threshold) / (max_vals - th](https://img.stablecog.com/insecure/1920w/aHR0cHM6Ly9iLnN0YWJsZWNvZy5jb20vMTE2ZWJiNzItZGY5MC00MmUyLWE0NDktNTllNjQwN2RhN2VhLmpwZWc.webp)
@Createrealisticai
Prompt
# Values outside threshold will be pushed to within threshold/boundary so [-20, -3, -5, 4, 23, 2] becomes something like [-3.84, -3, -3.58, 3.55, 4, 2] instead of [-4, -3, -4, 4, 4, 2] def soft_clamp_tensor(input_tensor, threshold=3.5, boundary=4): if max(abs(input_tensor.max()), abs(input_tensor.min())) < boundary: return input_tensor channel_dim = 1 max_vals = input_tensor.max(channel_dim, keepdim=True)[0] max_replace = ((input_tensor - threshold) / (max_vals - th
2 years ago
Model
Redshift Diffusion
Guidance Scale
13
Dimensions
512 × 768