Spaces:
Runtime error
Runtime error
cocktailpeanut
commited on
Commit
·
e7f218c
1
Parent(s):
b12de1e
update
Browse files
app.py
CHANGED
@@ -312,7 +312,7 @@ def set_attention_processor(unet,id_length,is_ipadapter = False):
|
|
312 |
hidden_size = unet.config.block_out_channels[block_id]
|
313 |
if cross_attention_dim is None:
|
314 |
if name.startswith("up_blocks") :
|
315 |
-
device =
|
316 |
attn_procs[name] = SpatialAttnProcessor2_0(id_length = id_length, device=device)
|
317 |
total_count +=1
|
318 |
else:
|
@@ -560,7 +560,7 @@ def process_generation(_sd_type,_model_type,_upload_images, _num_steps,style_nam
|
|
560 |
if start_merge_step > 30:
|
561 |
start_merge_step = 30
|
562 |
print(f"start_merge_step:{start_merge_step}")
|
563 |
-
device =
|
564 |
generator = torch.Generator(device=device).manual_seed(seed_)
|
565 |
sa32, sa64 = sa32_, sa64_
|
566 |
id_length = id_length_
|
|
|
312 |
hidden_size = unet.config.block_out_channels[block_id]
|
313 |
if cross_attention_dim is None:
|
314 |
if name.startswith("up_blocks") :
|
315 |
+
device = devicetorch.get(torch)
|
316 |
attn_procs[name] = SpatialAttnProcessor2_0(id_length = id_length, device=device)
|
317 |
total_count +=1
|
318 |
else:
|
|
|
560 |
if start_merge_step > 30:
|
561 |
start_merge_step = 30
|
562 |
print(f"start_merge_step:{start_merge_step}")
|
563 |
+
device = devicetorch.get(torch)
|
564 |
generator = torch.Generator(device=device).manual_seed(seed_)
|
565 |
sa32, sa64 = sa32_, sa64_
|
566 |
id_length = id_length_
|