Skip to content

Conversation

@lursz
Copy link
Contributor

@lursz lursz commented Dec 3, 2025

Introducing variety of in-house developed models and pulling them directly form hugging face.

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

pkg.pr.new

packages
Ready to be installed by your favorite package manager ⬇️

https://pkg.pr.new/software-mansion/TypeGPU/typegpu@6e559f86e6cc7652de71c42330914abab1d46905
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/noise@6e559f86e6cc7652de71c42330914abab1d46905
https://pkg.pr.new/software-mansion/TypeGPU/unplugin-typegpu@6e559f86e6cc7652de71c42330914abab1d46905

benchmark
view benchmark

commit
view commit

@lursz
Copy link
Contributor Author

lursz commented Dec 4, 2025

The tiniest (and default) model of them all was left in the repo on purpose - it's good to have it locally in case of some issues with the HuggingFace

@lursz lursz marked this pull request as ready for review December 4, 2025 16:46
Copy link
Collaborator

@iwoplaza iwoplaza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeppers! Works great 💜

sampler: { sampler: 'filtering' },
});

export const cropBoundsSlot = tgpu.slot<TgpuUniform<d.Vec4f>>();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend an accessor for this usecase instead. We don't really care that it's a uniform, rather that it's a vec4f

Suggested change
export const cropBoundsSlot = tgpu.slot<TgpuUniform<d.Vec4f>>();
export const cropBoundsAccess = tgpu['~unstable'].accessor(d.vec4f);

@lursz lursz linked an issue Dec 9, 2025 that may be closed by this pull request
export const MODEL_WIDTH = 320;
export const MODEL_HEIGHT = 320;

const modelCache = new Map<string, ArrayBuffer>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we clear the cache in example cleanup?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: A ONNX model for background segmentation

5 participants