Skip to content

Commit

Permalink
Fix wasm, re-enable ssim on wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurBrussee committed Dec 12, 2024
1 parent 23a6f27 commit 574c048
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions crates/brush-train/src/train.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ impl SplatTrainer {

let loss = (pred_compare - batch.gt_images.clone()).abs().mean();

// Disabled on WASM for now. On WebGPU + Metal this unfortunately has glitches.
let loss = if self.config.ssim_weight > 0.0 && !cfg!(target_family = "wasm") {
let loss = if self.config.ssim_weight > 0.0 {
let gt_rgb =
batch
.gt_images
Expand Down
6 changes: 3 additions & 3 deletions crates/brush-viewer/src/viewer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ use burn_wgpu::{Wgpu, WgpuDevice};
use eframe::egui;
use egui_tiles::{Container, Tile, TileId, Tiles};
use glam::{Affine3A, Quat, Vec3, Vec3A};
use tokio::sync::mpsc::error::TrySendError;
use tokio::sync::mpsc::{unbounded_channel, UnboundedSender};
use tokio_with_wasm::alias as tokio;

use ::tokio::io::{AsyncRead, AsyncReadExt};
use ::tokio::sync::mpsc::error::TrySendError;
use ::tokio::sync::mpsc::{unbounded_channel, UnboundedSender};
use ::tokio::sync::mpsc::{Receiver, UnboundedReceiver};
use ::tokio::{io::BufReader, sync::mpsc::channel};
use std::collections::HashMap;
use tokio::task;
use tokio_with_wasm::alias as tokio;
use wgpu::Features;

use tokio_stream::{Stream, StreamExt};
Expand Down

0 comments on commit 574c048

Please sign in to comment.