Spaces:
Runtime error
Runtime error
BluechipTechnologiesAsia
commited on
Commit
•
111d4b8
1
Parent(s):
24022ea
Update app.py
Browse files
app.py
CHANGED
@@ -8,25 +8,14 @@ from flask import Flask, render_template, request, url_for
|
|
8 |
|
9 |
app = Flask(__name__)
|
10 |
|
11 |
-
model_id = "
|
12 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
13 |
|
14 |
#pipe = StableDiffusionPipeline.from_pretrained(model_id)
|
15 |
#pipe = pipe.to(device)
|
16 |
#pipe.enable_attention_slicing()
|
17 |
|
18 |
-
pipe =
|
19 |
-
"fluently/Fluently-XL-v2",
|
20 |
-
torch_dtype=torch.float16,
|
21 |
-
use_safetensors=True,
|
22 |
-
)
|
23 |
-
|
24 |
-
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
25 |
-
|
26 |
-
pipe.load_lora_weights("ehristoforu/dalle-3-xl-v2")
|
27 |
-
pipe.set_adapters("dalle")
|
28 |
-
|
29 |
-
pipe = pipe.to(device)
|
30 |
|
31 |
@app.route('/', methods=['GET', 'POST'])
|
32 |
def generate_image():
|
|
|
8 |
|
9 |
app = Flask(__name__)
|
10 |
|
11 |
+
model_id = "runwayml/stable-diffusion-v1-5"
|
12 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
13 |
|
14 |
#pipe = StableDiffusionPipeline.from_pretrained(model_id)
|
15 |
#pipe = pipe.to(device)
|
16 |
#pipe.enable_attention_slicing()
|
17 |
|
18 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
@app.route('/', methods=['GET', 'POST'])
|
21 |
def generate_image():
|