Image-to-Image
Diffusers
English
JOY-Huang commited on
Commit
e9fa090
1 Parent(s): 8908e31

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -5
README.md CHANGED
@@ -46,16 +46,13 @@ hf_hub_download(repo_id="InstantX/InstantIR", filename="models/previewer_lora_we
46
  import torch
47
  from PIL import Image
48
 
49
- import diffusers
50
  from diffusers import DDPMScheduler, StableDiffusionXLPipeline
51
- from diffusers.utils import load_image
52
  from schedulers.lcm_single_step_scheduler import LCMSingleStepScheduler
53
 
54
  from transformers import AutoImageProcessor, AutoModel
55
 
56
- from module.ip_adapter.utils import load_ip_adapter_to_pipe, revise_state_dict, init_ip_adapter_in_unet
57
  from module.ip_adapter.resampler import Resampler
58
- from module.aggregator import Aggregator
59
  from pipelines.sdxl_instantir import InstantIRPipeline
60
 
61
  # prepare 'dinov2'
@@ -75,7 +72,7 @@ image_proj_model = Resampler(
75
  embedding_dim=image_encoder.config.hidden_size,
76
  output_dim=sdxl.unet.config.cross_attention_dim,
77
  )
78
- init_ip_adapter_in_unet(
79
  sdxl.unet,
80
  image_proj_model,
81
  dcp_adapter,
 
46
  import torch
47
  from PIL import Image
48
 
 
49
  from diffusers import DDPMScheduler, StableDiffusionXLPipeline
 
50
  from schedulers.lcm_single_step_scheduler import LCMSingleStepScheduler
51
 
52
  from transformers import AutoImageProcessor, AutoModel
53
 
54
+ from module.ip_adapter.utils import init_adapter_in_unet
55
  from module.ip_adapter.resampler import Resampler
 
56
  from pipelines.sdxl_instantir import InstantIRPipeline
57
 
58
  # prepare 'dinov2'
 
72
  embedding_dim=image_encoder.config.hidden_size,
73
  output_dim=sdxl.unet.config.cross_attention_dim,
74
  )
75
+ init_adapter_in_unet(
76
  sdxl.unet,
77
  image_proj_model,
78
  dcp_adapter,