Spaces:
Runtime error
Runtime error
Commit
·
94c5bad
1
Parent(s):
dcf615f
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ hf.login(token=os.environ['model_token'])
|
|
7 |
#remember to login with token before loading model
|
8 |
def text_to_hair(prompt, guidance_scale=8, num_inference_steps=30, model_path ="CVH-vn1210/hair-model"):
|
9 |
|
10 |
-
pipe = StableDiffusionPipeline.from_pretrained(os.environ['
|
11 |
pipe.unet.load_attn_procs(model_path)
|
12 |
pipe.to("cuda")
|
13 |
image = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=guidance_scale).images[0]
|
|
|
7 |
#remember to login with token before loading model
|
8 |
def text_to_hair(prompt, guidance_scale=8, num_inference_steps=30, model_path ="CVH-vn1210/hair-model"):
|
9 |
|
10 |
+
pipe = StableDiffusionPipeline.from_pretrained(os.environ['bmd'], torch_dtype=torch.float16, use_auth_token=True)
|
11 |
pipe.unet.load_attn_procs(model_path)
|
12 |
pipe.to("cuda")
|
13 |
image = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=guidance_scale).images[0]
|