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
Jeveration Modular Diffusers
Generated with the text-to-image code below, seed 0.
Modular Diffusers blocks for Jeveration (paper, code), a Qwen3.5-4B that makes a whole 512 x 512 image in one step. One model does text-to-image, image-to-image (edge map or depth map to image, colorization, three styles) and indoor depth, surface normals and segmentation. The blocks ship the model code and load the weights from OzzyGT/jeveration_diffusers.
Requires PyTorch, diffusers>=0.41.0, transformers>=5.14.0 and ftfy. Installing
flash-linear-attention makes the model faster on NVIDIA GPUs;
transformers uses it on its own when it is installed.
Usage
import torch
from diffusers import ModularPipelineBlocks
blocks = ModularPipelineBlocks.from_pretrained("OzzyGT/jeveration_custom_blocks", trust_remote_code=True)
pipe = blocks.init_pipeline()
pipe.load_components(dtype={"default": torch.bfloat16, "text_encoder": torch.float32})
pipe.to("cuda")
This needs about 12 GiB of VRAM. Prompts are in English and images are 512 x 512.
Text-to-image
prompt = (
"A cozy wooden cabin in a snowy pine forest at dusk, warm light glowing from its windows, smoke rising from the "
"chimney, snow-covered mountains and a starry purple sky behind it."
)
image = pipe(prompt=prompt, generator=torch.Generator("cuda").manual_seed(0)).get("images")[0]
image.save("cabin.png")
Image-to-image
Pass an image and a task. Pictures of other sizes are resized and centre cropped to 512 x 512.
| Task | Image | prompt |
|---|---|---|
hed |
a soft edge map | a caption of the wanted image |
depth |
a depth map, bright is near | a caption of the wanted image |
colorize |
any photo, made grey first | not used |
anime, ghibli, watercolor |
a photo | not used |
image = pipe(image="cabin.png", task="watercolor", generator=torch.Generator("cuda").manual_seed(0)).get("images")[0]
image.save("cabin_watercolor.png")
image = pipe(image="cabin.png", task="colorize", generator=torch.Generator("cuda").manual_seed(0)).get("images")[0]
image.save("cabin_colorized.png")
Depth, normals and segmentation
For pictures of rooms.
state = pipe(image="room.jpg", dense_tasks=["seg", "depth", "normal"])
predictions, pictures = state.get("predictions"), state.get("prediction_images")
# predictions["seg"]: class index of every pixel, (1, H, W)
# predictions["depth"]: meters, (1, H, W)
# predictions["normal"]: unit vectors, (1, H, W, 3)
# pictures: the same as PIL images, to look at
pictures["depth"][0].save("room_depth.png")
The segmentation classes are bed, books, ceiling, chair, floor, furniture, objects, picture, sofa, table, tv, wall and window. The model learned these on indoor scenes; other content works less well.
Licensing
The blocks are Apache-2.0, with code adapted from Jeveration and TA-TiTok, both Apache-2.0 (see NOTICE). For the weights, see the model repository.
- Downloads last month
- 17
