Update pipeline_imagedream.py
Browse files- pipeline_imagedream.py +2 -0
pipeline_imagedream.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
from typing import Any, Callable, Dict, List, Optional, Union
|
2 |
|
3 |
import torch
|
|
|
4 |
import torch.nn.functional as F
|
5 |
from diffusers.callbacks import MultiPipelineCallbacks, PipelineCallback
|
6 |
from diffusers.image_processor import PipelineImageInput
|
@@ -75,6 +76,7 @@ class ImageDreamPipeline(StableDiffusionPipeline):
|
|
75 |
print("IP-Adapter Loaded.")
|
76 |
|
77 |
if pretrained_model_name_or_path_or_dict == "kiigii/imagedream-ipmv-diffusers":
|
|
|
78 |
add_imagedream_attn_processor(self.unet)
|
79 |
logging.set_verbosity_error()
|
80 |
print(
|
|
|
1 |
from typing import Any, Callable, Dict, List, Optional, Union
|
2 |
|
3 |
import torch
|
4 |
+
import torch.nn as nn
|
5 |
import torch.nn.functional as F
|
6 |
from diffusers.callbacks import MultiPipelineCallbacks, PipelineCallback
|
7 |
from diffusers.image_processor import PipelineImageInput
|
|
|
76 |
print("IP-Adapter Loaded.")
|
77 |
|
78 |
if pretrained_model_name_or_path_or_dict == "kiigii/imagedream-ipmv-diffusers":
|
79 |
+
setattr(self.image_encoder, "visual_projection", nn.Identity())
|
80 |
add_imagedream_attn_processor(self.unet)
|
81 |
logging.set_verbosity_error()
|
82 |
print(
|