Skip to content

Conversation

@ilpoli
Copy link

@ilpoli ilpoli commented Aug 19, 2022

I'm working on fine-tuning arguments and would like to see only the optimizer progress bar, sadly Discoart doesn't support totally silent mode. This RM suggests the implementation of this feature.

Here's a piece of code that does allow you to achieve it with PR changes:

import os

os.environ['DISCOART_LOG_LEVEL'] = 'ERROR'
os.environ['DISCOART_OPTOUT_CLOUD_BACKUP'] = '1'
os.environ['DISCOART_DISABLE_IPYTHON'] = '1'
os.environ['DISCOART_DISABLE_RESULT_SUMMARY'] = '1'
os.environ['DISCOART_DISABLE_TQDM'] = '1'
os.environ['DISCOART_DISABLE_ARGS_TABLE'] = '1'
os.environ['DISCOART_OPTOUT_LOCAL_BACKUP'] = '1'

The following code hides the issue with obsoleted torchvision parameters that are used in lpips

import warnings
warnings.filterwarnings("ignore", category=UserWarning)

I mean these warnings:

/opt/conda/lib/python3.7/site-packages/torchvision/models/_utils.py:209: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use 'weights' instead.
  f"The parameter '{pretrained_param}' is deprecated since 0.13 and will be removed in 0.15, "

/opt/conda/lib/python3.7/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passing `weights=VGG16_Weights.IMAGENET1K_V1`. You can also use `weights=VGG16_Weights.DEFAULT` to get the most up-to-date weights.
  warnings.warn(msg)

Finally, use the following arguments:

from discoart import create

da = create(image_output=False, save_rate=-1)

This code prevents saving intermediate images and a final document.

@hanxiao
Copy link
Member

hanxiao commented Aug 21, 2022

hi thanks for your contribution, if you think this PR is ready, please mark it as ready from draft. 🙏 thanks

@ilpoli ilpoli marked this pull request as ready for review August 28, 2022 08:51
@ilpoli
Copy link
Author

ilpoli commented Sep 15, 2022

Hi @hanxiao , do I need to get one more approval, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants