feat: update workspace paths and enhance gitignore

- Updated stablediffusion crate path from "../stable-diffusion-burn" to "./crates/stable-diffusion-burn" for proper workspace resolution
- Enhanced .gitignore to include generated model files (.mpk, .pt, .bin, .safetensors, .ckpt) and user_data directory
- Added Cargo.lock to gitignore with appropriate comment
- Reorganized IDE files section in gitignore for better clarity
- Added newline at end of file for proper formatting
This commit is contained in:
2026-03-05 19:39:14 +01:00
parent 4bb7ca9074
commit 3a67c0979c
1605 changed files with 537032 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
use super::*;
use burn_tensor::Tolerance;
use burn_tensor::{Distribution, Tensor};
#[test]
fn clamp_should_match_reference() {
let input = Tensor::<TestBackend, 4>::random(
[1, 5, 32, 32],
Distribution::Default,
&Default::default(),
);
let input_ref = Tensor::<ReferenceBackend, 4>::from_data(input.to_data(), &Default::default());
let output = input.clamp(0.3, 0.7);
output.into_data().assert_approx_eq::<FloatElem>(
&input_ref.clamp(0.3, 0.7).into_data(),
Tolerance::default(),
);
}