Spaces:
Runtime error
Runtime error
ehristoforu
commited on
Commit
•
7805dc1
1
Parent(s):
5c9fc69
Update app.py
Browse files
app.py
CHANGED
@@ -45,11 +45,12 @@ if torch.cuda.is_available():
|
|
45 |
use_safetensors=True,
|
46 |
)
|
47 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
48 |
-
|
|
|
49 |
pipe.load_lora_weights("ehristoforu/dalle-3-xl-v2", weight_name="dalle-3-xl-lora-v2.safetensors", adapter_name="dalle")
|
50 |
-
pipe.
|
|
|
51 |
|
52 |
-
pipe.to(device)
|
53 |
|
54 |
@spaces.GPU(enable_queue=True)
|
55 |
def generate(
|
@@ -78,6 +79,7 @@ def generate(
|
|
78 |
guidance_scale=guidance_scale,
|
79 |
num_inference_steps=25,
|
80 |
num_images_per_prompt=1,
|
|
|
81 |
output_type="pil",
|
82 |
).images
|
83 |
image_paths = [save_image(img) for img in images]
|
|
|
45 |
use_safetensors=True,
|
46 |
)
|
47 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
48 |
+
pipe.to(device)
|
49 |
+
|
50 |
pipe.load_lora_weights("ehristoforu/dalle-3-xl-v2", weight_name="dalle-3-xl-lora-v2.safetensors", adapter_name="dalle")
|
51 |
+
pipe.set_adapters("dalle")
|
52 |
+
|
53 |
|
|
|
54 |
|
55 |
@spaces.GPU(enable_queue=True)
|
56 |
def generate(
|
|
|
79 |
guidance_scale=guidance_scale,
|
80 |
num_inference_steps=25,
|
81 |
num_images_per_prompt=1,
|
82 |
+
cross_attention_kwargs={"scale": 0.8},
|
83 |
output_type="pil",
|
84 |
).images
|
85 |
image_paths = [save_image(img) for img in images]
|