mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
(requested) support AMD 8GB GPUs via Windows DirectML
this update is requested by users
This commit is contained in:
+5
-1
@@ -218,7 +218,7 @@ def compute_cfg(uncond, cond, cfg_scale, t):
|
||||
def patched_sampling_function(model, x, timestep, uncond, cond, cond_scale, model_options=None, seed=None):
|
||||
global eps_record
|
||||
|
||||
if math.isclose(cond_scale, 1.0):
|
||||
if math.isclose(cond_scale, 1.0) and not model_options.get("disable_cfg1_optimization", False):
|
||||
final_x0 = calc_cond_uncond_batch(model, cond, None, x, timestep, model_options)[0]
|
||||
|
||||
if eps_record is not None:
|
||||
@@ -480,6 +480,10 @@ def build_loaded(module, loader_name):
|
||||
|
||||
|
||||
def patch_all():
|
||||
if ldm_patched.modules.model_management.directml_enabled:
|
||||
ldm_patched.modules.model_management.lowvram_available = True
|
||||
ldm_patched.modules.model_management.OOM_EXCEPTION = Exception
|
||||
|
||||
patch_all_precision()
|
||||
patch_all_clip()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user