Spaces:
Runtime error
Runtime error
Commit
·
64f3d4d
1
Parent(s):
9c64075
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import torch
|
|
4 |
#import huggingface_hub as hf
|
5 |
#remember to login with token before loading model
|
6 |
def text_to_hair(prompt, num_inference_steps=200, guidance_scale=9, model_path ="./"):
|
7 |
-
pipe = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2", torch_dtype=torch.float16
|
8 |
pipe.unet.load_attn_procs(model_path)
|
9 |
pipe.to("cuda")
|
10 |
image = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=8).images[0]
|
|
|
4 |
#import huggingface_hub as hf
|
5 |
#remember to login with token before loading model
|
6 |
def text_to_hair(prompt, num_inference_steps=200, guidance_scale=9, model_path ="./"):
|
7 |
+
pipe = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2", torch_dtype=torch.float16)
|
8 |
pipe.unet.load_attn_procs(model_path)
|
9 |
pipe.to("cuda")
|
10 |
image = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=8).images[0]
|