zhiweili
commited on
Commit
•
b94446d
1
Parent(s):
9199ab3
rm test file
Browse files- inversion_run_adapter.py +24 -24
inversion_run_adapter.py
CHANGED
@@ -92,47 +92,47 @@ adapters = MultiAdapter(
|
|
92 |
)
|
93 |
adapters = adapters.to(torch.float16)
|
94 |
|
95 |
-
basePipe = StableDiffusionXLImg2ImgPipeline.from_pretrained(
|
96 |
-
BASE_MODEL,
|
97 |
-
torch_dtype=torch.float16,
|
98 |
-
variant="fp16",
|
99 |
-
use_safetensors=True,
|
100 |
-
)
|
101 |
-
basePipe = basePipe.to(device)
|
102 |
-
|
103 |
-
basePipe.scheduler = DDPMScheduler.from_pretrained(
|
104 |
-
BASE_MODEL,
|
105 |
-
subfolder="scheduler",
|
106 |
-
)
|
107 |
-
|
108 |
-
# pipeline = DiffusionPipeline.from_pretrained(
|
109 |
# BASE_MODEL,
|
110 |
# torch_dtype=torch.float16,
|
111 |
# variant="fp16",
|
112 |
# use_safetensors=True,
|
113 |
-
# adapter=adapters,
|
114 |
-
# custom_pipeline="./pipelines/pipeline_sdxl_adapter_img2img.py",
|
115 |
# )
|
116 |
-
#
|
117 |
|
118 |
-
#
|
119 |
# BASE_MODEL,
|
120 |
# subfolder="scheduler",
|
121 |
# )
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
|
|
|
|
|
126 |
adapter=adapters,
|
127 |
custom_pipeline="./pipelines/pipeline_sdxl_adapter_img2img.py",
|
128 |
)
|
129 |
-
|
130 |
pipeline = pipeline.to(device)
|
131 |
|
132 |
-
pipeline.scheduler = DDPMScheduler.
|
133 |
-
|
|
|
134 |
)
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
config = get_config(args)
|
137 |
|
138 |
compel_proc = Compel(
|
|
|
92 |
)
|
93 |
adapters = adapters.to(torch.float16)
|
94 |
|
95 |
+
# basePipe = StableDiffusionXLImg2ImgPipeline.from_pretrained(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
# BASE_MODEL,
|
97 |
# torch_dtype=torch.float16,
|
98 |
# variant="fp16",
|
99 |
# use_safetensors=True,
|
|
|
|
|
100 |
# )
|
101 |
+
# basePipe = basePipe.to(device)
|
102 |
|
103 |
+
# basePipe.scheduler = DDPMScheduler.from_pretrained(
|
104 |
# BASE_MODEL,
|
105 |
# subfolder="scheduler",
|
106 |
# )
|
107 |
|
108 |
+
pipeline = DiffusionPipeline.from_pretrained(
|
109 |
+
BASE_MODEL,
|
110 |
+
torch_dtype=torch.float16,
|
111 |
+
variant="fp16",
|
112 |
+
use_safetensors=True,
|
113 |
adapter=adapters,
|
114 |
custom_pipeline="./pipelines/pipeline_sdxl_adapter_img2img.py",
|
115 |
)
|
|
|
116 |
pipeline = pipeline.to(device)
|
117 |
|
118 |
+
pipeline.scheduler = DDPMScheduler.from_pretrained(
|
119 |
+
BASE_MODEL,
|
120 |
+
subfolder="scheduler",
|
121 |
)
|
122 |
|
123 |
+
|
124 |
+
# pipeline = DiffusionPipeline.from_pipe(
|
125 |
+
# basePipe,
|
126 |
+
# adapter=adapters,
|
127 |
+
# custom_pipeline="./pipelines/pipeline_sdxl_adapter_img2img.py",
|
128 |
+
# )
|
129 |
+
|
130 |
+
# pipeline = pipeline.to(device)
|
131 |
+
|
132 |
+
# pipeline.scheduler = DDPMScheduler.from_config(
|
133 |
+
# pipeline.scheduler.config,
|
134 |
+
# )
|
135 |
+
|
136 |
config = get_config(args)
|
137 |
|
138 |
compel_proc = Compel(
|