Image-to-Image
Diffusers
Safetensors
image-editing
pixel-art
sprite-sheet
animation
rgba
transparent-background
lora
Instructions to use irotem98/Codex-Pets-Sprite-Sheet-Generator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use irotem98/Codex-Pets-Sprite-Sheet-Generator with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Boogu/Boogu-Image-0.1-Edit", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("irotem98/Codex-Pets-Sprite-Sheet-Generator") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
Download boogu/cache_functions/cache_init.py from irotem98/Codex-Pets-Sprite-Sheet-Generator: direct link, hf CLI and curl.
- Browser
- Download file 1.41 kB
-
https://huggingface.co/irotem98/Codex-Pets-Sprite-Sheet-Generator/resolve/main/boogu/cache_functions/cache_init.py
- Command line
-
hf download hf://irotem98/Codex-Pets-Sprite-Sheet-Generator/boogu/cache_functions/cache_init.py
-
curl -L -o cache_init.py https://huggingface.co/irotem98/Codex-Pets-Sprite-Sheet-Generator/resolve/main/boogu/cache_functions/cache_init.py
1.41 kB
| # Copyright (C) 2026 Boogu Team. | |
| # This repository is a fork by Boogu Team; modifications have been made. | |
| # | |
| # Original work: TaylorSeer (Shenyi-Z), taylorseer_flux/cache_functions/cache_init.py | |
| # Source: https://github.com/Shenyi-Z/TaylorSeer/blob/main/TaylorSeers-xDiT/taylorseer_flux/cache_functions/cache_init.py | |
| # Type hinting would cause circular import, self should be `BooguImagePipeline` | |
| def cache_init(self, num_steps: int): | |
| """ | |
| Initialization for cache. | |
| """ | |
| cache_dic = {} | |
| cache = {} | |
| cache_index = {} | |
| cache[-1] = {} | |
| cache_index[-1] = {} | |
| cache_index["layer_index"] = {} | |
| cache[-1]["layers_stream"] = {} | |
| cache_dic["cache_counter"] = 0 | |
| for j in range(len(self.transformer.layers)): | |
| cache[-1]["layers_stream"][j] = {} | |
| cache_index[-1][j] = {} | |
| cache_dic["Delta-DiT"] = False | |
| cache_dic["cache_type"] = "random" | |
| cache_dic["cache_index"] = cache_index | |
| cache_dic["cache"] = cache | |
| cache_dic["fresh_ratio_schedule"] = "ToCa" | |
| cache_dic["fresh_ratio"] = 0.0 | |
| cache_dic["fresh_threshold"] = 3 | |
| cache_dic["soft_fresh_weight"] = 0.0 | |
| cache_dic["taylor_cache"] = True | |
| cache_dic["max_order"] = 4 | |
| cache_dic["first_enhance"] = 5 | |
| current = {} | |
| current["activated_steps"] = [0] | |
| current["step"] = 0 | |
| current["num_steps"] = num_steps | |
| return cache_dic, current | |