Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -3,10 +3,10 @@ import os; os.system("pip install --pre --upgrade spaces")
|
|
3 |
import random
|
4 |
import uuid
|
5 |
|
6 |
-
import spaces
|
7 |
import gradio as gr
|
8 |
import numpy as np
|
9 |
from PIL import Image
|
|
|
10 |
import torch
|
11 |
from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
|
12 |
|
@@ -40,12 +40,14 @@ if torch.cuda.is_available():
|
|
40 |
"fluently/Fluently-XL-Final",
|
41 |
torch_dtype=torch.float16,
|
42 |
use_safetensors=True,
|
43 |
-
)
|
44 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
45 |
|
46 |
|
47 |
pipe.load_lora_weights("ehristoforu/dalle-3-xl-v2", weight_name="dalle-3-xl-lora-v2.safetensors", adapter_name="dalle")
|
48 |
pipe.set_adapters("dalle")
|
|
|
|
|
49 |
|
50 |
|
51 |
|
|
|
3 |
import random
|
4 |
import uuid
|
5 |
|
|
|
6 |
import gradio as gr
|
7 |
import numpy as np
|
8 |
from PIL import Image
|
9 |
+
import spaces
|
10 |
import torch
|
11 |
from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
|
12 |
|
|
|
40 |
"fluently/Fluently-XL-Final",
|
41 |
torch_dtype=torch.float16,
|
42 |
use_safetensors=True,
|
43 |
+
)
|
44 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
45 |
|
46 |
|
47 |
pipe.load_lora_weights("ehristoforu/dalle-3-xl-v2", weight_name="dalle-3-xl-lora-v2.safetensors", adapter_name="dalle")
|
48 |
pipe.set_adapters("dalle")
|
49 |
+
|
50 |
+
pipe.to("cuda")
|
51 |
|
52 |
|
53 |
|