Update app.py
Browse files
app.py
CHANGED
|
@@ -145,9 +145,9 @@ def load_model():
|
|
| 145 |
pipe.transformer=ll_transformer
|
| 146 |
pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/UltraReal.safetensors")
|
| 147 |
pipe.to(device=device, dtype=torch.bfloat16)
|
| 148 |
-
for name, module in pipe.transformer.named_modules():
|
| 149 |
-
|
| 150 |
-
|
| 151 |
upscaler_2 = UpscaleWithModel.from_pretrained("Kim2091/ClearRealityV1").to(device)
|
| 152 |
return pipe, upscaler_2
|
| 153 |
|
|
@@ -155,8 +155,8 @@ fa_processor = FlashAttentionProcessor()
|
|
| 155 |
|
| 156 |
pipe, upscaler_2 = load_model()
|
| 157 |
|
| 158 |
-
|
| 159 |
-
|
| 160 |
|
| 161 |
MAX_SEED = np.iinfo(np.int32).max
|
| 162 |
MAX_IMAGE_SIZE = 4096
|
|
|
|
| 145 |
pipe.transformer=ll_transformer
|
| 146 |
pipe.load_lora_weights("ford442/sdxl-vae-bf16", weight_name="LoRA/UltraReal.safetensors")
|
| 147 |
pipe.to(device=device, dtype=torch.bfloat16)
|
| 148 |
+
#for name, module in pipe.transformer.named_modules():
|
| 149 |
+
# if isinstance(module, Attention):
|
| 150 |
+
# module.processor = fa_processor
|
| 151 |
upscaler_2 = UpscaleWithModel.from_pretrained("Kim2091/ClearRealityV1").to(device)
|
| 152 |
return pipe, upscaler_2
|
| 153 |
|
|
|
|
| 155 |
|
| 156 |
pipe, upscaler_2 = load_model()
|
| 157 |
|
| 158 |
+
compiled_transformer = compile_transformer()
|
| 159 |
+
spaces.aoti_apply(compiled_transformer, pipe.transformer)
|
| 160 |
|
| 161 |
MAX_SEED = np.iinfo(np.int32).max
|
| 162 |
MAX_IMAGE_SIZE = 4096
|