Text-to-Image
Diffusers
English
jeveration
image-to-image
depth-estimation
image-segmentation
modular-diffusers
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.
Instructions to use OzzyGT/jeveration_custom_blocks with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use OzzyGT/jeveration_custom_blocks with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("OzzyGT/jeveration_custom_blocks", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Download dense.py from OzzyGT/jeveration_custom_blocks: direct link, hf CLI and curl.
- Browser
- Download file 2.91 kB
-
https://huggingface.co/OzzyGT/jeveration_custom_blocks/resolve/main/dense.py
- Command line
-
hf download hf://OzzyGT/jeveration_custom_blocks/dense.py
-
curl -L -o dense.py https://huggingface.co/OzzyGT/jeveration_custom_blocks/resolve/main/dense.py
2.91 kB
| # Copyright 2026 The HuggingFace Team and The Jeveration Authors. All rights reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0. See the LICENSE and NOTICE files in this repository. | |
| # | |
| # Adapted from the Jeveration code (https://github.com/Carol-lyh/Jeveration, Apache-2.0): jeveration/pipeline.py. | |
| import torch | |
| from diffusers.modular_pipelines import ModularPipelineBlocks, PipelineState | |
| from diffusers.modular_pipelines.modular_pipeline_utils import ComponentSpec, InputParam, OutputParam | |
| from diffusers.utils.torch_utils import get_module_execution_device | |
| from .components import transformer_spec | |
| class JeverationDensePredictStep(ModularPipelineBlocks): | |
| model_name = "jeveration" | |
| def description(self) -> str: | |
| return ( | |
| "Step that predicts the raw per-pixel maps of every request row in one forward pass: segmentation logits, " | |
| "log-depth or surface normals, at the dense input size." | |
| ) | |
| def expected_components(self) -> list[ComponentSpec]: | |
| return [transformer_spec()] | |
| def inputs(self) -> list[InputParam]: | |
| return [ | |
| InputParam( | |
| "input_ids", required=True, type_hint=torch.Tensor, description="Request token ids `[rows, L]`." | |
| ), | |
| InputParam( | |
| "attention_mask", required=True, type_hint=torch.Tensor, description="Padding mask of the request ids." | |
| ), | |
| InputParam( | |
| "position_ids", required=True, type_hint=torch.Tensor, description="Rotary positions `[3, rows, L]`." | |
| ), | |
| InputParam( | |
| "pixel_values", required=True, type_hint=torch.Tensor, description="The resized pictures, uint8." | |
| ), | |
| InputParam("dense_rows", required=True, type_hint=list, description="The task of each request row."), | |
| ] | |
| def intermediate_outputs(self) -> list[OutputParam]: | |
| return [ | |
| OutputParam( | |
| "dense_maps", | |
| type_hint=dict, | |
| description="Task -> raw maps `[B, C, h, w]` of that task's rows, in order, at the dense input size.", | |
| ) | |
| ] | |
| def __call__(self, components, state: PipelineState) -> PipelineState: | |
| block_state = self.get_block_state(state) | |
| transformer = components.transformer | |
| device = get_module_execution_device(transformer) | |
| block_state.dense_maps = transformer( | |
| input_ids=block_state.input_ids.to(device), | |
| attention_mask=block_state.attention_mask.to(device), | |
| position_ids=block_state.position_ids.to(device), | |
| pixel_values=block_state.pixel_values.to(device), | |
| dense_tasks=block_state.dense_rows, | |
| ).dense_maps | |
| self.set_block_state(state, block_state) | |
| return components, state | |