Update app.py
Browse files
app.py
CHANGED
|
@@ -24,14 +24,11 @@ DEFAULT_HEIGHT = 1024
|
|
| 24 |
DEFAULT_WIDTH = 1024
|
| 25 |
|
| 26 |
REPO = "sd-community/sdxl-flash"
|
| 27 |
-
REPO_WEIGHT = "ehristoforu/dalle-3-xl-v2"
|
| 28 |
-
WEIGHT = "dalle-3-xl-lora-v2.safetensors"
|
| 29 |
-
ADAPTER = "dalle"
|
| 30 |
|
| 31 |
model = StableDiffusionXLPipeline.from_pretrained(REPO, torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False)
|
| 32 |
model.scheduler = EulerAncestralDiscreteScheduler.from_config(model.scheduler.config)
|
| 33 |
-
model.load_lora_weights(
|
| 34 |
-
model.set_adapters(
|
| 35 |
model.to(DEVICE)
|
| 36 |
|
| 37 |
css = '''
|
|
|
|
| 24 |
DEFAULT_WIDTH = 1024
|
| 25 |
|
| 26 |
REPO = "sd-community/sdxl-flash"
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
model = StableDiffusionXLPipeline.from_pretrained(REPO, torch_dtype=torch.float16, use_safetensors=True, add_watermarker=False)
|
| 29 |
model.scheduler = EulerAncestralDiscreteScheduler.from_config(model.scheduler.config)
|
| 30 |
+
model.load_lora_weights("ehristoforu/dalle-3-xl-v2", weight_name="dalle-3-xl-lora-v2.safetensors", adapter_name="base")
|
| 31 |
+
model.set_adapters(["base"], adapter_weights=[0.7])
|
| 32 |
model.to(DEVICE)
|
| 33 |
|
| 34 |
css = '''
|