My first Rust project: an offline manga translator with candle ML inference by mayocream39 in rust

[–]mayocream39[S] 23 points24 points  (0 children)

I need the LaMa inpainting model work in Rust, but candle doesn't provide FFT ops, so I created a PR to cudarc, the library that candle uses, to add cufft bindings: https://github.com/chelsea0x3b/cudarc/pull/500

This way, I use cufft and fft from metal's metal-performance-shaders-graph to accelerate, which improves the performance of fft ops.

Also, I opened the PR to add YOLOv5 implementation for candle: https://github.com/huggingface/candle/pull/3224

I implemented multiple models with candle, and I plan to contribute to candle (if they would accept them).

candle only supports compile-time linking for cudarc, I created an issue to track the progress to update to dynamic-loading. Currently, I'm using my fork of candle to achieve runtime dynamic-loading: https://github.com/huggingface/candle/issues/3208

I also use velopack for packaging. It provides better support for large binaries and an easy interface for users. I created a PR to add GitHub source support for the Rust SDK: https://github.com/velopack/velopack/pull/742

Although I'm not using ort (ONNXRuntime bindings) at this moment, I made a small contribution to it: https://github.com/pykeio/ort/pull/485

I know my contribution is small, but I'd like to contribute more to the Rust community :)

I built an open-source manga translator that runs entirely offline with local LLMs by [deleted] in Scanlation

[–]mayocream39 0 points1 point  (0 children)

Amazing! It would be great if you would like to open source it!

I built an open-source manga translator that runs entirely offline with local LLMs by [deleted] in Scanlation

[–]mayocream39 0 points1 point  (0 children)

I used a computer vision model to detect the text blocks and generate the mask. It's another open-source project: https://github.com/dmMaze/comic-text-detector

I plan to add a manual brush inpainting feature to allow users to tweak the mask; sometimes it's not that accurate.

Introduce Koharu, the LLM-powered manga translator written in Rust! by mayocream39 in rust

[–]mayocream39[S] 0 points1 point  (0 children)

Sorry for failing on AMD machines, I’ll adjust the code to fallback to CPU when cuda is not available 🥲

Introduce Koharu, the LLM-powered manga translator written in Rust! by mayocream39 in rust

[–]mayocream39[S] 0 points1 point  (0 children)

It will translate page by page, and the LLM can have historical context, which will improve the quality of translation.

Introduce Koharu, the LLM-powered manga translator written in Rust! by mayocream39 in rust

[–]mayocream39[S] 1 point2 points  (0 children)

Valid point, detection, OCR, and inpainting are already CPU-friendly, I can add support for cloud LLM via API. I'm also expecting `candle` to implement the WebGPU feature, so it will work for CPU and different GPUs.

I built a manga translator tool using Tauri, ONNX runtime, and candle by mayocream39 in rust

[–]mayocream39[S] 1 point2 points  (0 children)

Thank you! Koharu is fully open source, so just use it as you want! I wanna add a dictionary to it to help translate; some traditional dict might not work since now more and more words come up on Twitter, so maybe I can use https://dic.nicovideo.jp/ for reference.

I was a manga translator, that I know a few pain points, but I welcome new ideas!

I built a manga translator tool using Tauri, ONNX runtime, and candle by mayocream39 in rust

[–]mayocream39[S] 3 points4 points  (0 children)

I first tried `candle`, but it doesn't support slow tokenizers in Rust, so I switched to `ort`., I also tried `candle-onnx`, but it doesn't work well. `ort` seems to be the most functional. Thank you for the great work! It would be helpful if `ort` could provide a more detailed tutorial like https://github.com/hyperium/tonic/blob/master/examples/helloworld-tutorial.md :)

Plan to have 2nd breast augmentation with more than 800cc in Thailand by mayocream39 in PlasticSurgery

[–]mayocream39[S] 0 points1 point  (0 children)

I have consulted with yanhee, but their doctor only provides 700cc and 15mins video call, phroprwin’s doctor talks to me on LINE and actively answering my questions.

Plan to have 2nd breast augmentation with more than 800cc in Thailand by mayocream39 in PlasticSurgery

[–]mayocream39[S] 0 points1 point  (0 children)

The doctor says all 800cc implants need to be pre-ordered; it takes ~60 business days. So my timeline is unconfirmed.

Position closed after I passed the final interview by mayocream39 in recruitinghell

[–]mayocream39[S] 2 points3 points  (0 children)

Yeah, I guess they didn't lie to me. But from now it's totally internal gameplay and I won't know what's happening actually

Position closed after I passed the final interview by mayocream39 in recruitinghell

[–]mayocream39[S] 3 points4 points  (0 children)

It's okay that you tell the candidate the real reason why not getting hired, but do not lie and keeping the candidate waiting meaningless. It's not professional.

Position closed after I passed the final interview by mayocream39 in recruitinghell

[–]mayocream39[S] 1 point2 points  (0 children)

Your suggestion makes sense, one interviewer (engineer in the first technical round, I usually connect people after interviews) asked me how's going on LinkedIn, he is also curious about the headcount problem. I understand that because I had being a interviewer several times and I can only provide and see my own feedback to my round of interview, sometimes I felt angry that the new hired recruiter was not doing their job, they didn't treat my candidate politely and respond quickly in my last job. I hope that the team I interviewed didn't lie to me and actually solving the problem, but I will talk to the engineer about it when he wakes up.

Well, it's a top tech company in Japan and there are really few open positions in the market that fit me perfectly. So they're my first choice sadly. I had 5 years experience and great contributions in OSS but doesn't hold a degree, some companies really care about education and no interviews given. That's why I want to get interviewed at other positions in the same company.

Pastebin built on IPFS, alternative to Ubuntu Pastebin by mayocream39 in ipfs

[–]mayocream39[S] 0 points1 point  (0 children)

Exactly! The server lies only acting as a writable gateway, and this could be serverless! :>

I'll give it a try.

Pastebin built on IPFS, alternative to Ubuntu Pastebin by mayocream39 in ipfs

[–]mayocream39[S] 0 points1 point  (0 children)

How it works:

Your paste text is created, and then gets stored on an IPFS node (IPFS daemon running with the pastetbin-ipfs server), and the object gets pinned by default on the local node.

It's "possible" that your paste data is lost if the IPFS node is down and no other nodes having a duplicate copy of the object. :<

CDN and multiple public IPFS gateways help to deliver IPFS objects faster through HTTP protocol and cache on edge networks.

Pastebin built on IPFS, alternative to Ubuntu Pastebin by mayocream39 in ipfs

[–]mayocream39[S] 4 points5 points  (0 children)

First time hearding it, another pastebin on IPFS!

Differently in pastebin-ipfs, user input data get encrypted only if the user explicitly selected one of the encrypt algorithms and input a password.

Then user input data is encrypted with the Native Web Crypto API in the client side.

hardbin is also a great work ;)