Instructions to use YiYiXu/modular-diffdiff-0704 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use YiYiXu/modular-diffdiff-0704 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("YiYiXu/modular-diffdiff-0704", 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
Update block.py
Browse files
block.py
CHANGED
|
@@ -9,7 +9,7 @@ from diffusers.modular_pipelines import (
|
|
| 9 |
ComponentSpec,
|
| 10 |
AutoPipelineBlocks
|
| 11 |
)
|
| 12 |
-
from diffusers.image_processor import VaeImageProcessor
|
| 13 |
from diffusers.schedulers import EulerDiscreteScheduler
|
| 14 |
from diffusers.models import AutoencoderKL
|
| 15 |
from diffusers.configuration_utils import FrozenDict
|
|
@@ -54,7 +54,7 @@ class SDXLDiffDiffPrepareLatentsStep(PipelineBlock):
|
|
| 54 |
@property
|
| 55 |
def inputs(self) -> List[Tuple[str, Any]]:
|
| 56 |
return [
|
| 57 |
-
InputParam("diffdiff_map",required=True),
|
| 58 |
InputParam(
|
| 59 |
"latents",
|
| 60 |
type_hint=Optional[torch.Tensor],
|
|
|
|
| 9 |
ComponentSpec,
|
| 10 |
AutoPipelineBlocks
|
| 11 |
)
|
| 12 |
+
from diffusers.image_processor import VaeImageProcessor, PipelineImageInput
|
| 13 |
from diffusers.schedulers import EulerDiscreteScheduler
|
| 14 |
from diffusers.models import AutoencoderKL
|
| 15 |
from diffusers.configuration_utils import FrozenDict
|
|
|
|
| 54 |
@property
|
| 55 |
def inputs(self) -> List[Tuple[str, Any]]:
|
| 56 |
return [
|
| 57 |
+
InputParam("diffdiff_map",type_hint=PipelineImageInput, required=True),
|
| 58 |
InputParam(
|
| 59 |
"latents",
|
| 60 |
type_hint=Optional[torch.Tensor],
|