Spaces:
Runtime error
Runtime error
Commit
·
cb30928
1
Parent(s):
20cf9af
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import torch
|
|
4 |
import huggingface_hub as hf
|
5 |
hf.login(token="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")
|
6 |
#remember to login with token before loading model
|
7 |
-
def text_to_hair(prompt, num_inference_steps=
|
8 |
pipe = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2", torch_dtype=torch.float16, use_auth_token=True)
|
9 |
pipe.unet.load_attn_procs(model_path)
|
10 |
pipe.to("cuda")
|
|
|
4 |
import huggingface_hub as hf
|
5 |
hf.login(token="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")
|
6 |
#remember to login with token before loading model
|
7 |
+
def text_to_hair(prompt, num_inference_steps=200, guidance_scale=9, model_path ="./hair-model"):
|
8 |
pipe = StableDiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2", torch_dtype=torch.float16, use_auth_token=True)
|
9 |
pipe.unet.load_attn_procs(model_path)
|
10 |
pipe.to("cuda")
|