Instructions to use OzzyGT/Pixal3D_Modular with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use OzzyGT/Pixal3D_Modular 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/Pixal3D_Modular", 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
Download resolvable.py from OzzyGT/Pixal3D_Modular: direct link, hf CLI and curl.
- Browser
- Download file 678 Bytes
-
https://huggingface.co/OzzyGT/Pixal3D_Modular/resolve/main/resolvable.py
- Command line
-
hf download hf://OzzyGT/Pixal3D_Modular/resolvable.py
-
curl -L -o resolvable.py https://huggingface.co/OzzyGT/Pixal3D_Modular/resolve/main/resolvable.py
678 Bytes
| from dataclasses import replace | |
| from diffusers.modular_pipelines import ModularPipelineBlocks | |
| class ResolvableBlock(ModularPipelineBlocks): | |
| """Leaf block whose generic component specs can carry the model repository's resolved classes and location. | |
| `Pixal3DBlocks(components_repo=...)` fills `component_overrides`, so a sub-block popped out of the pipeline still | |
| loads the right custom classes from the right repository. | |
| """ | |
| component_overrides = {} | |
| def resolve(self, specs): | |
| return [ | |
| replace(spec, **self.component_overrides[spec.name]) if spec.name in self.component_overrides else spec | |
| for spec in specs | |
| ] | |