Skip to content

Commit a865d50

Browse files
committed
Clean up comments
1 parent 9a73dd1 commit a865d50

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

examples/research_projects/pytorch_xla/training/text_to_image/train_text_to_image_sdxl.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from torchvision.transforms.functional import crop
2323
from transformers import CLIPTextModel, CLIPTextModelWithProjection, AutoTokenizer
2424
from transformers.trainer_pt_utils import get_module_class_from_name
25-
# from viztracer import VizTracer
2625

2726
from torch._dispatch.python import suspend_functionalization
2827
from torch._subclasses.functional_tensor import disable_functional_mode
@@ -172,7 +171,6 @@ def __init__(
172171
self.mesh = xs.get_global_mesh()
173172
self.dataloader = iter(dataloader)
174173
self.global_step = 0
175-
# self.step_fn_compiled = torch.compile(self.step_fn, backend="openxla")
176174

177175
def run_optimizer(self):
178176
self.optimizer.step()
@@ -206,7 +204,7 @@ def start_training(self):
206204
def print_loss_closure(step, loss):
207205
print(f"Step: {step}, Loss: {loss}")
208206

209-
if True:
207+
if self.args.print_loss:
210208
xm.add_step_closure(
211209
print_loss_closure,
212210
args=(

0 commit comments

Comments
 (0)