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 README.md from OzzyGT/jeveration_custom_blocks: direct link, hf CLI and curl.
- Browser
- Download file 3.95 kB
-
https://huggingface.co/OzzyGT/jeveration_custom_blocks/resolve/main/README.md
- Command line
-
hf download hf://OzzyGT/jeveration_custom_blocks/README.md
-
curl -L -o README.md https://huggingface.co/OzzyGT/jeveration_custom_blocks/resolve/main/README.md
3.95 kB
| language: | |
| - en | |
| license: apache-2.0 | |
| base_model: | |
| - linlinlinlinsdada/Jeveration | |
| pipeline_tag: text-to-image | |
| tags: | |
| - jeveration | |
| - text-to-image | |
| - image-to-image | |
| - depth-estimation | |
| - image-segmentation | |
| - modular-diffusers | |
| library_name: diffusers | |
| # Jeveration Modular Diffusers | |
|  | |
| *Generated with the text-to-image code below, seed `0`.* | |
| Modular Diffusers blocks for [Jeveration](https://huggingface.co/linlinlinlinsdada/Jeveration) | |
| ([paper](https://arxiv.org/abs/2611.24738), [code](https://github.com/Carol-lyh/Jeveration)), 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](https://huggingface.co/OzzyGT/jeveration_diffusers). | |
| Requires PyTorch, `diffusers>=0.41.0`, `transformers>=5.14.0` and `ftfy`. Installing | |
| [`flash-linear-attention`](https://github.com/fla-org/flash-linear-attention) makes the model faster on NVIDIA GPUs; | |
| transformers uses it on its own when it is installed. | |
| ## Usage | |
| ```python | |
| 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 | |
| ```python | |
| 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 | | |
| ```python | |
| 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. | |
| ```python | |
| 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](https://huggingface.co/OzzyGT/jeveration_custom_blocks/blob/main/LICENSE), with code | |
| adapted from [Jeveration](https://github.com/Carol-lyh/Jeveration) and | |
| [TA-TiTok](https://github.com/bytedance/1d-tokenizer), both Apache-2.0 (see | |
| [NOTICE](https://huggingface.co/OzzyGT/jeveration_custom_blocks/blob/main/NOTICE)). For the weights, see the | |
| [model repository](https://huggingface.co/OzzyGT/jeveration_diffusers). | |