Spaces:
Runtime error
Runtime error
machinesarenotpeople
commited on
Commit
•
e4bc1c3
1
Parent(s):
72b2972
Upload app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ USER_TOKEN=os.environ.get('HF_TOKEN_SD')
|
|
18 |
#1.5
|
19 |
#model_id = "runwayml/stable-diffusion-v1-5"
|
20 |
#pipe = StableDiffusionImg2ImgPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16", use_auth_token = USER_TOKEN)
|
21 |
-
pipe = StableDiffusionImg2ImgPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", use_auth_token=USER_TOKEN)
|
22 |
|
23 |
pipe.to(device)
|
24 |
|
@@ -37,7 +37,7 @@ def infer(source_img):
|
|
37 |
prompt = "abandoned buildings, empty streetscapes, surrounded by lush green vegetation, ground-level view, rusted steel, derelict, urban exploration, ruin, deserted, broken windows, burnt out, graffitti, ramshackle, homeless shelter, decay, 8k, photorealistic, hyper detailed"
|
38 |
guide = 10
|
39 |
steps = 40
|
40 |
-
diffstr = 0.
|
41 |
seed = random.randint(0,2147483647)
|
42 |
|
43 |
generator = torch.Generator("cpu").manual_seed(seed)
|
|
|
18 |
#1.5
|
19 |
#model_id = "runwayml/stable-diffusion-v1-5"
|
20 |
#pipe = StableDiffusionImg2ImgPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16", use_auth_token = USER_TOKEN)
|
21 |
+
pipe = StableDiffusionImg2ImgPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype = "auto", use_auth_token = USER_TOKEN)
|
22 |
|
23 |
pipe.to(device)
|
24 |
|
|
|
37 |
prompt = "abandoned buildings, empty streetscapes, surrounded by lush green vegetation, ground-level view, rusted steel, derelict, urban exploration, ruin, deserted, broken windows, burnt out, graffitti, ramshackle, homeless shelter, decay, 8k, photorealistic, hyper detailed"
|
38 |
guide = 10
|
39 |
steps = 40
|
40 |
+
diffstr = 0.3
|
41 |
seed = random.randint(0,2147483647)
|
42 |
|
43 |
generator = torch.Generator("cpu").manual_seed(seed)
|