Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ model.device
|
|
16 |
model_id = 'prompthero/midjourney-v4-diffusion' #"stabilityai/stable-diffusion-2"
|
17 |
|
18 |
scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
|
19 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id , torch_dtype=torch.float16
|
20 |
pipe = pipe.to("cuda")
|
21 |
|
22 |
def transcribe(audio,prompt_num,user_keywords):
|
@@ -173,8 +173,8 @@ def keywords(text,prompt_num,user_keywords):
|
|
173 |
count += 1
|
174 |
print(i)
|
175 |
print("works4")
|
176 |
-
with torch.autocast("cuda"):
|
177 |
-
|
178 |
print("works5")
|
179 |
images.append(image)
|
180 |
print("works6")
|
|
|
16 |
model_id = 'prompthero/midjourney-v4-diffusion' #"stabilityai/stable-diffusion-2"
|
17 |
|
18 |
scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
|
19 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id) #pipe = StableDiffusionPipeline.from_pretrained(model_id , torch_dtype=torch.float16 #pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, revision="fp16", torch_dtype=torch.float16)
|
20 |
pipe = pipe.to("cuda")
|
21 |
|
22 |
def transcribe(audio,prompt_num,user_keywords):
|
|
|
173 |
count += 1
|
174 |
print(i)
|
175 |
print("works4")
|
176 |
+
# with torch.autocast("cuda"):
|
177 |
+
image = pipe(i, height=768, width=768, guidance_scale = 10).images[0]
|
178 |
print("works5")
|
179 |
images.append(image)
|
180 |
print("works6")
|