lora
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 20/100
Rechercherichtung
The issue contains a notebook cell that configures output paths and starts AUTOMATIC1111 WebUI with a Cloudflare tunnel, but it does not describe a requested change or identify a failing test. Start by locating this cell in the repository and reviewing its surrounding notebook or documentation to determine the intended behavior. The issue needs a specific problem and expected outcome before completion can be judged.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
7. 이미지 저장 경로 설정 및 WebUI 실행
이 셀에 표시되는 접속 주소와 로그인 정보를 사용하십시오.
import json
import re
import time
import secrets
import tempfile
import requests
for process_name in ('tunnel_process', 'webui_process'):
process = globals().get(process_name)
if process is not None and process.poll() is None:
process.terminate()
try:
process.wait(timeout=15)
except subprocess.TimeoutExpired:
process.kill()
process.wait(timeout=10)
CONFIG = WEBUI / 'config.json'
config = json.loads(CONFIG.read_text()) if CONFIG.exists() else {}
config.update({
'samples_save': True,
'grid_save': True,
'outdir_samples': '',
'outdir_txt2img_samples': str(GENERATED / 'txt2img'),
'outdir_img2img_samples': str(GENERATED / 'img2img'),
'outdir_extras_samples': str(GENERATED / 'extras'),
'outdir_grids': '',
'outdir_txt2img_grids': str(GENERATED / 'grids' / 'txt2img'),
'outdir_img2img_grids': str(GENERATED / 'grids' / 'img2img'),
'outdir_save': str(GENERATED / 'saved'),
'sd_model_checkpoint': str(START_CHECKPOINT),
})
CONFIG.write_text(json.dumps(config, ensure_ascii=False, indent=2))
CLOUDFLARED = ROOT / 'cloudflared'
if not CLOUDFLARED.exists() or not CLOUDFLARED.stat().st_size:
cloudflare_url = 'https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64'
temp_binary = CLOUDFLARED.with_suffix('.part')
with requests.get(cloudflare_url, stream=True, timeout=(15, 30)) as response:
response.raise_for_status()
with temp_binary.open('wb') as output:
for chunk in response.iter_content(1024 * 1024):
check_cancel()
if chunk:
output.write(chunk)
temp_binary.replace(CLOUDFLARED)
CLOUDFLARED.chmod(0o755)
WEBUI_USER = 'a1111'
WEBUI_PASSWORD = secrets.token_urlsafe(18)
old_auth = globals().get('AUTH_FILE')
if old_auth:
Path(old_auth).unlink(missing_ok=True)
auth_fd, auth_name = tempfile.mkstemp(prefix='a1111-auth-', suffix='.txt')
AUTH_FILE = Path(auth_name)
with os.fdopen(auth_fd, 'w') as auth:
auth.write(f'{WEBUI_USER}:{WEBUI_PASSWORD}')
webui_log = ROOT / 'webui.log'
args = [str(PYTHON), 'launch.py', '--port', '7860',
'--ui-settings-file', str(CONFIG), '--ckpt', str(START_CHECKPOINT), '--gradio-auth-path', str(AUTH_FILE), '--lora-dir', str(ACTIVE_LORA_DIR),
'--opt-sdp-attention', '--no-half-vae', '--disable-console-progressbars']
if USE_MEDVRAM:
args.append('--medvram')
with webui_log.open('w') as log:
webui_process = subprocess.Popen(args, cwd=WEBUI, env=launch_env,
stdout=log, stderr=subprocess.STDOUT, start_new_session=True)
TUNNEL_LOG = ROOT / 'cloudflared.log'
public_url = None
try:
for attempt in range(300):
check_cancel()
if webui_process.poll() is not None:
raise RuntimeError('WebUI가 비정상적으로 종료되었습니다. webui.log 파일을 확인하십시오.')
# Cloudflare 터널 실행 및 URL 추출
if tunnel_process is None or tunnel_process.poll() is not None:
with TUNNEL_LOG.open('w') as tlog:
tunnel_process = subprocess.Popen(
[str(CLOUDFLARED), 'tunnel', '--url', 'http://127.0.0.1:7860'],
stdout=tlog, stderr=subprocess.STDOUT, start_new_session=True
)
if TUNNEL_LOG.exists():
log_content = TUNNEL_LOG.read_text(errors='ignore')
match = re.search(r'https://[a-zA-Z0-9.-]+\.trycloudflare\.com', log_content)
if match:
public_url = match.group(0)
break
time.sleep(1)
if not public_url:
raise RuntimeError('Cloudflare 터널 주소를 생성하지 못했습니다.')
print('\n========================================')
print('✅ AUTOMATIC1111 WebUI 접속 준비 완료!')
print(f'🔗 접속 주소: {public_url}')
print(f'👤 사용자명: {WEBUI_USER}')
print(f'🔑 비밀번호: {WEBUI_PASSWORD}')
print('========================================\n')
except BaseException:
for process_name in ('tunnel_process', 'webui_process'):
process = globals().get(process_name)
if process is not None and process.poll() is None:
process.terminate()
raise
- Vorherrschende Sprache
- Python
- Sterne
- 2.7k
- Forks
- 1k
- Ø Merge
- 7 Std. 38 Min.
- Gemergte PRs (30 T.)
- 9
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Kaggle/docker-python
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Kaggle/docker-python#1482 · 2 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug help wanted
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 25/100
Kaggle/docker-python#1563 ·
Maintainer antworten meist innerhalb von 1 Tag
-
ذOffen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 1/100
Kaggle/docker-python#1555 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Pytorch CUDA P100 GPU IncompatibilityEvtl. vergeben @shivansh193 hat das vor 76 Tagen übernommen. Offenbug help wanted
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
Kaggle/docker-python#1546 · 4 Kommentare · 2 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
Kaggle/docker-python#1515 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in Kaggle/docker-python
Ähnliche Issues
-
documentation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 74/100
BrainLesion/BraTS#200 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
OpenHands/extensions#970 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
rl-institut/enetra#91 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
huggingface/datasets#9100 ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
NVIDIA/garak#2486 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen