Saturday, December 30, 2023

AMD GPU SD directml:RuntimeError: Torch is not able to use GPU

If you have an AMD GPU and encounter the following error message after attempting to install Stable Diffusion WebUI using DirectML 1.7.0 by running Webui-user.bat for the first time, with the last line indicating:

"RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check"

Here is the solution, involving modifications in two places:

  1. Locate the "requirements_versions" file, open it, and add the following command at the end before saving:
torch-directml
  1. Open Webui-user.bat, find the line with set COMMANDLINE_ARGS, and add the following command before saving:
set COMMANDLINE_ARGS= --use-directml

Note: You might have come across previous web content mentioning the parameter --backend directml, but this parameter is no longer valid and will result in an error.

Finally, run Webui-user.bat again, and the installation should proceed smoothly with the necessary environment and files. If you've encountered issues previously, you can delete the XENV folder and reinstall, or perform a fresh installation by removing all existing files and starting anew.


Sunday, April 20, 2014

Learing note:andriod app

awareing a few directories and files in a android project:

(https://developer.android.com/training/basics/firstapp/running-app.html)

files:
AndroidManifest.xml
a manifest file, it describes  
1) fundamental characteristicsof the app
2) defines each of app's components

directories:
src/
app's main source file, including an activity class that runs when your app is launched

res/
app resources
contains several sub-directories
   drawable-hdpi/
 layout/
 values/
  ... 



Friday, April 5, 2013

Install PySide on Windows XP

Pyside is a Python bindings for the cross-platform Qt GUI development toolkit. 

Install 
requirement:
Qt 4.8.x
Python

Before installing Pyside, we need to install Qt at first. Only the version 4.8.x qt is compatible with Pyside for now.

See PySide and download installer(version 1.1.2 released on August 28, 2012)

1.install Qt 4.8.x (Qt libraries 4.8.4 for Windows (VS 2008, 233 MB))

2.install Pyside(PySide-1.1.2.win32-py2.7.exe)

TEST
check if install succesly

for testing input command as below on DOS command line, be sure upper case and capital letters when keying.
>python
>>>import PySide
>>>PySide.__version__
 '1.1.2'
>>>from PySide.QtCore import *
>>>print(PySide.QtCore.__version__)
4.8.2


PySide Tutorials

PySide.QtGui contains functions for dealing with widgets.
PySide.QtCore contains methods for handling signals and slots, and controlling the application.

Saturday, March 30, 2013

Install scrapy on windows XP platform

SCRAPY is a screen scraping framework. web scraper,web extracter, are similar to screen scraping. what a web scraper can do? It can extract desired information from the website of interest,then you may transfer or research information that be saved as a file to what you want. for more detail check its website: SCRAPY

Install scrapy on windows platform note:

A1# requirement and prepare

Step1:
Install python(Python 2.6 or 2.7) (Python is a programming language)

Windows x86 MSI Installer (2.7.3):download python 2.7.3 (now)

After downloading, click the file python-2.7.3.msi to install python on windows XP, and finish installing.

Step 2:
Add python folder PATH to windows system PATH
click system in control panel=>click environment variable=>select path and edit it in environment variable=> add C:\python27\Scripts and C:\python27 where the python folder is to path (;C:\python27\Scripts;C:\python27)

Step3:
Install OpenSSL
download and install OpenSSL(the regular version) and Visual C++ 2008 redistributables(download link) on Win32 OpenSSL page (Win32 OpenSSL v1.0.1e)
add c:\openssl-win32\bin to the PATH, the same as STEP2

Step4:
download  pip or easy_install for installing SCRAPY (ex:easy_install here)
(setuptools-0.6c11.win32-py2.7.exe)
 
A2# Install SCRAPY


To install using : easy_install scrapy

for more details see the install section in the documentation: http://doc.scrapy.org/en/latest/intro/install.html

setup error:  unable to find vcvarsall.bat when setup twisted 12.3.0
fixed method:download twisted win32 setup file and install it directly, then reinstall scrapy and success (Twisted-12.3.0.win32-py2.7.‌exe)(another link: http://twistedmatrix.com/trac/wiki/Downloads)
or setup Visual C++ 2008 Express Edition (still not try it)

Next step: scrapy tutorial

Friday, March 29, 2013

What's DOM?

DOM stands for Document Object Model is a standard language interface recommended by W3C for processing XML(eXtensible Markup Language. For more detail check W3C document object model

DOM:"The Document Object Model is a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style of documents. The document can be further processed and the results of that processing can be incorporated back into the presented page."