Run this model with HF Jobs

Run linxy97/CustomCodeForRMBG on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/linxy97/CustomCodeForRMBG. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/linxy97/CustomCodeForRMBG on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
CustomCodeForRMBG / MyConfig.py
linxy97's picture not-lain's picture
Duplicate from not-lain/CustomCodeForRMBG
694e47c verified
Raw History Blame Contribute Delete
327 Bytes
from transformers import PretrainedConfig
from typing import List
class RMBGConfig(PretrainedConfig):
model_type = "SegformerForSemanticSegmentation"
def __init__(
self,
in_ch=3,
out_ch=1,
**kwargs):
self.in_ch = in_ch
self.out_ch = out_ch
super().__init__(**kwargs)