Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ torch.backends.cuda.matmul.allow_tf32 = False
|
|
12 |
# Initialize the base model and specific LoRA
|
13 |
base_model = "black-forest-labs/FLUX.1-dev"
|
14 |
pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=torch.bfloat16)
|
15 |
-
|
16 |
# pipe.scheduler = DEISMultistepScheduler.from_config(pipe.scheduler.config)
|
17 |
|
18 |
pipe.load_lora_weights("Shakker-Labs/AWPortraitCN2", weight_name="AWPortraitCN_2.safetensors", low_cpu_mem_usage=True)
|
|
|
12 |
# Initialize the base model and specific LoRA
|
13 |
base_model = "black-forest-labs/FLUX.1-dev"
|
14 |
pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=torch.bfloat16)
|
15 |
+
pipe.enable_model_cpu_offload()
|
16 |
# pipe.scheduler = DEISMultistepScheduler.from_config(pipe.scheduler.config)
|
17 |
|
18 |
pipe.load_lora_weights("Shakker-Labs/AWPortraitCN2", weight_name="AWPortraitCN_2.safetensors", low_cpu_mem_usage=True)
|