automatic
automatic copied to clipboard
[Issue]: text2image wait for a long time and no response with use-rocm
Issue Description
Install according to the tutorial, then I started with ./webui.sh --debug --use-rocm
.
When I used text2image to generate images, the progress bar in the console remained motionless and no exceptions were seen in the logs. Progress ?it/s 0% 0/20 00:00 ? Base
. Wait for a long time and no more response.
I test rocminfo
command and it is ok:
ROCk module is loaded
=====================
HSA System Attributes
=====================
Runtime Version: 1.1
System Timestamp Freq.: 1000.000000MHz
Sig. Max Wait Duration: 18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count)
Machine Model: LARGE
System Endianness: LITTLE
Mwaitx: DISABLED
DMAbuf Support: YES
==========
HSA Agents
==========
*******
Agent 1
*******
Name: AMD Ryzen 5 7500F 6-Core Processor
Uuid: CPU-XX
Marketing Name: AMD Ryzen 5 7500F 6-Core Processor
Vendor Name: CPU
Feature: None specified
Profile: FULL_PROFILE
Float Round Mode: NEAR
Max Queue Number: 0(0x0)
Queue Min Size: 0(0x0)
Queue Max Size: 0(0x0)
Queue Type: MULTI
Node: 0
Device Type: CPU
Cache Info:
L1: 32768(0x8000) KB
Chip ID: 0(0x0)
ASIC Revision: 0(0x0)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 3700
BDFID: 0
Internal Node ID: 0
Compute Unit: 12
SIMDs per CU: 0
Shader Engines: 0
Shader Arrs. per Eng.: 0
WatchPts on Addr. Ranges:1
Features: None
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: FINE GRAINED
Size: 32532016(0x1f06630) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 2
Segment: GLOBAL; FLAGS: KERNARG, FINE GRAINED
Size: 32532016(0x1f06630) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
Pool 3
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 32532016(0x1f06630) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: TRUE
ISA Info:
*******
Agent 2
*******
Name: gfx1101
Uuid: GPU-c6dec4d0b11b32fd
Marketing Name: AMD Radeon RX 7800 XT
Vendor Name: AMD
Feature: KERNEL_DISPATCH
Profile: BASE_PROFILE
Float Round Mode: NEAR
Max Queue Number: 128(0x80)
Queue Min Size: 64(0x40)
Queue Max Size: 131072(0x20000)
Queue Type: MULTI
Node: 1
Device Type: GPU
Cache Info:
L1: 32(0x20) KB
L2: 4096(0x1000) KB
L3: 65536(0x10000) KB
Chip ID: 29822(0x747e)
ASIC Revision: 0(0x0)
Cacheline Size: 64(0x40)
Max Clock Freq. (MHz): 2254
BDFID: 768
Internal Node ID: 1
Compute Unit: 60
SIMDs per CU: 2
Shader Engines: 3
Shader Arrs. per Eng.: 2
WatchPts on Addr. Ranges:4
Coherent Host Access: FALSE
Features: KERNEL_DISPATCH
Fast F16 Operation: TRUE
Wavefront Size: 32(0x20)
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Max Waves Per CU: 32(0x20)
Max Work-item Per CU: 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 4294967295(0xffffffff)
y 4294967295(0xffffffff)
z 4294967295(0xffffffff)
Max fbarriers/Workgrp: 32
Packet Processor uCode:: 550
SDMA engine uCode:: 20
IOMMU Support:: None
Pool Info:
Pool 1
Segment: GLOBAL; FLAGS: COARSE GRAINED
Size: 16760832(0xffc000) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 2
Segment: GLOBAL; FLAGS: EXTENDED FINE GRAINED
Size: 16760832(0xffc000) KB
Allocatable: TRUE
Alloc Granule: 4KB
Alloc Alignment: 4KB
Accessible by all: FALSE
Pool 3
Segment: GROUP
Size: 64(0x40) KB
Allocatable: FALSE
Alloc Granule: 0KB
Alloc Alignment: 0KB
Accessible by all: FALSE
ISA Info:
ISA 1
Name: amdgcn-amd-amdhsa--gfx1101
Machine Models: HSA_MACHINE_MODEL_LARGE
Profiles: HSA_PROFILE_BASE
Default Rounding Mode: NEAR
Default Rounding Mode: NEAR
Fast f16: TRUE
Workgroup Max Size: 1024(0x400)
Workgroup Max Size per Dimension:
x 1024(0x400)
y 1024(0x400)
z 1024(0x400)
Grid Max Size: 4294967295(0xffffffff)
Grid Max Size per Dimension:
x 4294967295(0xffffffff)
y 4294967295(0xffffffff)
z 4294967295(0xffffffff)
FBarrier M
sd.next's full log is here
21:40:07-931838 INFO Starting SD.Next
21:40:07-933414 INFO Logger: file="/home/matthew/Dev/python/automatic/sdnext.log" level=DEBUG size=64 mode=create
21:40:07-933959 INFO Python 3.10.12 on Linux
21:40:07-939458 INFO Version: app=sd.next updated=2024-06-01 hash=2bcada47 branch=master url=https://github.com/vladmandic/automatic/tree/master
21:40:08-757194 INFO Latest published version: 5596947ba477e6949c298bdf2d6e13cce2ced059 2024-06-01T13:16:47Z
21:40:08-759294 INFO Platform: arch=x86_64 cpu=x86_64 system=Linux release=5.15.0-107-generic python=3.10.12
21:40:08-760369 DEBUG Setting environment tuning
21:40:08-761166 DEBUG HF cache folder: /home/matthew/.cache/huggingface/hub
21:40:08-762003 DEBUG Torch allocator: "garbage_collection_threshold:0.80,max_split_size_mb:512"
21:40:08-762851 DEBUG Torch overrides: cuda=False rocm=True ipex=False diml=False openvino=False
21:40:08-763736 DEBUG Torch allowed: cuda=False rocm=True ipex=False diml=False openvino=False
21:40:08-764595 INFO AMD ROCm toolkit detected
21:40:08-778255 DEBUG ROCm agents detected: ['gfx1101']
21:40:08-779085 DEBUG ROCm agent used by default: idx=0 gpu=gfx1101 arch=navi3x
21:40:08-803083 DEBUG ROCm version detected: 6.0
21:40:08-810896 DEBUG Repository update time: Sat Jun 1 19:31:00 2024
21:40:08-811834 INFO Startup: standard
21:40:08-812487 INFO Verifying requirements
21:40:08-815933 INFO Verifying packages
21:40:08-816944 INFO Verifying submodules
21:40:08-904837 DEBUG Submodule: extensions-builtin/sd-extension-chainner / main
21:40:08-908289 DEBUG Submodule: extensions-builtin/sd-extension-system-info / main
21:40:08-911381 DEBUG Submodule: extensions-builtin/sd-webui-agent-scheduler / main
21:40:08-914210 DEBUG Submodule: extensions-builtin/sdnext-modernui / main
21:40:08-917102 DEBUG Submodule: extensions-builtin/stable-diffusion-webui-rembg / master
21:40:08-919976 DEBUG Submodule: modules/k-diffusion / master
21:40:08-922693 DEBUG Submodule: wiki / master
21:40:08-924736 DEBUG Register paths
21:40:08-936153 DEBUG Installed packages: 218
21:40:08-936605 DEBUG Extensions all: ['Lora', 'sd-extension-chainner', 'stable-diffusion-webui-rembg', 'sd-webui-agent-scheduler', 'sd-extension-system-info', 'sdnext-modernui']
21:40:08-957815 DEBUG Running extension installer: /home/matthew/Dev/python/automatic/extensions-builtin/stable-diffusion-webui-rembg/install.py
21:40:09-030798 DEBUG Running extension installer: /home/matthew/Dev/python/automatic/extensions-builtin/sd-webui-agent-scheduler/install.py
21:40:09-125901 DEBUG Extensions all: []
21:40:09-126519 INFO Extensions enabled: ['Lora', 'sd-extension-chainner', 'stable-diffusion-webui-rembg', 'sd-webui-agent-scheduler', 'sd-extension-system-info', 'sdnext-modernui']
21:40:09-126995 INFO Verifying requirements
21:40:09-127386 DEBUG Setup complete without errors: 1717249209
21:40:09-128313 DEBUG Extension preload: {'extensions-builtin': 0.0, 'extensions': 0.0}
21:40:09-128935 DEBUG Starting module: <module 'webui' from '/home/matthew/Dev/python/automatic/webui.py'>
21:40:09-129503 INFO Command line args: ['--debug', '--use-rocm'] use_rocm=True debug=True
21:40:09-130000 DEBUG Env flags: []
21:40:11-321276 INFO Load packages: {'torch': '2.3.0+cu121', 'diffusers': '0.28.0', 'gradio': '3.43.2'}
21:40:11-505601 DEBUG Read: file="config.json" json=20 bytes=868 time=0.000
21:40:11-506642 INFO Engine: backend=Backend.DIFFUSERS compute=cpu device=cpu attention="Scaled-Dot-Product" mode=no_grad
21:40:11-507172 INFO Device:
21:40:11-507608 DEBUG Read: file="html/reference.json" json=39 bytes=22628 time=0.000
21:40:11-749928 DEBUG ONNX: version=1.18.0 provider=CPUExecutionProvider, available=['AzureExecutionProvider', 'CPUExecutionProvider']
21:40:11-777977 DEBUG Importing LDM
21:40:11-782572 DEBUG Entering start sequence
21:40:11-783310 DEBUG Initializing
21:40:11-789118 INFO Available VAEs: path="models/VAE" items=0
21:40:11-789677 DEBUG Available UNets: path="models/UNET" items=0
21:40:11-790178 INFO Disabled extensions: ['sdnext-modernui']
21:40:11-790771 DEBUG Read: file="cache.json" json=1 bytes=179 time=0.000
21:40:11-791368 DEBUG Read: file="metadata.json" json=1 bytes=96 time=0.000
21:40:11-791857 DEBUG Scanning diffusers cache: folder=models/Diffusers items=0 time=0.00
21:40:11-792311 INFO Available models: path="models/Stable-diffusion" items=1 time=0.00
21:40:11-872799 DEBUG Load extensions
21:40:11-887428 INFO LoRA networks: available=0 folders=2
21:40:12-024838 INFO Extension: script='extensions-builtin/sd-webui-agent-scheduler/scripts/task_scheduler.py' Using sqlite file: extensions-builtin/sd-webui-agent-scheduler/task_scheduler.sqlite3
21:40:12-030025 DEBUG Extensions init time: 0.16 sd-webui-agent-scheduler=0.13
21:40:12-033062 DEBUG Read: file="html/upscalers.json" json=4 bytes=2640 time=0.000
21:40:12-033687 DEBUG Read: file="extensions-builtin/sd-extension-chainner/models.json" json=24 bytes=2693 time=0.000
21:40:12-034356 DEBUG chaiNNer models: path="models/chaiNNer" defined=24 discovered=0 downloaded=0
21:40:12-035121 DEBUG Load upscalers: total=52 downloaded=0 user=0 time=0.00 ['None', 'Lanczos', 'Nearest', 'ChaiNNer', 'LDSR', 'RealESRGAN', 'SD', 'SwinIR', 'SCUNet', 'ESRGAN']
21:40:12-039741 DEBUG Load styles: folder="models/styles" items=288 time=0.00
21:40:12-040834 DEBUG Creating UI
21:40:12-041393 DEBUG UI themes available: type=Standard themes=12
21:40:12-041888 INFO UI theme: type=Standard name="black-teal"
21:40:12-042988 DEBUG UI theme: css="/home/matthew/Dev/python/automatic/javascript/black-teal.css" base="sdnext.css" user="None"
21:40:12-044188 DEBUG UI initialize: txt2img
21:40:12-060007 DEBUG Extra networks: page='model' items=39 subfolders=2 tab=txt2img folders=['models/Stable-diffusion', 'models/Diffusers', 'models/Reference'] list=0.00 thumb=0.00 desc=0.00 info=0.00 workers=4 sort=Default
21:40:12-061199 DEBUG Extra networks: page='lora' items=0 subfolders=0 tab=txt2img folders=['models/Lora', 'models/LyCORIS'] list=0.00 thumb=0.00 desc=0.00 info=0.00 workers=4 sort=Default
21:40:12-066778 DEBUG Extra networks: page='style' items=288 subfolders=1 tab=txt2img folders=['models/styles', 'html'] list=0.00 thumb=0.00 desc=0.00 info=0.00 workers=4 sort=Default
21:40:12-068585 DEBUG Extra networks: page='embedding' items=0 subfolders=0 tab=txt2img folders=['models/embeddings'] list=0.00 thumb=0.00 desc=0.00 info=0.00 workers=4 sort=Default
21:40:12-069512 DEBUG Extra networks: page='vae' items=0 subfolders=0 tab=txt2img folders=['models/VAE'] list=0.00 thumb=0.00 desc=0.00 info=0.00 workers=4 sort=Default
21:40:12-138727 DEBUG UI initialize: img2img
21:40:12-440344 DEBUG UI initialize: control models=models/control
21:40:12-791602 DEBUG Read: file="ui-config.json" json=0 bytes=2 time=0.000
21:40:12-917012 DEBUG UI themes available: type=Standard themes=12
21:40:13-039379 DEBUG Reading failed: /home/matthew/Dev/python/automatic/html/extensions.json [Errno 2] No such file or directory: '/home/matthew/Dev/python/automatic/html/extensions.json'
21:40:13-040027 INFO Extension list is empty: refresh required
21:40:13-058550 DEBUG Extension list: processed=6 installed=6 enabled=5 disabled=1 visible=6 hidden=0
21:40:13-122890 DEBUG Root paths: ['/home/matthew/Dev/python/automatic']
21:40:13-355372 INFO Local URL: http://127.0.0.1:7860/
21:40:13-356009 DEBUG Gradio functions: registered=1694
21:40:13-356593 DEBUG FastAPI middleware: ['Middleware', 'Middleware']
21:40:13-358211 DEBUG Creating API
21:40:13-450521 INFO [AgentScheduler] Task queue is empty
21:40:13-451207 INFO [AgentScheduler] Registering APIs
21:40:13-507306 DEBUG Scripts setup: ['IP Adapters:0.028', 'AnimateDiff:0.013', 'X/Y/Z Grid:0.015', 'Face:0.018', 'Image-to-Video:0.008', 'Stable Video Diffusion:0.007']
21:40:13-508030 DEBUG Model metadata: file="metadata.json" no changes
21:40:13-509606 DEBUG Model requested: fn=<lambda>
21:40:13-510532 INFO Select: model="dreamshaper_8 [879db523c3]"
21:40:13-512587 DEBUG Load model: existing=False target=/home/matthew/Dev/python/automatic/models/Stable-diffusion/dreamshaper_8.safetensors info=None
21:40:13-513809 DEBUG Desired Torch parameters: dtype=FP16 no-half=False no-half-vae=False upscast=False
21:40:13-514333 INFO Setting Torch parameters: device=cpu dtype=torch.float16 vae=torch.float16 unet=torch.float16 context=no_grad fp16=True bf16=None optimization=Scaled-Dot-Product
21:40:13-514917 DEBUG Diffusers loading: path="/home/matthew/Dev/python/automatic/models/Stable-diffusion/dreamshaper_8.safetensors"
21:40:13-515354 INFO Autodetect: model="Stable Diffusion" class=StableDiffusionPipeline file="/home/matthew/Dev/python/automatic/models/Stable-diffusion/dreamshaper_8.safetensors" size=2034MB
Loading pipeline components... 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6/6 [ 0:00:00 < 0:00:00 , ? C/s ]
No ROCm runtime is found, using ROCM_HOME='/opt/rocm'
21:40:13-998101 DEBUG Setting model: pipeline=StableDiffusionPipeline config={'low_cpu_mem_usage': True, 'torch_dtype': torch.float16, 'load_connected_pipeline': True, 'extract_ema': False, 'config': 'configs/sd15',
'use_safetensors': True, 'cache_dir': '/home/matthew/.cache/huggingface/hub'}
21:40:14-001399 INFO Load embeddings: loaded=0 skipped=0 time=0.00
21:40:14-001984 DEBUG Setting model: enable VAE slicing
21:40:14-237843 DEBUG GC: collected=16 device=cpu {'ram': {'used': 0.87, 'total': 31.02}} time=0.22
21:40:14-241493 INFO Load model: time=0.50 load=0.49 native=512 {'ram': {'used': 0.87, 'total': 31.02}}
21:40:14-243188 DEBUG Script callback init time: task_scheduler.py:app_started=0.06
21:40:14-243994 INFO Startup time: 5.11 torch=1.61 gradio=0.46 diffusers=0.12 libraries=0.46 extensions=0.16 face-restore=0.08 ui-en=0.11 ui-txt2img=0.06 ui-img2img=0.28 ui-control=0.13 ui-models=0.12 ui-settings=0.24 launch=0.26
app-started=0.10 checkpoint=0.74
21:40:14-245386 DEBUG Save: file="config.json" json=20 bytes=868 time=0.002
21:40:22-858565 INFO MOTD: N/A
21:40:23-951135 DEBUG UI themes available: type=Standard themes=12
21:40:24-556479 INFO Browser session: user=None client=127.0.0.1 agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
21:40:30-084033 INFO Base: class=StableDiffusionPipeline
21:40:39-114949 DEBUG Diffuser pipeline: StableDiffusionPipeline task=DiffusersTaskType.TEXT_2_IMAGE batch=1/1x1 set={'prompt_embeds': torch.Size([1, 77, 768]), 'negative_prompt_embeds': torch.Size([1, 77, 768]), 'guidance_scale': 6,
'num_inference_steps': 20, 'eta': 1.0, 'guidance_rescale': 0.7, 'output_type': 'latent', 'width': 512, 'height': 512, 'parser': 'Full parser'}
Progress ?it/s 0% 0/20 00:00 ? Base21:42:00-357717 DEBUG Server: alive=True jobs=1 requests=251 uptime=109 memory=1.27/31.02 backend=Backend.DIFFUSERS state=idle
21:44:00-478969 DEBUG Server: alive=True jobs=1 requests=383 uptime=229 memory=2.23/31.02 backend=Backend.DIFFUSERS state=idle
Version Platform Description
Starting SD.Next
Python 3.10.12 on Linux
Version: app=sd.next updated=2024-06-01 hash=2bcada47 branch=master url=https://github.com/vladmandic/automatic/tree/master
Latest published version: 5596947ba477e6949c298bdf2d6e13cce2ced059 2024-06-01T13:16:47Z
Platform: arch=x86_64 cpu=x86_64 system=Linux release=5.15.0-107-generic python=3.10.12
AMD ROCm toolkit detected
ROCm agents detected: ['gfx1101']
ROCm agent used by default: idx=0 gpu=gfx1101 arch=navi3x
ROCm version detected: 6.0
Relevant log output
No response
Backend
Diffusers
Branch
Master
Model
Other
Acknowledgements
- [X] I have read the above and searched for existing issues
- [X] I confirm that this is classified correctly and its not an extension issue