Spaces:
Runtime error
Runtime error
Update pulid/pipeline.py
Browse files- pulid/pipeline.py +2 -1
pulid/pipeline.py
CHANGED
|
@@ -45,6 +45,7 @@ class PuLIDPipeline:
|
|
| 45 |
hf_hub_download(sdxl_lightning_repo, 'sdxl_lightning_4step_unet.safetensors'), device=self.device
|
| 46 |
)
|
| 47 |
)
|
|
|
|
| 48 |
self.hack_unet_attn_layers(unet)
|
| 49 |
self.pipe = StableDiffusionXLPipeline.from_pretrained(
|
| 50 |
sdxl_base_repo, unet=unet, torch_dtype=torch.float16, variant="fp16"
|
|
@@ -217,7 +218,7 @@ class PuLIDPipeline:
|
|
| 217 |
return torch.cat((uncond_id_embedding, id_embedding), dim=0)
|
| 218 |
|
| 219 |
def inference(self, prompt, size, prompt_n='', image_embedding=None, id_scale=1.0, guidance_scale=1.2, steps=4):
|
| 220 |
-
print(self.pipe.unet.time_embedding.linear_1.weight
|
| 221 |
images = self.pipe(
|
| 222 |
prompt=prompt,
|
| 223 |
negative_prompt=prompt_n,
|
|
|
|
| 45 |
hf_hub_download(sdxl_lightning_repo, 'sdxl_lightning_4step_unet.safetensors'), device=self.device
|
| 46 |
)
|
| 47 |
)
|
| 48 |
+
unet.half()
|
| 49 |
self.hack_unet_attn_layers(unet)
|
| 50 |
self.pipe = StableDiffusionXLPipeline.from_pretrained(
|
| 51 |
sdxl_base_repo, unet=unet, torch_dtype=torch.float16, variant="fp16"
|
|
|
|
| 218 |
return torch.cat((uncond_id_embedding, id_embedding), dim=0)
|
| 219 |
|
| 220 |
def inference(self, prompt, size, prompt_n='', image_embedding=None, id_scale=1.0, guidance_scale=1.2, steps=4):
|
| 221 |
+
print(self.pipe.unet.time_embedding.linear_1.weight)
|
| 222 |
images = self.pipe(
|
| 223 |
prompt=prompt,
|
| 224 |
negative_prompt=prompt_n,
|