Run this model with HF Jobs

Run OzzyGT/jeveration_custom_blocks 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/OzzyGT/jeveration_custom_blocks. 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/OzzyGT/jeveration_custom_blocks 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.
jeveration_custom_blocks / components.py
OzzyGT's picture
OzzyGT HF Staff
add blocks
c60a1b3
Raw History Blame Contribute Delete
1.98 kB
# Copyright 2026 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0. See the LICENSE file in this repository.
from transformers import AutoTokenizer, CLIPTextModel, CLIPTokenizer
from diffusers.modular_pipelines.modular_pipeline_utils import ComponentSpec
from .image_decoder_jeveration import JeverationImageDecoder
from .transformer_jeveration import JeverationTransformer
# The converted weights. The model classes come from this repo, so the weights repo holds no code. Load from elsewhere
# with `pipe.load_components(pretrained_model_name_or_path=...)`.
JEVERATION_WEIGHTS_REPO = "OzzyGT/jeveration_diffusers"
def transformer_spec() -> ComponentSpec:
return ComponentSpec(
"transformer",
JeverationTransformer,
pretrained_model_name_or_path=JEVERATION_WEIGHTS_REPO,
subfolder="transformer",
)
def image_decoder_spec() -> ComponentSpec:
return ComponentSpec(
"image_decoder",
JeverationImageDecoder,
pretrained_model_name_or_path=JEVERATION_WEIGHTS_REPO,
subfolder="image_decoder",
)
def source_image_decoder_spec() -> ComponentSpec:
return ComponentSpec(
"source_image_decoder",
JeverationImageDecoder,
pretrained_model_name_or_path=JEVERATION_WEIGHTS_REPO,
subfolder="source_image_decoder",
)
def text_encoder_spec() -> ComponentSpec:
return ComponentSpec(
"text_encoder", CLIPTextModel, pretrained_model_name_or_path=JEVERATION_WEIGHTS_REPO, subfolder="text_encoder"
)
def tokenizer_spec() -> ComponentSpec:
return ComponentSpec(
"tokenizer", AutoTokenizer, pretrained_model_name_or_path=JEVERATION_WEIGHTS_REPO, subfolder="tokenizer"
)
def clip_tokenizer_spec() -> ComponentSpec:
return ComponentSpec(
"clip_tokenizer",
CLIPTokenizer,
pretrained_model_name_or_path=JEVERATION_WEIGHTS_REPO,
subfolder="clip_tokenizer",
)