Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -13,9 +13,10 @@ import gradio as gr
|
|
13 |
import numpy as np
|
14 |
from PIL import Image
|
15 |
import torch
|
16 |
-
from diffusers import
|
|
|
17 |
from typing import Tuple
|
18 |
-
from transformers import AutoTokenizer, AutoModelForCausalLM
|
19 |
import paramiko
|
20 |
|
21 |
#os.system("chmod +x ./cusparselt.sh")
|
@@ -182,7 +183,7 @@ def generate(
|
|
182 |
global models
|
183 |
pipe = models[model_choice]
|
184 |
seed = int(randomize_seed_fn(seed, randomize_seed))
|
185 |
-
generator = torch.Generator(device='
|
186 |
|
187 |
prompt, negative_prompt = apply_style(style_selection, prompt, negative_prompt)
|
188 |
|
|
|
13 |
import numpy as np
|
14 |
from PIL import Image
|
15 |
import torch
|
16 |
+
from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
|
17 |
+
#from diffusers import AutoencoderKL
|
18 |
from typing import Tuple
|
19 |
+
#from transformers import AutoTokenizer, AutoModelForCausalLM
|
20 |
import paramiko
|
21 |
|
22 |
#os.system("chmod +x ./cusparselt.sh")
|
|
|
183 |
global models
|
184 |
pipe = models[model_choice]
|
185 |
seed = int(randomize_seed_fn(seed, randomize_seed))
|
186 |
+
generator = torch.Generator(device='cpu').manual_seed(seed)
|
187 |
|
188 |
prompt, negative_prompt = apply_style(style_selection, prompt, negative_prompt)
|
189 |
|