Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,15 +6,18 @@ import torch
|
|
6 |
import random
|
7 |
import uuid
|
8 |
|
9 |
-
token = os.getenv("token")
|
10 |
-
model = gr.load("models/Rojban/dreambooth4", hf_token=token)
|
|
|
|
|
|
|
11 |
|
12 |
pipe = DiffusionPipeline.from_pretrained(
|
13 |
model,
|
14 |
torch_dtype=torch.float16,
|
15 |
)
|
16 |
pipe.to("cuda")
|
17 |
-
pipe.load_lora_weights(
|
18 |
|
19 |
refiner = StableDiffusionXLImg2ImgPipeline.from_pretrained(
|
20 |
"stabilityai/stable-diffusion-xl-refiner-1.0",
|
|
|
6 |
import random
|
7 |
import uuid
|
8 |
|
9 |
+
#token = os.getenv("token")
|
10 |
+
#model = gr.load("models/Rojban/dreambooth4", hf_token=token)
|
11 |
+
prj_path = "dreambooth4"
|
12 |
+
|
13 |
+
model = "stabilityai/stable-diffusion-xl-base-1.0"
|
14 |
|
15 |
pipe = DiffusionPipeline.from_pretrained(
|
16 |
model,
|
17 |
torch_dtype=torch.float16,
|
18 |
)
|
19 |
pipe.to("cuda")
|
20 |
+
pipe.load_lora_weights(prj_path, weight_name="pytorch_lora_weights.safetensors")
|
21 |
|
22 |
refiner = StableDiffusionXLImg2ImgPipeline.from_pretrained(
|
23 |
"stabilityai/stable-diffusion-xl-refiner-1.0",
|