mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-04-30 19:21:21 +00:00
diffusion in fp8 landed
This commit is contained in:
@@ -171,3 +171,10 @@ def using_forge_operations(parameters_manual_cast=False, operations=None):
|
||||
for op_name in op_names:
|
||||
setattr(torch.nn, op_name, backups[op_name])
|
||||
return
|
||||
|
||||
|
||||
def shift_manual_cast(model, enabled):
|
||||
for m in model.modules():
|
||||
if hasattr(m, 'parameters_manual_cast'):
|
||||
m.parameters_manual_cast = enabled
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user