Instructions to use kiigii/imagedream-ipmv-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use kiigii/imagedream-ipmv-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("kiigii/imagedream-ipmv-diffusers", 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 pipeline_imagedream.py
Browse files- pipeline_imagedream.py +12 -1
pipeline_imagedream.py
CHANGED
|
@@ -3,7 +3,18 @@ from typing import Any, Callable, Dict, List, Optional, Union
|
|
| 3 |
import torch
|
| 4 |
import torch.nn as nn
|
| 5 |
import torch.nn.functional as F
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
from diffusers.image_processor import PipelineImageInput
|
| 8 |
from diffusers.models import AutoencoderKL, UNet2DConditionModel
|
| 9 |
from diffusers.pipelines.stable_diffusion.pipeline_output import (
|
|
|
|
| 3 |
import torch
|
| 4 |
import torch.nn as nn
|
| 5 |
import torch.nn.functional as F
|
| 6 |
+
|
| 7 |
+
try:
|
| 8 |
+
from diffusers.callbacks import MultiPipelineCallbacks, PipelineCallback
|
| 9 |
+
except:
|
| 10 |
+
|
| 11 |
+
class MultiPipelineCallbacks:
|
| 12 |
+
...
|
| 13 |
+
|
| 14 |
+
class PipelineCallback:
|
| 15 |
+
...
|
| 16 |
+
|
| 17 |
+
|
| 18 |
from diffusers.image_processor import PipelineImageInput
|
| 19 |
from diffusers.models import AutoencoderKL, UNet2DConditionModel
|
| 20 |
from diffusers.pipelines.stable_diffusion.pipeline_output import (
|