Spaces:
Sleeping
Sleeping
Commit
·
7a2026c
1
Parent(s):
b3b16a3
update
Browse files
app.py
CHANGED
|
@@ -93,7 +93,7 @@ text_encoder.resize_token_embeddings(len(tokenizer))
|
|
| 93 |
#### load lcm components
|
| 94 |
model_id = "lambdalabs/sd-pokemon-diffusers"
|
| 95 |
lcm_lora_id = "latent-consistency/lcm-lora-sdv1-5"
|
| 96 |
-
pipe = DiffusionPipeline.from_pretrained(model_id, unet=unet, tokenizer=tokenizer, text_encoder=text_encoder)
|
| 97 |
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
| 98 |
pipe.load_lora_weights(lcm_lora_id)
|
| 99 |
pipe.to(device="cuda")
|
|
@@ -343,7 +343,7 @@ def text_to_image(prompt,keywords,radio,slider_step,slider_guidance,slider_batch
|
|
| 343 |
input = noise.half()
|
| 344 |
|
| 345 |
encoder_hidden_states_cond = text_encoder(prompts_cond)[0].half()
|
| 346 |
-
encoder_hidden_states_nocond = text_encoder(prompts_nocond)[0]
|
| 347 |
|
| 348 |
|
| 349 |
for t in tqdm(scheduler.timesteps):
|
|
|
|
| 93 |
#### load lcm components
|
| 94 |
model_id = "lambdalabs/sd-pokemon-diffusers"
|
| 95 |
lcm_lora_id = "latent-consistency/lcm-lora-sdv1-5"
|
| 96 |
+
pipe = DiffusionPipeline.from_pretrained(model_id, unet=unet, tokenizer=tokenizer, text_encoder=text_encoder, torch_dtype=torch.float16)
|
| 97 |
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
| 98 |
pipe.load_lora_weights(lcm_lora_id)
|
| 99 |
pipe.to(device="cuda")
|
|
|
|
| 343 |
input = noise.half()
|
| 344 |
|
| 345 |
encoder_hidden_states_cond = text_encoder(prompts_cond)[0].half()
|
| 346 |
+
encoder_hidden_states_nocond = text_encoder(prompts_nocond)[0].half()
|
| 347 |
|
| 348 |
|
| 349 |
for t in tqdm(scheduler.timesteps):
|